Location: everywhere
Upload font files to media library (copy)
add_filter( ‘upload_mimes’, function( $mimes ) { $mimes[‘woff’] = ‘application/x-font-woff’; $mimes[‘woff2’] = ‘application/x-font-woff2’; $mimes[‘ttf’] = ‘application/x-font-ttf’; $mimes[‘svg’] = ‘image/svg+xml’; $mimes[‘eot’] = ‘application/vnd.ms-fontobject’; return $mimes; } );Continue reading
Add ‘excerpt’ and ‘page-attributes’ Support to Locations Post Type
add_filter( ‘aioseo_local_business_post_type’, ‘aioseo_change_local_business_post_type’ ); function aioseo_change_local_business_post_type( $post_type ) { $post_type[‘supports’][] = ‘excerpt’; $post_type[‘supports’][] = ‘page-attributes’; return $post_type; }Continue reading
Add Shortcodes to the List of Conflicting Shortcodes
add_filter( ‘aioseo_conflicting_shortcodes’, ‘aioseo_filter_conflicting_shortcodes’ ); function aioseo_filter_conflicting_shortcodes( $conflictingShortcodes ) { $conflictingShortcodes = array_merge( $conflictingShortcodes, [ ‘WISDM Group Registration’ => ‘[wdm_group_users]’, ‘WISDM Quiz Reporting’ => ‘[wdm_quiz_statistics_details]’, ‘WISDM Course Review’ => ‘[rrf_course_review]’ ] ); return $conflictingShortcodes; }Continue reading
Disable Update Emails
// 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 [vc_post_excerpt]
// 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
Desactivar avisos nuevos usuarios
WPBakery Shortcode for the Post Title with Limited Characters [vc_post_title]
// 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
Untitled Snippet
Disable Gravatar Avatars
add_filter( ‘get_avatar’, function( $avatar, $id_or_email, $size, $default, $alt ) { return ”; // Return an empty string to disable the gravatar }, 10, 5 );Continue reading