From 80e7f4d33eaa51667a685e2325b5aaf94ff9da13 Mon Sep 17 00:00:00 2001 From: Ned Zimmerman Date: Fri, 27 Mar 2020 11:36:22 -0600 Subject: [PATCH] feat: add hidden favorites field --- includes/functions/metadata.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/includes/functions/metadata.php b/includes/functions/metadata.php index f4dfe81..be04d50 100644 --- a/includes/functions/metadata.php +++ b/includes/functions/metadata.php @@ -412,6 +412,26 @@ function register_fields() { 'default_value' => '', 'placeholder' => '', ), + array( + 'key' => 'field_5e7e38287d0b5', + 'label' => __( 'Favorites', 'coop-library-framework' ), + 'name' => 'lc_resource_favorites', + 'type' => 'hidden', + 'instructions' => __( 'The number of times this resource has been favorited.', 'coop-library-framework' ), + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'default_value' => '0', + 'placeholder' => '', + 'prepend' => '', + 'append' => '', + 'maxlength' => '', + 'readonly' => 1, + ), array( 'key' => 'field_5e62c939ddcb6', 'label' => __( 'Resource language', 'coop-library-framework' ),