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
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
add_filter( ‘aioseo_sitemap_rss’, ‘aioseo_filter_rss_sitemap_entries’ ); function aioseo_filter_rss_sitemap_entries( $entries ) { $entries = array_map( function ( $entry ) { if ( empty( $entry[‘pubDate’] ) ) { return $entry; } $dateTime = new DateTime(); $dateTime->setTimestamp( strtotime( $entry[‘pubDate’] ) ); $dateTime->setTimezone( new DateTimeZone( ‘Europe/Moscow’…Continue reading
add_filter( “aioseo_sitemap_post”, “aioseo_filter_sitemap_post”, 10, 2 ); function aioseo_filter_sitemap_post( $entry, $postId ) { if ( 10 === $postId ) { // Set the language code for the main URL. $entry[‘language’] = ‘en_US’ // Add the translated versions (language code + URL).…Continue reading