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
<?php | |
/** | |
* Change the anonymous author name. | |
* | |
* @param string $author_meta The value of the metadata. | |
* @param int $user_id The user ID. | |
* | |
* @return string | |
*/ |
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
<?php | |
/** | |
* Change quantity of featured ads displayed in slider. | |
* | |
* @param array $args | |
* | |
* @return array | |
*/ | |
function childtheme_gimme_more_featured_ads( $args ) { |
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
<?php | |
/** | |
* Don't show saved Custom Form field on frontend. | |
* | |
* @param object $field | |
* @param object $post | |
* @param string $location | |
* | |
* @return object|bool |
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
/** | |
* Dequeue language bar tooltip. | |
* | |
* @return void | |
*/ | |
function childtheme_dequeue_lang_bar_tooltip() { | |
wp_dequeue_script( 'langbf_tooltip' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'childtheme_dequeue_lang_bar_tooltip', 11 ); |
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
/** | |
* Adds 'more [store name] coupons' text on singular coupon page. | |
* | |
* @param string $content | |
* | |
* @return string | |
*/ | |
function childtheme_store_more_after_content( $content ) { | |
global $post; |
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
/** | |
* Strip all HTML tags from user profile description field. | |
* | |
* @param int $user_id | |
* | |
* @return void | |
*/ | |
function childtheme_strip_html_from_user_profile_description( $user_id ) { | |
if ( ! isset( $_POST['description'] ) ) { | |
return; |
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
/** | |
* Mark description field as not required. | |
* | |
* @param object $result | |
* @param object $post | |
* | |
* @return object | |
*/ | |
function childtheme_make_description_not_required( $result, $post ) { | |
if ( $result->field_name == 'post_content' ) { |
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
<?php | |
function childtheme_custom_forms_textarea_sanitize( $form, $form_id ) { | |
foreach ( $form as $key => $field ) { | |
if ( 'textarea' == $field['type'] ) { | |
$form[ $key ]['sanitize'] = 'wp_kses_post'; | |
} | |
} |
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
<?php | |
function childtheme_set_tag_cloud_items_number( $args ) { | |
// set number of tags you would like to display in the WP Tags Cloud widget | |
$args['number'] = 69; | |
return $args; | |
} | |
add_filter( 'widget_tag_cloud_args', 'childtheme_set_tag_cloud_items_number', 10, 1 ); |
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
<?php | |
/** | |
* Class that validate and retrieve data from PESEL number in object-oriented style | |
* | |
* Example: | |
* $pesel = new Pesel('85042510356'); | |
* $pesel->getBirthday()->format("d-m-Y") | |
* $pesel->getSex() | |
* $pesel->getAge("%a") |
NewerOlder