This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('gettext', 'ps_remove_comments_are_closed', 20, 3); | |
function ps_remove_comments_are_closed($translated_text, $untranslated_text, $domain) { | |
if ( $untranslated_text == 'Comments are closed.' ) { | |
return ''; | |
} | |
return $translated_text; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'checkbox' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'value' => 'option2' // Sets default to Option 2 | |
, 'label' => 'Example Field' | |
, 'description' => 'Field Description' | |
, 'attributes' => array( | |
'class' => 'text' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'colorpicker' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'label' => 'Example Field' | |
, 'description' => 'Click in box' | |
, 'attributes' => array( | |
'class' => 'text' | |
) | |
) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'datepicker' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'label' => 'Example Field' | |
, 'description' => 'Click in box' | |
, 'attributes' => array( | |
'class' => 'text' | |
) | |
, 'options' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'textarea' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'label' => 'Example Field' | |
, 'description' => 'Field Description' | |
, 'attributes' => array( | |
'class' => 'text' | |
) | |
) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'radio' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'value' => 'option2' // Sets default to Option 2 | |
, 'label' => 'Example Field' | |
, 'description' => 'Field Description' | |
, 'attributes' => array( | |
'class' => 'text' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'select' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'value' => 'option2' // Sets default to Option 2 | |
, 'label' => 'Example Field' | |
, 'description' => 'Field Description' | |
, 'attributes' => array( | |
'class' => 'text' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'timepicker' | |
, 'field' => 'time' | |
, 'label' => 'Time' | |
, 'description' => 'Choose a time' | |
, 'options' => array( | |
'startTime' => date( 'H:m A' ) | |
, 'show24Hours' => false | |
, 'separator' => ':' | |
, 'step' => 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piklist( 'field', array( | |
'type' => 'text' | |
, 'scope' => 'post_meta' // Not used for settings sections | |
, 'field' => 'field_name' | |
, 'label' => 'Example Field' | |
, 'description' => 'Field Description' | |
, 'attributes' => array( | |
'class' => 'text' | |
) | |
) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Title: My Settings Section | |
Setting: piklist-examples | |
Tab: Advanced | |
Order: 20 | |
*/ |
OlderNewer