|
@@ 49-58 (lines=10) @@
|
| 46 |
|
/** |
| 47 |
|
* @return string |
| 48 |
|
*/ |
| 49 |
|
public function activateButton( array $plugin ) |
| 50 |
|
{ |
| 51 |
|
$actionUrl = self_admin_url( sprintf( 'options-general.php?page=%s&action=activate&plugin=%s', $this->app->id, $plugin['plugin'] )); |
| 52 |
|
return $this->button( sprintf( '%s %s', __( 'Activate', 'pollux' ), $plugin['name'] ), [ |
| 53 |
|
'data-name' => $plugin['name'], |
| 54 |
|
'data-plugin' => $plugin['plugin'], |
| 55 |
|
'data-slug' => $plugin['slug'], |
| 56 |
|
'href' => wp_nonce_url( $actionUrl, sprintf( 'activate-plugin_%s', $plugin['plugin'] )), |
| 57 |
|
]); |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
/** |
| 61 |
|
* @param string $title |
|
@@ 94-103 (lines=10) @@
|
| 91 |
|
/** |
| 92 |
|
* @return string |
| 93 |
|
*/ |
| 94 |
|
public function installButton( array $plugin ) |
| 95 |
|
{ |
| 96 |
|
$actionUrl = self_admin_url( sprintf( 'update.php?action=install-plugin&plugin=%s', $plugin['slug'] )); |
| 97 |
|
return $this->button( sprintf( '%s %s', __( 'Install', 'pollux' ), $plugin['name'] ), [ |
| 98 |
|
'data-name' => $plugin['name'], |
| 99 |
|
'data-plugin' => $plugin['plugin'], |
| 100 |
|
'data-slug' => $plugin['slug'], |
| 101 |
|
'href' => wp_nonce_url( $actionUrl, sprintf( 'install-plugin_%s', $plugin['slug'] )), |
| 102 |
|
]); |
| 103 |
|
} |
| 104 |
|
|
| 105 |
|
/** |
| 106 |
|
* @return string |
|
@@ 108-117 (lines=10) @@
|
| 105 |
|
/** |
| 106 |
|
* @return string |
| 107 |
|
*/ |
| 108 |
|
public function updateButton( array $plugin ) |
| 109 |
|
{ |
| 110 |
|
$actionUrl = self_admin_url( sprintf( 'update.php?action=upgrade-plugin&plugin=%s', $plugin['plugin'] )); |
| 111 |
|
return $this->button( sprintf( '%s %s', __( 'Update', 'pollux' ), $plugin['name'] ), [ |
| 112 |
|
'data-name' => $plugin['name'], |
| 113 |
|
'data-plugin' => $plugin['plugin'], |
| 114 |
|
'data-slug' => $plugin['slug'], |
| 115 |
|
'href' => wp_nonce_url( $actionUrl, sprintf( 'upgrade-plugin_%s', $plugin['plugin'] )), |
| 116 |
|
]); |
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
/** |
| 120 |
|
* @param string $string |