WordPress.com VIP platform specific
This document is for sites running on WordPress.com VIP.
WordPress.com comes with a bunch of useful features turned on by default, and most VIP sites make use of them every day. We also know that sites may want to disable some of these for various reasons, e.g. if you’re focused on performance and minimizing the number of assets loaded, you may want to disable any CSS/JS that would be loaded for features not in use.
We offer a number of helper functions to facilitate this:
wpcom_vip_disable_custom_customizer– disables the WordPress.com-specific Customizer and Custom Design
wpcom_vip_disable_devicepx_js– devicepx.js loads retina/HiDPI versions of certain files (Gravatars, etc) for devices that run at a higher resolution (such as smartphones). Using this function disables it.
wpcom_vip_disable_global_terms– remove your taxonomy from the global taxonomy array
wpcom_vip_disable_likes– disables Likes for Posts and Custom Post Types. Sharing can also be disabled from the Dashboard (Settings > Sharing).
wpcom_vip_remove_opensearch– disables rendering of the OpenSearch description documents at /osd.xml and /opensearch.xml
wpcom_vip_disable_sharing– disables Sharing in Posts and Pages
wpcom_vip_disable_sharing_resources– disables the CSS/JS involved in Sharing functions, powering things like smart buttons and share counts displayed alongside the buttons.
wpcom_vip_remove_playlist_styles– disables enqueuing of wp-mediaelement.css which is necessary for sites using Playlist shortcode
wpcom_vip_remove_mp6_styles– disables enqueuing f mp6-hacks.css stylesheet which adds backward compatibility for legacy .mp6 body classes
wpcom_vip_load_geolocation_styles_only_when_needed– Conditionally dequeues Geo Location stylesheets in case they are not needed. IE.: post is not actually using Geo Location
wpcom_vip_remove_bbpress2_staff_css– disables enqueueing of wpcom-bbpress-premium-themes.css stylesheet
Check out all of the helper functions available.