| @@ -35,15 +35,9 @@ | ||
| 35 | 35 | public function get_activate_link() { |
| 36 | 36 | if ( $this->is_installed() && $this->is_active() ) { |
| 37 | 37 | return ''; |
| 38 | 38 | } |
| 39 | - | |
| 40 | - if ( $this->is_installed() ) { | |
| 41 | - $url = $this->activate_url(); | |
| 42 | - } else { | |
| 43 | - $url = $this->install_url(); | |
| 44 | - } | |
| 45 | - return $url; | |
| 39 | + return $this->is_installed() ? $this->activate_url() : $this->install_url(); | |
| 46 | 40 | } |
| 47 | 41 | |
| 48 | 42 | /** |
| 49 | 43 | * @return bool |
| @@ -160,19 +154,6 @@ | ||
| 160 | 154 | wp_send_json_success(); |
| 161 | 155 | } else { |
| 162 | 156 | wp_send_json_error(); |
| 163 | 157 | } |
| 164 | - } | |
| 165 | - | |
| 166 | - /** | |
| 167 | - * Check if a plugin is installed. | |
| 168 | - * | |
| 169 | - * @since 6.16 | |
| 170 | - * | |
| 171 | - * @param string $plugin_file | |
| 172 | - * | |
| 173 | - * @return bool | |
| 174 | - */ | |
| 175 | - private static function is_plugin_installed( $plugin_file ) { | |
| 176 | - return isset( get_plugins()[ $plugin_file ] ); | |
| 177 | 158 | } |
| 178 | 159 | } |