diff --git a/includes/class-tni-core-custom-fields.php b/includes/class-tni-core-custom-fields.php index 1d09d45..a90d7fd 100644 --- a/includes/class-tni-core-custom-fields.php +++ b/includes/class-tni-core-custom-fields.php @@ -206,6 +206,49 @@ public function register_field_groups() { 'description' => '', )); + acf_add_local_field_group( array( + 'key' => 'group_featured_image', + 'title' => __( 'Display Image', 'tni-core' ), + 'fields' => array ( + array ( + 'key' => 'field_hide_featured_image', + 'label' => __( '', 'tni-core' ), + 'name' => 'hide_featured_image', + 'type' => 'true_false', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'message' => '', + 'default_value' => 0, + 'ui' => 1, + 'ui_on_text' => __( 'Hide', 'tni-core' ), + 'ui_off_text' => __( 'Show', 'tni-core' ), + ), + ), + 'location' => array ( + array ( + array ( + 'param' => 'post_type', + 'operator' => '==', + 'value' => 'post', + ), + ), + ), + 'menu_order' => 0, + 'position' => 'side', + 'style' => 'default', + 'label_placement' => 'top', + 'instruction_placement' => 'label', + 'hide_on_screen' => '', + 'active' => 1, + 'description' => '', + )); + register_field_group( array ( 'id' => 'acf_magazine', 'title' => __( 'Magazine Details', 'tni-core' ), diff --git a/readme.txt b/readme.txt index 522a8b9..11bad68 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: misfist Tags: custom Requires at least: 4.7 Tested up to: 4.7.4 -Version: 1.2.1 +Version: 1.2.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -22,6 +22,9 @@ This section describes how to install the plugin and get it working. == Changelog == += 1.2.2 May 10, 2017 = +* #23 - Added hide featured image checkbox field to posts. + = 1.2.1 May 10, 2017 = * #21 - Fixed JS issue diff --git a/tni-core-functionality.php b/tni-core-functionality.php index c76aceb..3c8f8ae 100644 --- a/tni-core-functionality.php +++ b/tni-core-functionality.php @@ -10,7 +10,7 @@ * Text Domain: tni-core * Domain Path: /languages * - * Version: 1.2.1 + * Version: 1.2.2 * * @package Tni_Core_Functionality */ @@ -52,7 +52,7 @@ * @return object Tni_Core */ function Tni_Core() { - $instance = Tni_Core::instance( __FILE__, '1.2.1' ); + $instance = Tni_Core::instance( __FILE__, '1.2.2' ); return $instance; }