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

Yoast / wordpress-seo / dd6e866a9e6d253114633104d9e3858d807178ba

19 Jun 2024 10:03AM UTC coverage: 48.628% (-4.3%) from 52.936%
dd6e866a9e6d253114633104d9e3858d807178ba

push

github

web-flow
Merge pull request #21431 from Yoast/21429-update-copy-in-the-introduction-and-consent-modals

Updates the copy for the introduction and consent modals

7441 of 13454 branches covered (55.31%)

Branch coverage included in aggregate %.

0 of 3 new or added lines in 2 files covered. (0.0%)

3718 existing lines in 107 files now uncovered.

25100 of 53464 relevant lines covered (46.95%)

62392.47 hits per line

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

0.0
/admin/class-option-tab.php
1
<?php
2
/**
3
 * WPSEO plugin file.
4
 *
5
 * @package WPSEO\Admin\Options\Tabs
6
 */
7

8
/**
9
 * Class WPSEO_Option_Tab.
10
 */
11
class WPSEO_Option_Tab {
12

13
        /**
14
         * Name of the tab.
15
         *
16
         * @var string
17
         */
18
        private $name;
19

20
        /**
21
         * Label of the tab.
22
         *
23
         * @var string
24
         */
25
        private $label;
26

27
        /**
28
         * Optional arguments.
29
         *
30
         * @var array
31
         */
32
        private $arguments;
33

34
        /**
35
         * WPSEO_Option_Tab constructor.
36
         *
37
         * @param string $name      Name of the tab.
38
         * @param string $label     Localized label of the tab.
39
         * @param array  $arguments Optional arguments.
40
         */
41
        public function __construct( $name, $label, array $arguments = [] ) {
×
42
                $this->name      = sanitize_title( $name );
×
43
                $this->label     = $label;
×
44
                $this->arguments = $arguments;
×
45
        }
46

47
        /**
48
         * Gets the name.
49
         *
50
         * @return string The name.
51
         */
UNCOV
52
        public function get_name() {
×
UNCOV
53
                return $this->name;
×
54
        }
55

56
        /**
57
         * Gets the label.
58
         *
59
         * @return string The label.
60
         */
UNCOV
61
        public function get_label() {
×
UNCOV
62
                return $this->label;
×
63
        }
64

65
        /**
66
         * Retrieves whether the tab needs a save button.
67
         *
68
         * @return bool True whether the tabs needs a save button.
69
         */
UNCOV
70
        public function has_save_button() {
×
UNCOV
71
                return (bool) $this->get_argument( 'save_button', true );
×
72
        }
73

74
        /**
75
         * Retrieves whether the tab hosts beta functionalities.
76
         *
77
         * @return bool True whether the tab hosts beta functionalities.
78
         */
79
        public function is_beta() {
×
80
                return (bool) $this->get_argument( 'beta', false );
×
81
        }
82

83
        /**
84
         * Retrieves whether the tab hosts premium functionalities.
85
         *
86
         * @return bool True whether the tab hosts premium functionalities.
87
         */
88
        public function is_premium() {
×
89
                return (bool) $this->get_argument( 'premium', false );
×
90
        }
91

92
        /**
93
         * Gets the option group.
94
         *
95
         * @return string The option group.
96
         */
UNCOV
97
        public function get_opt_group() {
×
UNCOV
98
                return $this->get_argument( 'opt_group' );
×
99
        }
100

101
        /**
102
         * Retrieves the variable from the supplied arguments.
103
         *
104
         * @param string       $variable      Variable to retrieve.
105
         * @param string|mixed $default_value Default to use when variable not found.
106
         *
107
         * @return mixed|string The retrieved variable.
108
         */
109
        protected function get_argument( $variable, $default_value = '' ) {
×
110
                return array_key_exists( $variable, $this->arguments ) ? $this->arguments[ $variable ] : $default_value;
×
111
        }
112
}
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

© 2025 Coveralls, Inc