PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / trunk
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF vtrunk
2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / libs / factory / core / includes / components / class-delete-component-button.php
robin-image-optimizer / libs / factory / core / includes / components Last commit date
class-delete-component-button.php 5 months ago class-install-component-button.php 5 months ago
class-delete-component-button.php
52 lines
1 <?php
2
3 namespace WBCR\Factory_600\Components;
4
5 /**
6 * This file groups the settings for quick setup
7 *
8 * @version 1.0
9 */
10
11 // Exit if accessed directly
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 require_once 'class-install-component-button.php';
17
18 class Delete_Button extends Install_Button {
19
20 public $plugin;
21
22 /**
23 * @throws \Exception
24 */
25 protected function build_wordpress() {
26 parent::build_wordpress();
27
28 $this->action = 'delete';
29 $this->add_data( 'plugin-action', $this->action );
30 $this->remove_class( 'button-primary' );
31 }
32
33 protected function build_internal() {
34 // nothing
35 }
36
37 /**
38 * @param bool $echo
39 *
40 * @return string|void
41 */
42 public function get_button() {
43 $button = '<a href="#" class="' . implode( ' ', $this->get_classes() ) . '" ' . implode( ' ', $this->get_data() ) . '><span class="dashicons dashicons-trash"></span></a>';
44
45 if ( $this->type == 'internal' || ! $this->is_plugin_install() || $this->is_plugin_activate() ) {
46 $button = '';
47 }
48
49 return $button;
50 }
51 }
52