PluginProbe ʕ •ᴥ•ʔ
Disable Admin Notices – Hide Dashboard Notifications / trunk
Disable Admin Notices – Hide Dashboard Notifications vtrunk
1.4.5 trunk 1.0.0 1.0.2 1.0.3 1.0.5 1.0.6 1.1.1 1.1.3 1.1.4 1.2.0 1.2.2 1.2.3 1.2.4 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4
disable-admin-notices / libs / factory / core / includes / components / class-delete-component-button.php
disable-admin-notices / libs / factory / core / includes / components Last commit date
class-delete-component-button.php 1 year ago class-install-component-button.php 1 year ago
class-delete-component-button.php
58 lines
1 <?php
2
3 namespace WBCR\Factory_480\Components;
4
5 /**
6 * This file groups the settings for quick setup
7 *
8 * @author Webcraftic <wordpress.webraftic@gmail.com>
9 * @copyright (c) 16.09.2017, Webcraftic
10 * @version 1.0
11 */
12
13 // Exit if accessed directly
14 if( !defined('ABSPATH') ) {
15 exit;
16 }
17
18 require_once 'class-install-component-button.php';
19
20 class Delete_Button extends Install_Button {
21
22 public $plugin;
23
24 /**
25 * @throws \Exception
26 */
27 protected function build_wordpress()
28 {
29 parent::build_wordpress();
30
31 $this->action = 'delete';
32 $this->add_data('plugin-action', $this->action);
33 $this->remove_class('button-primary');
34 }
35
36 protected function build_internal()
37 {
38 // nothing
39 }
40
41 /**
42 * @param bool $echo
43 *
44 * @return string|void
45 */
46 public function get_button()
47 {
48 $button = '<a href="#" class="' . implode(' ', $this->get_classes()) . '" ' . implode(' ', $this->get_data()) . '><span class="dashicons dashicons-trash"></span></a>';
49
50 if( $this->type == 'internal' || !$this->is_plugin_install() || $this->is_plugin_activate() ) {
51 $button = '';
52 }
53
54 return $button;
55 }
56 }
57
58