| 1 |
<?php |
| 2 |
/** |
| 3 |
* File with the class to handle data from Ultimate SEO. |
| 4 |
* |
| 5 |
* @package WPSEO\Admin\Import\Plugins |
| 6 |
*/ |
| 7 |
|
| 8 |
/** |
| 9 |
* Class with functionality to import & clean Ultimate SEO post metadata. |
| 10 |
*/ |
| 11 |
class WPSEO_Import_Ultimate_SEO extends WPSEO_Plugin_Importer { |
| 12 |
|
| 13 |
/** |
| 14 |
* The plugin name. |
| 15 |
* |
| 16 |
* @var string |
| 17 |
*/ |
| 18 |
protected $plugin_name = 'Ultimate SEO'; |
| 19 |
|
| 20 |
/** |
| 21 |
* Meta key, used in SQL LIKE clause for delete query. |
| 22 |
* |
| 23 |
* @var string |
| 24 |
*/ |
| 25 |
protected $meta_key = '_su_%'; |
| 26 |
|
| 27 |
/** |
| 28 |
* Array of meta keys to detect and import. |
| 29 |
* |
| 30 |
* @var array |
| 31 |
*/ |
| 32 |
protected $clone_keys = [ |
| 33 |
[ |
| 34 |
'old_key' => '_su_description', |
| 35 |
'new_key' => 'metadesc', |
| 36 |
], |
| 37 |
[ |
| 38 |
'old_key' => '_su_title', |
| 39 |
'new_key' => 'title', |
| 40 |
], |
| 41 |
[ |
| 42 |
'old_key' => '_su_og_title', |
| 43 |
'new_key' => 'opengraph-title', |
| 44 |
], |
| 45 |
[ |
| 46 |
'old_key' => '_su_og_description', |
| 47 |
'new_key' => 'opengraph-description', |
| 48 |
], |
| 49 |
[ |
| 50 |
'old_key' => '_su_og_image', |
| 51 |
'new_key' => 'opengraph-image', |
| 52 |
], |
| 53 |
[ |
| 54 |
'old_key' => '_su_meta_robots_noindex', |
| 55 |
'new_key' => 'meta-robots-noindex', |
| 56 |
'convert' => [ 'on' => 1 ], |
| 57 |
], |
| 58 |
[ |
| 59 |
'old_key' => '_su_meta_robots_nofollow', |
| 60 |
'new_key' => 'meta-robots-nofollow', |
| 61 |
'convert' => [ 'on' => 1 ], |
| 62 |
], |
| 63 |
]; |
| 64 |
} |
| 65 |
|