• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / dff4c17b297ab0115178c38a2b7606a73464e56e

28 May 2024 08:36AM UTC coverage: 48.313% (-4.4%) from 52.735%
dff4c17b297ab0115178c38a2b7606a73464e56e

push

github

vraja-pro
remove unused import

7359 of 13368 branches covered (55.05%)

Branch coverage included in aggregate %.

24962 of 53531 relevant lines covered (46.63%)

41960.62 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/admin/import/plugins/class-import-seo-framework.php
1
<?php
2
/**
3
 * File with the class to handle data from SEO Framework.
4
 *
5
 * @package WPSEO\Admin\Import\Plugins
6
 */
7

8
/**
9
 * Class with functionality to import & clean SEO Framework post metadata.
10
 */
11
class WPSEO_Import_SEO_Framework extends WPSEO_Plugin_Importer {
12

13
        /**
14
         * The plugin name.
15
         *
16
         * @var string
17
         */
18
        protected $plugin_name = 'The SEO Framework';
19

20
        /**
21
         * Meta key, used in SQL LIKE clause for delete query.
22
         *
23
         * @var string
24
         */
25
        protected $meta_key = '_genesis_%';
26

27
        /**
28
         * Array of meta keys to detect and import.
29
         *
30
         * @var array
31
         */
32
        protected $clone_keys = [
33
                [
34
                        'old_key' => '_genesis_description',
35
                        'new_key' => 'metadesc',
36
                ],
37
                [
38
                        'old_key' => '_genesis_title',
39
                        'new_key' => 'title',
40
                ],
41
                [
42
                        'old_key' => '_genesis_noindex',
43
                        'new_key' => 'meta-robots-noindex',
44
                ],
45
                [
46
                        'old_key' => '_genesis_nofollow',
47
                        'new_key' => 'meta-robots-nofollow',
48
                ],
49
                [
50
                        'old_key' => '_genesis_canonical_uri',
51
                        'new_key' => 'canonical',
52
                ],
53
                [
54
                        'old_key' => '_open_graph_title',
55
                        'new_key' => 'opengraph-title',
56
                ],
57
                [
58
                        'old_key' => '_open_graph_description',
59
                        'new_key' => 'opengraph-description',
60
                ],
61
                [
62
                        'old_key' => '_social_image_url',
63
                        'new_key' => 'opengraph-image',
64
                ],
65
                [
66
                        'old_key' => '_twitter_title',
67
                        'new_key' => 'twitter-title',
68
                ],
69
                [
70
                        'old_key' => '_twitter_description',
71
                        'new_key' => 'twitter-description',
72
                ],
73
        ];
74

75
        /**
76
         * Removes all the metadata set by the SEO Framework plugin.
77
         *
78
         * @return bool
79
         */
80
        protected function cleanup() {
×
81
                $set1 = parent::cleanup();
×
82

83
                $this->meta_key = '_social_image_%';
×
84
                $set2           = parent::cleanup();
×
85

86
                $this->meta_key = '_twitter_%';
×
87
                $set3           = parent::cleanup();
×
88

89
                $this->meta_key = '_open_graph_%';
×
90
                $set4           = parent::cleanup();
×
91

92
                return ( $set1 || $set2 || $set3 || $set4 );
×
93
        }
94
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc