PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.17
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.17
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmInstallPlugin.php +0 -10 6.266.17 View file →
@@ -19,11 +19,8 @@
19 19 * @var string
20 20 */
21 21 protected $plugin_slug;
22 22
23 - /**
24 - * @param array $atts
25 - */
26 23 public function __construct( $atts ) {
27 24 $this->plugin_file = $atts['plugin_file'];
28 25 list( $slug, $file ) = explode( '/', $this->plugin_file );
29 26 $this->plugin_slug = $slug;
@@ -28,11 +25,8 @@
28 25 list( $slug, $file ) = explode( '/', $this->plugin_file );
29 26 $this->plugin_slug = $slug;
30 27 }
31 28
32 - /**
33 - * @return string
34 - */
35 29 public function get_activate_link() {
36 30 if ( $this->is_installed() && $this->is_active() ) {
37 31 return '';
38 32 }
@@ -104,13 +98,11 @@
104 98 'sections' => false,
105 99 ),
106 100 )
107 101 );
108 -
109 102 if ( is_wp_error( $api ) ) {
110 103 wp_send_json_error( $api->get_error_message() );
111 104 }
112 -
113 105 if ( ! FrmAddonsController::url_is_allowed( $api->versions['trunk'] ) ) {
114 106 wp_send_json_error( 'This download is not allowed' );
115 107 }
116 108
@@ -118,9 +110,8 @@
118 110 $upgrader = new Plugin_Upgrader( new WP_Ajax_Upgrader_Skin() );
119 111
120 112 // Install the plugin.
121 113 $result = $upgrader->install( $api->versions['trunk'] );
122 -
123 114 if ( is_wp_error( $result ) ) {
124 115 wp_send_json_error( $result->get_error_message() );
125 116 }
126 117
@@ -168,9 +159,8 @@
168 159 *
169 160 * @since 6.16
170 161 *
171 162 * @param string $plugin_file
172 - *
173 163 * @return bool
174 164 */
175 165 private static function is_plugin_installed( $plugin_file ) {
176 166 return isset( get_plugins()[ $plugin_file ] );