| @@ -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( |
| @@ -70,9 +75,9 @@ | ||
| 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 | } |
| @@ -202,9 +205,9 @@ | ||
| 202 | 205 | <?php |
| 203 | 206 | if ( ! $compatible_php || ! $compatible_wp ) { |
| 204 | 207 | echo '<div class="notice inline notice-error notice-alt"><p>'; |
| 205 | 208 | if ( ! $compatible_php && ! $compatible_wp ) { |
| 206 | - esc_html_e( 'This plugin doesn’t work with your versions of WordPress and PHP.', 'chatbot' ); | |
| 209 | + esc_html_e( 'This plugin doesn’t work with your versions of WordPress and PHP.' ); | |
| 207 | 210 | if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) { |
| 208 | 211 | printf( |
| 209 | 212 | /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */ |
| 210 | 213 | '<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.', |
| @@ -226,9 +229,9 @@ | ||
| 226 | 229 | ); |
| 227 | 230 | wp_update_php_annotation( '</p><p><em>', '</em>' ); |
| 228 | 231 | } |
| 229 | 232 | } elseif ( ! $compatible_wp ) { |
| 230 | - esc_html_e( 'This plugin doesn’t work with your version of WordPress.', 'chatbot' ); | |
| 233 | + esc_html_e( 'This plugin doesn’t work with your version of WordPress.' ); | |
| 231 | 234 | if ( current_user_can( 'update_core' ) ) { |
| 232 | 235 | printf( |
| 233 | 236 | /* translators: %s: URL to WordPress Updates screen. */ |
| 234 | 237 | '<a href="%s">Please update WordPress</a>.', |
| @@ -235,9 +238,9 @@ | ||
| 235 | 238 | esc_url( self_admin_url( 'update-core.php' ) ) |
| 236 | 239 | ); |
| 237 | 240 | } |
| 238 | 241 | } elseif ( ! $compatible_php ) { |
| 239 | - esc_html_e( 'This plugin doesn’t work with your version of PHP.', 'chatbot' ); | |
| 242 | + esc_html_e( 'This plugin doesn’t work with your version of PHP.' ); | |
| 240 | 243 | if ( current_user_can( 'update_php' ) ) { |
| 241 | 244 | printf( |
| 242 | 245 | /* translators: %s: URL to Update PHP page. */ |
| 243 | 246 | '<a href="%s">Learn more about updating PHP</a>.', |