admin_url('admin-ajax.php'), 'nonce' => wp_create_nonce('shadowsync_seo_scan_nonce'), ]); } public function register_meta_box() { add_meta_box( 'shadowsync_seo_meta_box', '⚡ ShadowSync SEO — SEO Settings', [$this, 'render_meta_box'], ['post', 'page'], 'normal', 'high' ); } public function render_meta_box($post) { wp_nonce_field('shadowsync_seo_save_meta', 'shadowsync_seo_meta_nonce'); $meta_title = get_post_meta($post->ID, '_shadowsync_seo_meta_title', true); $meta_desc = get_post_meta($post->ID, '_shadowsync_seo_meta_description', true); $focus_keyword = get_post_meta($post->ID, '_shadowsync_seo_focus_keyword', true); $social_title = get_post_meta($post->ID, '_shadowsync_seo_social_title', true); $social_desc = get_post_meta($post->ID, '_shadowsync_seo_social_description', true); $page_type = ShadowSync_SEO_Schema::get_type($post->ID, 'page'); $article_type = ShadowSync_SEO_Schema::get_type($post->ID, 'post'); $backup_time = get_post_meta($post->ID, '_shadowsync_seo_content_backup_time', true); if (empty($meta_title)) { $meta_title = get_the_title($post->ID); } $readability = []; $seo_analysis = []; if (!empty($post->post_content)) { $readability = $this->analyse_readability($post->post_content); $seo_analysis = $this->analyse_seo($post, $focus_keyword, $meta_title, $meta_desc); } ?>