Location: everywhere
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
Disable Post Formats
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘post-formats’ ); }, 11 );Continue reading
Disable Categories and Tags
add_action(‘init’, function() { unregister_taxonomy_for_object_type(‘category’, ‘post’); unregister_taxonomy_for_object_type(‘post_tag’, ‘post’); });Continue reading
Restore the Customize Submenu
add_action( ‘customize_register’, ‘__return_true’ );Continue reading
Disable Auto-Scaling Oversized Images
add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading
Disable WordPress REST API for visitors
add_filter( ‘rest_authentication_errors’, function( $result ) { if ( ! empty( $result ) ) { return $result; } if ( ! is_user_logged_in() ) { return new WP_Error( ‘rest_disabled’, __( ‘The WordPress REST API has been disabled.’ ), array( ‘status’ => 401…Continue reading
Template: After Order Actions
/* * Process non-critical tasks after an order has been completed. * * This runs ~30 seconds after a purchase is completed via WP_Cron. * * @param int $order_id The Order ID that was marked as completed. * @param \EDD\Orders\Order…Continue reading