Type: php
Disable WPCode Conversion Pixels addon global scripts
add_filter( ‘wpcode_get_snippets_for_location’, function ( $snippets, $location ) { if ( ‘site_wide_header’ !== $location ) { return $snippets; } foreach ( $snippets as $key => $snippet ) { if ( ! is_int( $snippet->id ) && false !== strpos( $snippet->id, ‘pixel_’ )…Continue reading
MPS Intercom Widget
featured-images-rss-feed
function featuredtoRSS($content) { global $post; if ( has_post_thumbnail( $post->ID ) ){ $content = '<div>' . get_the_post_thumbnail( $post->ID, 'large', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content; } return $content; } add_filter('the_excerpt_rss', 'featuredtoRSS'); add_filter('the_content_feed', 'featuredtoRSS');Continue reading
Add Portal to Queue List Button for Event Update Cron WORKS!!!
/** * A WPCode Snippet that creates a shortcode to display a form * that allows changing the ACF field “eios-queue” and saving the post. */ // Shortcode to be used in the post/page content add_shortcode(‘change_eios_queue_form’, ‘display_change_eios_queue_form’); function display_change_eios_queue_form() {…Continue reading
Disable Suggested Donation Description In Campaign (Legacy)
add_filter( ‘charitable_sanitize_suggested_amount_description’, ‘charitable_disable_sanitize_suggested_amount_description’ ); function charitable_disable_sanitize_suggested_amount_description() { return false; }Continue reading
Disable Author User Routes
add_filter(‘rest_endpoints’, function ($endpoints) { if (isset($endpoints[‘/wp/v2/users’])) { unset($endpoints[‘/wp/v2/users’]); } return $endpoints; }); add_action(‘template_redirect’, function () { if (is_author()) { wp_redirect(home_url(), 301); exit; } });Continue reading
Disable Author User Routes
add_filter(‘rest_endpoints’, function ($endpoints) { if (isset($endpoints[‘/wp/v2/users’])) { unset($endpoints[‘/wp/v2/users’]); } return $endpoints; }); add_action(‘template_redirect’, function () { if (is_author()) { wp_redirect(home_url(), 301); exit; } });Continue reading
Duplicate Post/Page Link
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
Enable Legacy Email Templates
/** * Revert to legacy ‘HTML’ email template, v1.8.4 and below * * @link https://wpforms.com/developers/how-to-enable-legacy-email-template/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ $settings = (array) get_option( ‘wpforms_settings’, [] ); $settings[ ’email-template’ ] = ‘default’; update_option( ‘wpforms_settings’, $settings );Continue reading