← Back
Editing: seo-schema-persistence.php
<?php // MU Plugin to persist schema injection after main plugin is deactivated add_action('wp_head', function() { if (is_front_page() || is_home()) { $schema = get_option('seo_setup_generated_schema'); if (!empty($schema)) echo $schema; } elseif (is_singular()) { $post_id = get_the_ID(); if (!$post_id) return; $schema = get_post_meta($post_id, 'seo_setup_generated_schema', true); if (!empty($schema)) echo $schema; } }, 1);
Save File
Cancel