Completely Disable Comments (copy)

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading

Enqueue Isotope JS (PHP)

function enqueue_isotope() { wp_enqueue_script(‘isotope’, ‘https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js’, array(‘jquery’), ‘3.0.6’, true); } add_action(‘wp_enqueue_scripts’, ‘enqueue_isotope’);Continue reading

Bergwerk WordPress Baseline Config

/** * SEO Plugin Conflict Fixes * * Suppresses duplicate meta tags from themes/plugins when a proper * SEO plugin is active and in charge. Add new fixes as needed. */ /** * Check if Rank Math is active and…Continue reading

Charitable: Force PayPal Legacy gateway

/** * Charitable — Force PayPal Legacy gateway on this site. * * Overrides Charitable Pro 1.8.15+ PayPal tier detection at read-time * so the legacy `paypal` gateway stays visible (and PayPal Commerce stays * hidden) regardless of what was…Continue reading

Remove ISO 4217 for Google Feeds

// Force localization for all feeds add_filter(‘adt_product_feed_localize_price_args’, function($args) { $args[‘decimal_separator’] = ‘.’; $args[‘thousand_separator’] = ‘,’; return $args; }); add_filter(‘adt_pfp_localize_price_iso4217_feeds’, function($feeds) { // Remove all Google feeds from ISO4217 formatting return array_filter($feeds, function($feed) { return strpos($feed, ‘google_’) !== 0; }); });Continue reading

Remove ISO 4217 Format for specific feeds

//Google Feeds add_filter(‘adt_pfp_localize_price_iso4217_feeds’, function($feeds) { // Remove all Google feeds from ISO4217 formatting return array_filter($feeds, function($feed) { return strpos($feed, ‘google_’) !== 0; }); }); //Facebook Feeds add_filter(‘adt_pfp_localize_price_iso4217_feeds’, function($feeds) { // Remove all Facebook feeds from ISO4217 formatting return array_filter($feeds, function($feed)…Continue reading