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 | |
/* | |
* Custom hook to change internationalized strings using php | |
* Add this to your child theme's functions.php file. | |
*/ | |
add_filter( | |
'gettext', | |
function ( | |
$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
<?php | |
// WooCommerce Product Title | |
add_filter( | |
'uc_carousel_product_title', | |
function ($title) { | |
// Add your logic to change the title string | |
$title = substr($title, 0, 9); | |
return $title; | |
}, |
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 | |
// Add this code to your child theme's function.php | |
// Filter to modify default post type args | |
add_filter('register_post_type_args', 'modify_faq_post_type_args', 10, 2); | |
/** | |
* Modify FAQ post type args to make them public and searchable | |
*/ |
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 | |
/** | |
* Text at the start of the pricing table. | |
* Mainly used for multi-plan pricing tables | |
*/ | |
add_filter( | |
'pricing_table_features_start', | |
function ( | |
// generated list item 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
/** On Freemius purchase complete **/ | |
jQuery(document).on( | |
"wpt-freemius-checkout", | |
function(event, response, handler_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
/** | |
* A filter used in the "Divi Gravity Form" module to programmatically change the | |
* gravity form ID for the divi module. | |
*/ | |
add_filter( | |
'wpt_divi_gravity_form_id', | |
function ( | |
$gravity_form_id, | |
$post_id | |
) { |
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 | |
// Add custom fields to Location post type | |
add_filter( | |
'mlsl_custom_fields', | |
function($fields, $container){ | |
// Add your custom fields by appending to $fields array | |
// Fields Documentation https://docs.carbonfields.net/ (version 3.3.2) | |
$fields[] = \Carbon_Fields\Field::make('text', 'my_custom_field', 'My Custom Field') |
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 | |
// Filter to override the categories meta html in the Divi "Post Type" Masonry Gallery | |
add_filter( | |
'wpt_masonry_gallery_post_item_categories_html', | |
function ( | |
$categories_html, | |
$post_item, | |
$post_categories, |
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 | |
// add this to your divi child theme | |
add_filter( | |
'uc_carousel_can_strip_slashes', | |
function ($strip_slashes) { | |
return false; | |
}, | |
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 | |
// Filter to change the ultimate carousel navigation button HTML. | |
// Add it to your functions.php file of your child theme | |
add_filter( | |
'uc_carousel_nav_button_html', | |
function ( | |
$html, | |
$nav_type |
NewerOlder