add_action( ‘init’, function() { if ( ! class_exists( ‘\EDD\Emails\Types\Email’ ) ) { return; } /** * The PreApproved email class. * * This is sent to customers as their ‘preapproved payment confirmation’. */ class EDDWP_PreApproved_Email extends \EDD\Emails\Types\Email { /** *…Continue reading
// Quick and easy way to insert taxonomy terms // We can quickly insert the terms and let WordPress do it under the hood by default however it knows best. // Here is a simple example: // $terms = […Continue reading
// Quick and easy way to insert taxonomy terms // We can quickly insert the terms and let WordPress do it under the hood by default however it knows best. // Here is a simple example: // $terms = […Continue reading
// WP Docs: https://developer.wordpress.org/reference/functions/register_post_type/#parameters // Reference: https://zerowp.com/modify-cpt-arguments-after-it-was-registered/ // Example below: add_action(‘register_post_type_args’, function ($args, $postType) { if ($postType !== ‘book’){ return $args; } $args[‘show_in_rest’] = true; $args[‘public’] = true; return $args; }, 99, 2);Continue reading
// WP Docs: https://developer.wordpress.org/reference/functions/register_post_type/#parameters // Reference: https://zerowp.com/modify-cpt-arguments-after-it-was-registered/ // Example below: add_action(‘register_post_type_args’, function ($args, $postType) { if ($postType !== ‘book’){ return $args; } $args[‘show_in_rest’] = true; $args[‘public’] = true; return $args; }, 99, 2);Continue reading
// function grid_query_related_posts( $query_args, $grid_id ) { // global $post; // if ( 155 !== $grid_id ) { // return $query_args; // } // $taxonomy = ‘vendor-category’; // $post_id = wp_doing_ajax() ? url_to_postid( wp_get_referer() ) : $post->ID; // $terms =…Continue reading
add_filter( ‘eawp_excerpt’, function($content) { return the_content(); }, 10,1);Continue reading
// add this snippet to functions.php in your theme add_filter( ‘charitable_active_gateways’, ‘charitable_change_gateways_per_campaign’, 10, 1 ); function charitable_change_gateways_per_campaign( $gateways ) { global $post; // $gateways will be an array similar to this: // [offline] => Charitable_Gateway_Offline // [stripe] => Charitable_Gateway_Stripe_AM if…Continue reading
add_filter( ‘wfea_api_results’, // hook to filter returned event data before display /** * @param $events * @param $atts * * @return mixed * @throws Exception */ function ( $events, $atts ) { if ( ! in_array( $atts[‘layout’], array( ‘cal_list’, ‘cal’…Continue reading