Skip to content

Commit

Permalink
Merge pull request #24 from thenewinquiry/1.2.2
Browse files Browse the repository at this point in the history
#23 - Added hide featured image checkbox field to posts.

@frnsys
  • Loading branch information
misfist authored May 11, 2017
2 parents 97f9da1 + af37afa commit fc94abb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
43 changes: 43 additions & 0 deletions includes/class-tni-core-custom-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tni-core-functionality.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Text Domain: tni-core
* Domain Path: /languages
*
* Version: 1.2.1
* Version: 1.2.2
*
* @package Tni_Core_Functionality
*/
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit fc94abb

Please sign in to comment.