function mepr_remove_pause_link( $output, $sub ) { if ( ’48’ == $sub->product_id ) { return; } return $output; } add_filter( ‘mepr_custom_pause_link’, ‘mepr_remove_pause_link’, 10, 2 );Continue reading
function mepr_account_links_shortcode() { $mepr_options = MeprOptions::fetch(); $account_url = $mepr_options->account_page_url(); $links = ‘ ‘; $links .= ‘ Home ‘; $links .= ‘ Subscriptions ‘; $links .= ‘ Payments ‘; $links .= ‘ Courses ‘; $links .= ‘ Logout ‘; $links .=…Continue reading
// Disable auto-update email notifications add_filter(‘auto_core_update_send_email’, ‘disable_auto_update_emails’, 10, 4); function disable_auto_update_emails($send, $type, $core_update, $result) { if ( !empty($type) && $type == ‘success’ ) { return false; } return true; } // Disable plugin and theme update email notifications add_filter(‘auto_plugin_update_send_email’, ‘__return_false’);…Continue reading
// WPBakery shortcode for the post excerpt with limited characters function vc_gitem_template_attribute_post_excerpt_with_link($value, $data) { extract(array_merge(array( ‘post’ => null, ‘data’ => ”, ), $data)); $excerpt = substr($post->post_content, 0, 150) . ‘…’; return ‘ ‘ . $excerpt . ‘ ‘; } add_filter(‘vc_gitem_template_attribute_vc_post_excerpt’,…Continue reading
// WPBakery shortcode for the post title with limited characters function vc_gitem_template_attribute_post_title_with_link($value, $data) { extract(array_merge(array( ‘post’ => null, ‘data’ => ”, ), $data)); $title = substr($post->post_title, 0, 70) . ‘…’; return ‘Continue reading
add_filter( “aioseo_user_profile_tab_disable”, “__return_true” );Continue reading
add_filter( ‘aioseo_user_profile_tab_allowed_user_ids’, ‘aioseo_profile_tab_allowed_users’, 10, 2 ); function aioseo_profile_tab_allowed_users( $user_ids, $user_id ) { if ( ! user_can( $user_id, ‘edit_posts’ ) ) { $user_ids[] = $user_id; } return $user_ids; }Continue reading
add_filter( ‘aioseo_twitter_tags’, ‘aioseo_filter_twitter_title’ ); function aioseo_filter_twitter_title( $twitterMeta ) { if ( is_singular() && ’14’ === get_the_ID() ) { $twitterMeta[‘twitter:title’] = “A different title”; } return $twitterMeta; }Continue reading
add_filter( “aioseo_sitemap_term”, “aioseo_filter_sitemap_term”, 10, 2 ); function aioseo_filter_sitemap_term( $entry, $termId ) { if ( 12 === $termId) { // Set the language code for the main URL. $entry[‘language’] = ‘en_US’ // Add the translated versions (language code + URL). $entry[‘languages’]…Continue reading