// 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_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
add_filter( ‘wfea_event_classes’, function ( $classes ) { return str_replace( ‘free’, ‘wfea__free’, $classes ); }, 10, 1 );Continue reading
add_filter( ‘wfea_cal_extra_js’, function ( $script, $args ) { $script = ‘ if ( typeof wfea_cal_extra_javascript == \’undefined\’ ) { var wfea_cal_extra_javascript = { eventRender: function (event, element) { let img = \’\’; if (event.imageurl) { img = \’\’; // prepend…Continue reading
add_filter(‘action_scheduler_retention_period’, function() { return 2 * DAY_IN_SECONDS; // two days });Continue reading
add_filter( ‘wcv_dashboard_quick_links’, ‘change_add_product_link’ ); /** * Change the add product link * * @param array $links The links. */ function change_add_product_link( $links ) { if ( isset( $links[‘product’] ) ) { $links[‘product’][‘url’] = ‘https://example.com/add-product/’; $links[‘product’][‘label’] = __( ‘Add Product’, ‘wc-vendors’…Continue reading
function my_plugin_kses( $html ) { $kses_defaults = wp_kses_allowed_html( ‘post’ ); $svg_args = array( ‘svg’ => array( ‘class’ => true, ‘aria-hidden’ => true, ‘aria-labelledby’ => true, ‘role’ => true, ‘xmlns’ => true, ‘fill’ => true, ‘width’ => true, ‘height’ => true,…Continue reading