← All changes
|
includes/admin/importers/class-rankmath-exporter.php
+1
-19
trunk
→
2.10.0
View file →
| @@ -285,14 +285,8 @@ | ||
| 285 | 285 | 'twitter_description' => $this->convert_template_variables($meta['rank_math_twitter_description'] ?? '', $post_id), |
| 286 | 286 | 'twitter_image' => $meta['rank_math_twitter_image'] ?? '', |
| 287 | 287 | 'primary_category' => (int) ($meta['rank_math_primary_category'] ?? 0), |
| 288 | 288 | 'schema_type' => $this->resolve_schema_type($meta), |
| 289 | - // WooCommerce product identifier. Rank Math keeps it in its | |
| 290 | - // own per-post meta; ThinkRank Pro reads the canonical field | |
| 291 | - // this maps to, so a migrating store keeps the identifier | |
| 292 | - // Google asks for instead of collecting a "missing | |
| 293 | - // identifier" warning on every product (#715). | |
| 294 | - 'product_identifier' => (string) ($meta['rank_math_gtin_code'] ?? ''), | |
| 295 | 289 | // Rank Math pillar content maps directly to ThinkRank pillar content. |
| 296 | 290 | 'pillar_content' => $this->normalize_pillar_content($meta['rank_math_pillar_content'] ?? ''), |
| 297 | 291 | ], |
| 298 | 292 | 'extended' => [ |
| @@ -1107,25 +1101,13 @@ | ||
| 1107 | 1101 | |
| 1108 | 1102 | // Rank Math token => ThinkRank Global SEO token (structure preserved). |
| 1109 | 1103 | $token_map = [ |
| 1110 | 1104 | '%name%' => '%author%', // Rank Math author display name token |
| 1111 | - // WooCommerce product variables. Rank Math lets a product title or | |
| 1112 | - // description carry the price, SKU and stock status; every one of | |
| 1113 | - // them used to be stripped by the pass below, so "Buy %title% for | |
| 1114 | - // %wc_price%" imported as "Buy %title% for" (#715). | |
| 1115 | - '%wc_price%' => '%price%', | |
| 1116 | - '%wc_sku%' => '%sku%', | |
| 1117 | - '%wc_shortdesc%' => '%short_description%', | |
| 1118 | - '%wc_brand%' => '%brand%', | |
| 1119 | 1105 | ]; |
| 1120 | 1106 | $template = str_replace(array_keys($token_map), array_values($token_map), $template); |
| 1121 | 1107 | |
| 1122 | 1108 | // Tokens ThinkRank's Global SEO engine resolves natively — keep as-is. |
| 1123 | - $supported = [ | |
| 1124 | - '%title%', '%sitename%', '%sep%', '%excerpt%', '%date%', '%modified%', '%author%', '%category%', | |
| 1125 | - // Resolved by Pattern_Resolver on a product, empty elsewhere. | |
| 1126 | - '%price%', '%sale_price%', '%sku%', '%stock_status%', '%short_description%', '%brand%', | |
| 1127 | - ]; | |
| 1109 | + $supported = ['%title%', '%sitename%', '%sep%', '%excerpt%', '%date%', '%modified%', '%author%', '%category%']; | |
| 1128 | 1110 | |
| 1129 | 1111 | // Strip any token ThinkRank cannot resolve so it does not render literally. |
| 1130 | 1112 | $template = preg_replace_callback( |
| 1131 | 1113 | '/%[a-z0-9_]+%/i', |