| @@ -76,30 +76,13 @@ | ||
| 76 | 76 | * |
| 77 | 77 | * Retrieve the theme. |
| 78 | 78 | * |
| 79 | 79 | * @since 1.0.0 |
| 80 | - * @deprecated 3.1.0 Use `get_theme()` method instead. | |
| 81 | 80 | * @access protected |
| 82 | 81 | * |
| 83 | 82 | * @return \WP_Theme WordPress theme object. |
| 84 | 83 | */ |
| 85 | 84 | protected function _get_theme() { |
| 86 | - Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation->deprecated_function( __METHOD__, '3.1.0', 'get_theme()' ); | |
| 87 | - | |
| 88 | - return $this->get_theme(); | |
| 89 | - } | |
| 90 | - | |
| 91 | - /** | |
| 92 | - * Get theme. | |
| 93 | - * | |
| 94 | - * Retrieve the theme. | |
| 95 | - * | |
| 96 | - * @since 3.1.0 | |
| 97 | - * @access private | |
| 98 | - * | |
| 99 | - * @return \WP_Theme WordPress theme object. | |
| 100 | - */ | |
| 101 | - private function get_theme() { | |
| 102 | 85 | if ( is_null( $this->theme ) ) { |
| 103 | 86 | $this->theme = wp_get_theme(); |
| 104 | 87 | } |
| 105 | 88 | return $this->theme; |
| @@ -115,9 +98,9 @@ | ||
| 115 | 98 | * |
| 116 | 99 | * @return \WP_Theme|false WordPress theme object, or false if the current theme is not a child theme. |
| 117 | 100 | */ |
| 118 | 101 | protected function get_parent_theme() { |
| 119 | - return $this->get_theme()->parent(); | |
| 102 | + return $this->_get_theme()->parent(); | |
| 120 | 103 | } |
| 121 | 104 | |
| 122 | 105 | /** |
| 123 | 106 | * Get theme name. |
| @@ -134,9 +117,9 @@ | ||
| 134 | 117 | * } |
| 135 | 118 | */ |
| 136 | 119 | public function get_name() { |
| 137 | 120 | return [ |
| 138 | - 'value' => $this->get_theme()->get( 'Name' ), | |
| 121 | + 'value' => $this->_get_theme()->get( 'Name' ), | |
| 139 | 122 | ]; |
| 140 | 123 | } |
| 141 | 124 | |
| 142 | 125 | /** |
| @@ -154,9 +137,9 @@ | ||
| 154 | 137 | * } |
| 155 | 138 | */ |
| 156 | 139 | public function get_author() { |
| 157 | 140 | return [ |
| 158 | - 'value' => $this->get_theme()->get( 'Author' ), | |
| 141 | + 'value' => $this->_get_theme()->get( 'Author' ), | |
| 159 | 142 | ]; |
| 160 | 143 | } |
| 161 | 144 | |
| 162 | 145 | /** |
| @@ -174,9 +157,9 @@ | ||
| 174 | 157 | * } |
| 175 | 158 | */ |
| 176 | 159 | public function get_version() { |
| 177 | 160 | return [ |
| 178 | - 'value' => $this->get_theme()->get( 'Version' ), | |
| 161 | + 'value' => $this->_get_theme()->get( 'Version' ), | |
| 179 | 162 | ]; |
| 180 | 163 | } |
| 181 | 164 | |
| 182 | 165 | /** |
| @@ -202,11 +185,11 @@ | ||
| 202 | 185 | ]; |
| 203 | 186 | |
| 204 | 187 | if ( ! $is_child_theme ) { |
| 205 | 188 | $result['recommendation'] = sprintf( |
| 206 | - /* translators: %s: WordPress child themes documentation. */ | |
| 207 | - __( 'If you want to modify the source code of your theme, we recommend using a <a href="%s">child theme</a>.', 'elementor' ), | |
| 208 | - 'https://go.elementor.com/wordpress-child-themes/' | |
| 189 | + /* translators: %s: Codex URL */ | |
| 190 | + _x( 'If you want to modify the source code of your theme, we recommend using a <a href="%s">child theme</a>.', 'System Info', 'elementor' ), | |
| 191 | + 'https://codex.wordpress.org/Child_Themes' | |
| 209 | 192 | ); |
| 210 | 193 | } |
| 211 | 194 | |
| 212 | 195 | return $result; |