PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 4.5.2
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v4.5.2
8.8.4 8.8.3 8.8.2 8.8.1 8.8.0 8.7.9 8.7.8 8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 All 540 releases
← All changes | qcld-recommendbot-plugin.php +55 -32 8.7.4 → 4.5.2 View file →
@@ -1,6 +1,11 @@
1 1 <?php
2 -if ( ! defined( 'ABSPATH' ) ) exit;
2 +if (defined('ABSPATH') === false) {
3 + exit;
4 +}
5 +
6 +?>
7 +<?php
3 8 require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
4 9 remove_all_filters('plugins_api');
5 10 $qcld_chatplugintags = array(
6 11 'a' => array(
@@ -62,17 +67,17 @@
62 67 }
63 68 $title = wp_kses( $plugin['name'], $qcld_chatplugintags );
64 69
65 70 // Remove any HTML from the description.
66 - $description = wp_strip_all_tags( $plugin['short_description'] );
71 + $description = strip_tags( $plugin['short_description'] );
67 72 $version = wp_kses( $plugin['version'], $qcld_chatplugintags );
68 73
69 - $name = wp_strip_all_tags( $title . ' ' . $version );
74 + $name = strip_tags( $title . ' ' . $version );
70 75
71 76 $author = wp_kses( $plugin['author'], $qcld_chatplugintags );
72 77 if ( ! empty( $author ) ) {
73 78 /* translators: %s: Plugin author. */
74 - $author = ' <cite>' . sprintf( __( 'By %s', 'chatbot' ), $author ) . '</cite>';
79 + $author = ' <cite>' . sprintf( __( 'By %s' ), $author ) . '</cite>';
75 80 }
76 81
77 82 $requires_php = isset( $plugin['requires_php'] ) ? $plugin['requires_php'] : null;
78 83 $requires_wp = isset( $plugin['requires'] ) ? $plugin['requires'] : null;
@@ -94,17 +99,16 @@
94 99 '<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
95 100 esc_attr( $plugin['slug'] ),
96 101 esc_url( $status['url'] ),
97 102 /* translators: %s: Plugin name and version. */
98 - esc_attr( sprintf( _x( 'Install %s now', 'Install plugin', 'chatbot' ), $name ) ),
99 -
103 + esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
100 104 esc_attr( $name ),
101 - __( 'Install Now', 'chatbot' )
105 + __( 'Install Now' )
102 106 );
103 107 } else {
104 108 $action_links[] = sprintf(
105 109 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
106 - __( 'Cannot Install', 'chatbot' )
110 + _x( 'Cannot Install', 'plugin' )
107 111 );
108 112 }
109 113 }
110 114 break;
@@ -117,17 +121,16 @@
117 121 esc_attr( $status['file'] ),
118 122 esc_attr( $plugin['slug'] ),
119 123 esc_url( $status['url'] ),
120 124 /* translators: %s: Plugin name and version. */
121 - esc_attr( sprintf( _x( 'Update %s now', 'Update plugin', 'chatbot' ), $name ) ),
122 -
125 + esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ),
123 126 esc_attr( $name ),
124 - __( 'Update Now', 'chatbot' )
127 + __( 'Update Now' )
125 128 );
126 129 } else {
127 130 $action_links[] = sprintf(
128 131 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
129 - __( 'Cannot Update', 'chatbot' )
132 + _x( 'Cannot Update', 'plugin' )
130 133 );
131 134 }
132 135 }
133 136 break;
@@ -136,14 +139,14 @@
136 139 case 'newer_installed':
137 140 if ( is_plugin_active( $status['file'] ) ) {
138 141 $action_links[] = sprintf(
139 142 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
140 - __( 'Active', 'chatbot' )
143 + _x( 'Active', 'plugin' )
141 144 );
142 145 } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) {
143 - $button_text = __( 'Activate', 'chatbot' );
146 + $button_text = __( 'Activate' );
144 147 /* translators: %s: Plugin name. */
145 - $button_label = _x( 'Activate %s', 'plugin name', 'chatbot' );
148 + $button_label = _x( 'Activate %s', 'plugin' );
146 149 $activate_url = add_query_arg(
147 150 array(
148 151 '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $status['file'] ),
149 152 'action' => 'activate',
@@ -152,11 +155,11 @@
152 155 network_admin_url( 'plugins.php' )
153 156 );
154 157
155 158 if ( is_network_admin() ) {
156 - $button_text = __( 'Network Activate', 'chatbot' );
159 + $button_text = __( 'Network Activate' );
157 160 /* translators: %s: Plugin name. */
158 - $button_label = _x( 'Network Activate %s', 'plugin name', 'chatbot' );
161 + $button_label = _x( 'Network Activate %s', 'plugin' );
159 162 $activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
160 163 }
161 164
162 165 $action_links[] = sprintf(
@@ -167,9 +170,9 @@
167 170 );
168 171 } else {
169 172 $action_links[] = sprintf(
170 173 '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
171 - _x( 'Installed', 'plugin status', 'chatbot' )
174 + _x( 'Installed', 'plugin' )
172 175 );
173 176 }
174 177 break;
175 178 }
@@ -178,10 +181,30 @@
178 181 $details_link = self_admin_url(
179 182 'plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] .
180 183 '&amp;width=700&amp;height=550'
181 184 );
182 - $action_links[] = sprintf( '%s','<a href="#" data-toggle="modal" data-target="#myModal">More Details</a><div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"><iframe width="100%" height="550" src="'.$details_link.'"></iframe></div></div></div></div>');
183 - /*===show icon ==*/
185 +
186 + $action_links[] = sprintf(
187 + '%s','
188 + <a href="#" data-toggle="modal" data-target="#myModal">More Details</a>
189 + <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
190 + <div class="modal-dialog" role="document">
191 + <div class="modal-content">
192 + <div class="modal-header">
193 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
194 + </div>
195 + <div class="modal-body">
196 + <iframe width="100%" height="550" src="'.$details_link.'"></iframe>
197 + </div>
198 + </div>
199 + </div>
200 + </div>',
201 + );
202 +
203 +
204 +
205 + /*===show icon ==*/
206 +
184 207 if ( ! empty( $plugin['icons']['svg'] ) ) {
185 208 $plugin_icon_url = $plugin['icons']['svg'];
186 209 } elseif ( ! empty( $plugin['icons']['2x'] ) ) {
187 210 $plugin_icon_url = $plugin['icons']['2x'];
@@ -189,8 +212,9 @@
189 212 $plugin_icon_url = $plugin['icons']['1x'];
190 213 } else {
191 214 $plugin_icon_url = $plugin['icons']['default'];
192 215 }
216 +
193 217 /*
194 218 * $action_links An array of plugin action links. Defaults are links to Details and Install Now.
195 219 * $plugin The plugin currently being listed.
196 220 */
@@ -202,14 +226,14 @@
202 226 <?php
203 227 if ( ! $compatible_php || ! $compatible_wp ) {
204 228 echo '<div class="notice inline notice-error notice-alt"><p>';
205 229 if ( ! $compatible_php && ! $compatible_wp ) {
206 - esc_html_e( 'This plugin doesn&#8217;t work with your versions of WordPress and PHP.', 'chatbot' );
230 + _e( 'This plugin doesn&#8217;t work with your versions of WordPress and PHP.' );
207 231 if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
208 232 printf(
209 233 /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
210 - '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.',
211 - esc_url( self_admin_url( 'update-core.php' ) ),
234 + ' ' . __( '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.' ),
235 + self_admin_url( 'update-core.php' ),
212 236 esc_url( wp_get_update_php_url() )
213 237 );
214 238 wp_update_php_annotation( '</p><p><em>', '</em>' );
215 239 } elseif ( current_user_can( 'update_core' ) ) {
@@ -214,34 +238,34 @@
214 238 wp_update_php_annotation( '</p><p><em>', '</em>' );
215 239 } elseif ( current_user_can( 'update_core' ) ) {
216 240 printf(
217 241 /* translators: %s: URL to WordPress Updates screen. */
218 - '<a href="%s">Please update WordPress</a>.',
219 - esc_url( self_admin_url( 'update-core.php' ) )
242 + ' ' . __( '<a href="%s">Please update WordPress</a>.' ),
243 + self_admin_url( 'update-core.php' )
220 244 );
221 245 } elseif ( current_user_can( 'update_php' ) ) {
222 246 printf(
223 247 /* translators: %s: URL to Update PHP page. */
224 - '<a href="%s">Learn more about updating PHP</a>.',
248 + ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
225 249 esc_url( wp_get_update_php_url() )
226 250 );
227 251 wp_update_php_annotation( '</p><p><em>', '</em>' );
228 252 }
229 253 } elseif ( ! $compatible_wp ) {
230 - esc_html_e( 'This plugin doesn&#8217;t work with your version of WordPress.', 'chatbot' );
254 + _e( 'This plugin doesn&#8217;t work with your version of WordPress.' );
231 255 if ( current_user_can( 'update_core' ) ) {
232 256 printf(
233 257 /* translators: %s: URL to WordPress Updates screen. */
234 - '<a href="%s">Please update WordPress</a>.',
235 - esc_url( self_admin_url( 'update-core.php' ) )
258 + ' ' . __( '<a href="%s">Please update WordPress</a>.' ),
259 + self_admin_url( 'update-core.php' )
236 260 );
237 261 }
238 262 } elseif ( ! $compatible_php ) {
239 - esc_html_e( 'This plugin doesn&#8217;t work with your version of PHP.', 'chatbot' );
263 + _e( 'This plugin doesn&#8217;t work with your version of PHP.' );
240 264 if ( current_user_can( 'update_php' ) ) {
241 265 printf(
242 266 /* translators: %s: URL to Update PHP page. */
243 - '<a href="%s">Learn more about updating PHP</a>.',
267 + ' ' . __( '<a href="%s">Learn more about updating PHP</a>.' ),
244 268 esc_url( wp_get_update_php_url() )
245 269 );
246 270 wp_update_php_annotation( '</p><p><em>', '</em>' );
247 271 }
@@ -260,9 +284,8 @@
260 284 </div>
261 285 <div class="action-links">
262 286 <?php
263 287 if ( $action_links ) {
264 - // phpcs:ignore
265 288 echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';
266 289 }
267 290 ?>
268 291 </div>