Plugin Directory

Changeset 3415522


Ignore:
Timestamp:
12/09/2025 02:33:11 PM (4 months ago)
Author:
domainsupport
Message:

Tagging version 1.6.2

Location:
remove-powered-by-wp
Files:
3 edited
6 copied

Legend:

Unmodified
Added
Removed
  • remove-powered-by-wp/tags/1.6.2/includes/class-rpbw-common.php

    r2986672 r3415522  
    11<?php
    22/*
    3  * Version: 1.3.9
     3 * Version: 1.4
    44 */
    55
     
    4343        public static function plugin_text_domain() {
    4444
    45             return self::$plugin_text_domain;
     45            return 'remove-powered-by-wp';
    4646
    4747        }
     
    6161        public static function support_url() {
    6262
    63             return 'https://wordpress.org/support/plugin/' . self::$plugin_text_domain . '/';
     63            return 'https://wordpress.org/support/plugin/' . 'remove-powered-by-wp' . '/';
    6464
    6565        }
     
    6767        public static function control_upgrade_text() {
    6868
    69             $upgrade_text = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name) . '</a>';
     69/* translators: name of the plugin */
     70            $upgrade_text = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name) . '</a>';
    7071
    7172            if (!class_exists(self::$plugin_premium_class) || !get_option(self::$plugin_prefix . '_purchased')) {
     
    7374                if (!class_exists(self::$plugin_premium_class)) {
    7475
    75                     $upgrade_text .= sprintf(wp_kses(__(' or <a href="%s" title="Download Free Trial">trial it for 7 days</a>', self::$plugin_text_domain), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::premium_link()));
     76/* translators: link to the premium upgrade */
     77                    $upgrade_text .= sprintf(wp_kses(__(' or <a href="%s" title="Download Free Trial">trial it for 7 days</a>', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::premium_link()));
    7678
    7779                }
     
    8587        public static function control_section_description() {
    8688
    87             $default_description = sprintf(wp_kses(__('If you have any requests for new features, please <a href="%s" title="Support Forum">let us know in the support forum</a>.', self::$plugin_text_domain), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::support_url()));
     89/* translators: link to the plugin's support forum */
     90            $default_description = sprintf(wp_kses(__('If you have any requests for new features, please <a href="%s" title="Support Forum">let us know in the support forum</a>.', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::support_url()));
    8891
    8992            if (self::$plugin_premium_class) {
     
    9598                    if (!class_exists(self::$plugin_premium_class)) {
    9699
    97                         $section_description = '<strong>' . __('For even more options', self::$plugin_text_domain) . '</strong>' . ' ' . $upgrade_text;
     100                        $section_description = '<strong>' . __('For even more options', 'remove-powered-by-wp') . '</strong>' . ' ' . $upgrade_text;
    98101
    99102                    } else {
    100103
    101                         $section_description = '<strong>' . __('To keep using premium options', self::$plugin_text_domain) . '</strong>' . ' ' . $upgrade_text;
     104                        $section_description = '<strong>' . __('To keep using premium options', 'remove-powered-by-wp') . '</strong>' . ' ' . $upgrade_text;
    102105
    103106                    }
     
    119122                $section_description .= ' ' . sprintf(
    120123                    wp_kses(
     124/* translators: link to plugin install page */
    121125                        __(
    122126                            '<strong>To reset this section of options to default settings</strong> without affecting other sections in the customizer, install <a href="%s" title="Reset Customizer">Reset Customizer</a>.',
    123                             self::$plugin_text_domain
     127                            'remove-powered-by-wp'
    124128                        ),
    125129                        array('strong' => array(), 'a' => array('href' => array(), 'title' => array()))
     
    145149        public static function control_setting_upgrade_nag() {
    146150
    147             $upgrade_nag = self::control_upgrade_text() . __(' to use this option.', self::$plugin_text_domain);
     151            $upgrade_nag = self::control_upgrade_text() . __(' to use this option.', 'remove-powered-by-wp');
    148152
    149153            return $upgrade_nag;
     
    234238
    235239                $generated_css = sprintf('%s { %s: %s; }', $selector, $style, $prefix.$mod.$postfix);
    236                 echo $generated_css;
     240                echo wp_kses($generated_css, 'strip');
    237241
    238242            } elseif ($mod) {
    239243
    240244                $generated_css = sprintf('%s { %s:%s; }', $selector, $style, $prefix.$value.$postfix);
    241                 echo $generated_css;
     245                echo wp_kses($generated_css, 'strip');
    242246
    243247            }
     
    249253            if (self::$plugin_premium_class) {
    250254
    251                 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'], 'https://webd.uk/product/' . self::$plugin_text_domain . '-upgrade/');
    252 
     255                if (isset($_SERVER['HTTP_HOST'])) {
     256
     257                    return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . filter_var(wp_unslash($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL)), 'https://webd.uk/product/' . 'remove-powered-by-wp' . '-upgrade/');
     258
     259                } else {
     260
     261                    return 'https://webd.uk/product/' . 'remove-powered-by-wp' . '-upgrade/';
     262
     263                }
    253264
    254265            } else {
     
    276287            $settings_links = array();
    277288
    278             $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', self::$plugin_text_domain)) . '">' . __('Settings', self::$plugin_text_domain) . '</a>';
     289            $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', 'remove-powered-by-wp')) . '">' . __('Settings', 'remove-powered-by-wp') . '</a>';
    279290
    280291            if (!get_option(self::$plugin_prefix . '_purchased')) {
     
    284295                    if (self::$plugin_upgrade) {
    285296
    286                         $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>';
     297/* translators: name of the plugin */
     298                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', 'remove-powered-by-wp'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'remove-powered-by-wp') . '</a>';
    287299
    288300                    } else {
    289301
    290                         $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>';
     302/* translators: name of the plugin */
     303                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', 'remove-powered-by-wp'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'remove-powered-by-wp') . '</a>';
    291304
    292305                    }
     
    294307                } else {
    295308
    296                     $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name) : sprintf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', self::$plugin_text_domain) : __('Support Us', self::$plugin_text_domain)) . '</a>';
     309/* translators: name of the plugin */
     310                    $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name) : sprintf(__('Contribute to %s', 'remove-powered-by-wp'), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', 'remove-powered-by-wp') : __('Support Us', 'remove-powered-by-wp')) . '</a>';
    297311
    298312                }
     
    300314                if ($premium) {
    301315
    302                     $settings_links[] = '<a href="' . wp_nonce_url('?activate-' . self::$plugin_prefix . '=true', self::$plugin_prefix . '_activate') . '" id="' . self::$plugin_prefix . '_activate_upgrade" title="' . esc_attr(__('Activate Purchase', self::$plugin_text_domain)) . '" onclick="jQuery(this).append(&#39; <img src=&#34;/wp-admin/images/loading.gif&#34; style=&#34;float: none; width: auto; height: auto;&#34; />&#39;); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', self::$plugin_text_domain) . '</a>';
    303 
    304                 } elseif (self::$plugin_trial && !is_plugin_active(self::$plugin_text_domain . '-premium/' . self::$plugin_text_domain . '-premium.php')) {
    305 
    306                     $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', self::$plugin_text_domain), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', self::$plugin_text_domain) . '</a>';
     316                    $settings_links[] = '<a href="' . wp_nonce_url('?activate-' . self::$plugin_prefix . '=true', self::$plugin_prefix . '_activate') . '" id="' . self::$plugin_prefix . '_activate_upgrade" title="' . esc_attr(__('Activate Purchase', 'remove-powered-by-wp')) . '" onclick="jQuery(this).append(&#39; <img src=&#34;/wp-admin/images/loading.gif&#34; style=&#34;float: none; width: auto; height: auto;&#34; />&#39;); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', 'remove-powered-by-wp') . '</a>';
     317
     318                } elseif (self::$plugin_trial && !is_plugin_active('remove-powered-by-wp' . '-premium/' . 'remove-powered-by-wp' . '-premium.php')) {
     319
     320/* translators: name of the plugin */
     321                    $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', 'remove-powered-by-wp'), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', 'remove-powered-by-wp') . '</a>';
    307322
    308323                }
     
    310325            } elseif ($premium) {
    311326
    312                 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', self::$plugin_text_domain) . '</strong>';
     327                $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', 'remove-powered-by-wp') . '</strong>';
    313328
    314329            }
     
    320335        public static function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) {
    321336
    322             if ($plugin_file === self::$plugin_text_domain . '/' . self::$plugin_text_domain . '.php') {
    323 
    324                 $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', self::$plugin_text_domain) . '" style="color: orange; font-weight: bold;">' . __('Need help?', self::$plugin_text_domain) . '</a>';
    325                 $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . self::$plugin_text_domain . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', self::$plugin_text_domain), self::$plugin_name)) . '">' . __('Review plugin', self::$plugin_text_domain) . '</a>';
     337            if ($plugin_file === 'remove-powered-by-wp' . '/' . 'remove-powered-by-wp' . '.php') {
     338
     339                $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', 'remove-powered-by-wp') . '" style="color: orange; font-weight: bold;">' . __('Need help?', 'remove-powered-by-wp') . '</a>';
     340/* translators: name of the plugin */
     341                $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . 'remove-powered-by-wp' . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', 'remove-powered-by-wp'), self::$plugin_name)) . '">' . __('Review plugin', 'remove-powered-by-wp') . '</a>';
    326342
    327343            }
     
    357373?>
    358374
    359 <div class="notice notice-error is-dismissible <?php echo self::$plugin_prefix; ?>-notice">
    360 
    361 <p><strong><?php echo self::$plugin_name; ?></strong><br />
    362 <?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', self::$plugin_text_domain); ?></p>
    363 
    364 <p><a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name); ?></a></p>
     375<div class="notice notice-error is-dismissible <?php echo esc_html(self::$plugin_prefix); ?>-notice">
     376
     377<p><strong><?php echo esc_html(self::$plugin_name); ?></strong><br />
     378<?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', 'remove-powered-by-wp'); ?></p>
     379
     380<p><a href="<?php
     381/* translators: name of the plugin */
     382echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Download %s Premium', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></a></p>
    365383
    366384</div>
    367385
    368386<script type="text/javascript">
    369     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     387    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    370388        jQuery.ajax({
    371389            url: ajaxurl,
    372390            data: {
    373                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    374                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     391                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     392                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    375393            }
    376394        });
     
    384402?>
    385403
    386 <div class="notice notice-info is-dismissible <?php echo self::$plugin_prefix; ?>-notice">
    387 
    388 <p><strong><?php printf(__('Thank you for using %s plugin', self::$plugin_text_domain), self::$plugin_name); ?></strong><br />
     404<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     405
     406<p><strong><?php
     407/* translators: name of the plugin */
     408printf(esc_html(__('Thank you for using %s plugin', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></strong><br />
    389409<?php
    390410
    391411                    if (self::$plugin_trial == true) {
    392412
    393                         _e('Would you like to try even more features? Download your 7 day free trial now!', self::$plugin_text_domain);
     413                        echo esc_html(__('Would you like to try even more features? Download your 7 day free trial now!', 'remove-powered-by-wp'));
    394414
    395415                    } else {
    396416
    397                         echo sprintf(__('Upgrade now to %s Premium to enable more options and features and contribute to the further development of this plugin.', self::$plugin_text_domain), self::$plugin_name);
     417/* translators: name of the plugin */
     418                        echo esc_html(sprintf(__('Upgrade now to %s Premium to enable more options and features and contribute to the further development of this plugin.', 'remove-powered-by-wp'), self::$plugin_name));
    398419
    399420                    }
     
    407428?>
    408429
    409 <a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Try %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Trial %s Premium for 7 days', self::$plugin_text_domain), self::$plugin_name); ?></a>
     430<a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php
     431/* translators: name of the plugin */
     432echo esc_attr(sprintf(__('Try %s Premium', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Trial %s Premium for 7 days', 'remove-powered-by-wp'), self::$plugin_name)); ?></a>
    410433
    411434<?php
     
    414437
    415438?>
    416 <a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php echo esc_attr(sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name); ?></a></p>
     439<a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php
     440/* translators: name of the plugin */
     441echo esc_attr(sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Upgrade now to %s Premium', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></a></p>
    417442
    418443</div>
    419444
    420445<script type="text/javascript">
    421     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     446    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    422447        jQuery.ajax({
    423448            url: ajaxurl,
    424449            data: {
    425                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    426                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     450                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     451                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    427452            }
    428453        });
     
    434459                }
    435460
    436             } elseif (time() > (strtotime('+1 hour', filectime(__DIR__))) && get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() && !get_option(self::$plugin_prefix . '_donated')) {
    437 
    438 ?>
    439 
    440 <div class="notice notice-info is-dismissible <?php echo self::$plugin_prefix; ?>-notice">
    441 <p><strong><?php printf(__('Thank you for using %s plugin', self::$plugin_text_domain), self::$plugin_name); ?></strong></p>
    442 <?php
    443 
     461            } elseif (
     462//                time() > (strtotime('+1 hour', filectime(__DIR__))) &&
     463                get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() &&
     464                !get_option(self::$plugin_prefix . '_donated')
     465            ) {
     466
     467?>
     468
     469<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     470<p><strong><?php
     471/* translators: name of the plugin */
     472printf(esc_html(__('Thank you for using %s plugin', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></strong></p>
     473<?php
     474
     475// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
    444476                do_action(self::$plugin_prefix . '_admin_notice_donate');
    445477
    446478?>
    447 <p><?php esc_html_e('Funding plugins like this one with small financial contributions is essential to pay the developers to continue to do what they do. Please take a moment to give a small amount ...', self::$plugin_text_domain); ?></p>
    448 <p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php echo esc_attr(sprintf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name); ?></a> <a href="#" id="<?php echo self::$plugin_prefix; ?>-already-paid" title="<?php echo esc_attr(__('Aleady Contributed!', self::$plugin_text_domain)); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', self::$plugin_text_domain); ?></a></p>
     479<p><?php esc_html_e('Funding plugins like this one with small financial contributions is essential to pay the developers to continue to do what they do. Please take a moment to give a small amount ...', 'remove-powered-by-wp'); ?></p>
     480<p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php
     481/* translators: name of the plugin */
     482echo esc_attr(sprintf(__('Contribute to %s', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Contribute to %s', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></a> <a href="#" id="<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid" title="<?php echo esc_attr(__('Aleady Contributed!', 'remove-powered-by-wp')); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', 'remove-powered-by-wp'); ?></a></p>
    449483</div>
    450484
    451485<script type="text/javascript">
    452     jQuery(document).on('click', '#<?php echo self::$plugin_prefix; ?>-already-paid', function() {
    453         if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', self::$plugin_text_domain)); ?>)) {
    454             alert(<?php echo json_encode(__('Thank you!', self::$plugin_text_domain)); ?>);
    455             jQuery('.<?php echo self::$plugin_prefix; ?>-notice').fadeTo(100, 0, function() {
    456                 jQuery('.<?php echo self::$plugin_prefix; ?>-notice').slideUp(100, function() {
    457                     jQuery('.<?php echo self::$plugin_prefix; ?>-notice').remove()
     486    jQuery(document).on('click', '#<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid', function() {
     487        if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', 'remove-powered-by-wp')); ?>)) {
     488            alert(<?php echo json_encode(__('Thank you!', 'remove-powered-by-wp')); ?>);
     489            jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').fadeTo(100, 0, function() {
     490                jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').slideUp(100, function() {
     491                    jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').remove()
    458492                });
    459493            });
     
    461495                url: ajaxurl,
    462496                data: {
    463                     action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
     497                    action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
    464498                    donated: 'true',
    465                     _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     499                    _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    466500                }
    467501            });
    468502        } else {
    469             window.location.assign('<?php echo self::upgrade_link(); ?>');
     503            window.location.assign('<?php echo esc_url(self::upgrade_link()); ?>');
    470504        }
    471505    });
    472     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     506    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    473507        jQuery.ajax({
    474508            url: ajaxurl,
    475509            data: {
    476                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    477                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     510                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     511                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    478512            }
    479513        });
     
    509543                    is_admin() &&
    510544                    $pagenow === 'customize.php' &&
    511                     isset($_GET['theme']) &&
    512                     !in_array($_GET['theme'], $themes, true)
     545                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     546                    !in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    513547                ) && !(
    514548                    !is_admin() &&
    515549                    $pagenow === 'index.php' &&
    516                     isset($_GET['customize_theme']) &&
    517                     isset($_GET['customize_changeset_uuid']) &&
    518                     !in_array($_GET['customize_theme'], $themes, true)
     550                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     551                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     552                    !in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    519553                )
    520554            ) {
     
    530564                    is_admin() &&
    531565                    $pagenow === 'customize.php' &&
    532                     isset($_GET['theme']) &&
    533                     in_array($_GET['theme'], $themes, true)
     566                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     567                    in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    534568                ) || (
    535569                    !is_admin() &&
    536570                    $pagenow === 'index.php' &&
    537                     isset($_GET['customize_theme']) &&
    538                     isset($_GET['customize_changeset_uuid']) &&
    539                     in_array($_GET['customize_theme'], $themes, true)
     571                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     572                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     573                    in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    540574                ))
    541575            ) {
     
    549583                    !is_admin() &&
    550584                    $pagenow === 'index.php' &&
    551                     isset($_GET['customize_theme']) &&
    552                     isset($_GET['customize_changeset_uuid'])
     585                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     586                    isset($_GET['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    553587               
    554588            ) {
    555589
    556                 $child = wp_get_theme($_GET['customize_theme']);
     590                $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    557591
    558592                if (isset($child->template) && in_array($child->template, $themes, true)) {
     
    568602                is_admin() &&
    569603                ($pagenow === 'customize.php' || $pagenow === 'admin-ajax.php') &&
    570                 isset($_GET['theme']) || (isset($_POST['customize_theme']) && isset($_POST['customize_changeset_uuid']))
     604                (
     605                    isset($_GET['theme']) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     606                    (
     607                        isset($_POST['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Missing
     608                        isset($_POST['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Missing
     609                    )
     610                )
    571611            ) {
    572612
    573                 if (isset($_GET['theme'])) {
    574 
    575                     $child = wp_get_theme($_GET['theme']);
     613                if (isset($_GET['theme'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     614
     615                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    576616
    577617                } else {
    578618
    579                     $child = wp_get_theme($_POST['customize_theme']);
     619                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_POST['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Missing
    580620
    581621                }
     
    622662
    623663?>
    624 <span class="description customize-control-description"><?php echo $this->description; ?></span>
     664<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
    625665<?php
    626666
     
    647687?>
    648688        </ul>
    649         <input type="hidden" id="_customize-input-<?php echo $this->id; ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
     689        <input type="hidden" id="_customize-input-<?php echo esc_attr($this->id); ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
    650690<?php
    651691
  • remove-powered-by-wp/tags/1.6.2/readme.txt

    r3412273 r3415522  
    66Tested up to: 6.9
    77Requires PHP: 5.6
    8 Stable tag: 1.6.1
     8Stable tag: 1.6.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.6.2 =
     70* General housekeeping preparing for "Plugin Check" code review
     71
    6972= 1.6.1 =
    7073* Added compatibility for GeneratePress theme
     
    207210== Upgrade Notice ==
    208211
    209 = 1.6.1 =
    210 * Added compatibility for GeneratePress theme
     212= 1.6.2 =
     213* General housekeeping preparing for "Plugin Check" code review
  • remove-powered-by-wp/tags/1.6.2/remove-powered-by-wp.php

    r3076277 r3415522  
    22/*
    33 * Plugin Name: Remove "Powered by WordPress"
    4  * Version: 1.6.1
     4 * Version: 1.6.2
    55 * Plugin URI: https://webd.uk/product/support-us/
    66 * Description: Removes the WordPress credit on all default WordPress themes and inserts a widget area
    77 * Author: Webd Ltd
    88 * Author URI: https://webd.uk
     9 * License: GPLv2 or later
     10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    911 * Text Domain: remove-powered-by-wp
    1012 */
     
    1618    class remove_powered_by_wp_class {
    1719
    18         public static $version = '1.6.1';
     20        public static $version = '1.6.2';
    1921
    2022        public static $rpbw_compatible_themes = array(
     
    106108                    $wp_customize->add_section('more_theme_options', array(
    107109                        'title'     => __('More Theme Options', 'remove-powered-by-wp'),
     110/* translators: theme name */
    108111                        'description'  => sprintf(__('Would you like even more options and features for your theme %s?', 'remove-powered-by-wp'), $key),
    109112                        'priority'     => 0
    110113                    ));
    111114
    112                     rpbwCommon::add_hidden_control($wp_customize, 'install_' . $value, 'more_theme_options', __('Options for ' . $key),
    113                    
    114                     sprintf(wp_kses(__('<a href="%s" class="button">Install Options for %s Plugin</a>', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'class' => array()))), esc_url(add_query_arg(array(
     115/* translators: theme name */
     116                    rpbwCommon::add_hidden_control($wp_customize, 'install_' . $value, 'more_theme_options', sprintf(__('Options for %s', 'remove-powered-by-wp'), $key),
     117
     118/* translators: link to plugin installer, theme name */
     119                    sprintf(wp_kses(__('<a href="%1$s" class="button">Install Options for %2$s Plugin</a>', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'class' => array()))), esc_url(add_query_arg(array(
    115120                            's' => $value . ' please our modification',
    116121                            'tab' => 'search',
     
    667672            ) as $key => $value) {
    668673
    669                 if (get_template() == $value) {
     674                if ($value === get_template()) {
    670675
    671676                    echo '<p>';
    672677                    printf(
    673                         __('You are using %s theme so you should try %s plugin which has loads more options and features!', 'remove-powered-by-wp'),
    674                         '<strong>' . $key . '</strong>',
    675                         '<strong><a href="' . add_query_arg(array(
     678                        wp_kses(
     679/* translators: theme name, theme name linked to plugin installer */
     680                            __('You are using %1$s theme so you should try %2$s plugin which has loads more options and features!', 'remove-powered-by-wp'),
     681                            array('a' => array('href' => array(), 'title' => array()), 'strong' => array())
     682                        ),
     683                        '<strong>' . esc_html($key) . '</strong>',
     684                        '<strong><a href="' . esc_url(add_query_arg(array(
    676685                            's' => $value . ' please our modification',
    677686                            'tab' => 'search',
    678687                            'type' => 'term'
    679                         ), admin_url('plugin-install.php')) . '" title="' . __('Options for ' . $key, 'remove-powered-by-wp') . '">' . __('Options for ' . $key, 'remove-powered-by-wp') . '</a></strong>'
     688/* translators: theme name */
     689                        ), admin_url('plugin-install.php'))) . '" title="' . sprintf(esc_attr(__('Options for %s', 'remove-powered-by-wp')), esc_attr($key)) . '">' . sprintf(esc_html(__('Options for %s', 'remove-powered-by-wp')), esc_html($key)) . '</a></strong>'
    680690                    );
    681691                    echo '</p>';
     
    882892
    883893        printf(
    884             __('This plugin requires one of the compatible themes to be active or live previewed in order to function. Your theme "%s" is not compatible. Please install and activate or live preview one of these themes (or a child theme thereof):', 'remove-powered-by-wp'),
    885             get_template()
     894/* translators: theme slug */
     895            esc_html(__('This plugin requires one of the compatible themes to be active or live previewed in order to function. Your theme "%s" is not compatible. Please install and activate or live preview one of these themes (or a child theme thereof):', 'remove-powered-by-wp')),
     896            esc_html(get_template())
    886897        );
    887898
     
    890901        foreach (remove_powered_by_wp_class::$rpbw_compatible_themes as $key => $value) {
    891902
    892             $theme_list[] = '<a href="' . add_query_arg('search', $value, admin_url('theme-install.php')) . '" title="' .  __($key, 'remove-powered-by-wp') . '">' .  __($key, 'remove-powered-by-wp') . '</a>';
    893 
    894         }
    895 
    896         echo ' ' . implode(', ', $theme_list) . '.';
     903            $theme_list[] = '<a href="' . add_query_arg('search', $value, admin_url('theme-install.php')) . '" title="' . esc_attr($key) . '">' .  esc_html($key) . '</a>';
     904
     905        }
     906
     907        echo esc_html(' ' . implode(', ', $theme_list) . '.');
    897908
    898909?></p>
  • remove-powered-by-wp/trunk/includes/class-rpbw-common.php

    r2986672 r3415522  
    11<?php
    22/*
    3  * Version: 1.3.9
     3 * Version: 1.4
    44 */
    55
     
    4343        public static function plugin_text_domain() {
    4444
    45             return self::$plugin_text_domain;
     45            return 'remove-powered-by-wp';
    4646
    4747        }
     
    6161        public static function support_url() {
    6262
    63             return 'https://wordpress.org/support/plugin/' . self::$plugin_text_domain . '/';
     63            return 'https://wordpress.org/support/plugin/' . 'remove-powered-by-wp' . '/';
    6464
    6565        }
     
    6767        public static function control_upgrade_text() {
    6868
    69             $upgrade_text = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name) . '</a>';
     69/* translators: name of the plugin */
     70            $upgrade_text = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name) . '</a>';
    7071
    7172            if (!class_exists(self::$plugin_premium_class) || !get_option(self::$plugin_prefix . '_purchased')) {
     
    7374                if (!class_exists(self::$plugin_premium_class)) {
    7475
    75                     $upgrade_text .= sprintf(wp_kses(__(' or <a href="%s" title="Download Free Trial">trial it for 7 days</a>', self::$plugin_text_domain), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::premium_link()));
     76/* translators: link to the premium upgrade */
     77                    $upgrade_text .= sprintf(wp_kses(__(' or <a href="%s" title="Download Free Trial">trial it for 7 days</a>', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::premium_link()));
    7678
    7779                }
     
    8587        public static function control_section_description() {
    8688
    87             $default_description = sprintf(wp_kses(__('If you have any requests for new features, please <a href="%s" title="Support Forum">let us know in the support forum</a>.', self::$plugin_text_domain), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::support_url()));
     89/* translators: link to the plugin's support forum */
     90            $default_description = sprintf(wp_kses(__('If you have any requests for new features, please <a href="%s" title="Support Forum">let us know in the support forum</a>.', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::support_url()));
    8891
    8992            if (self::$plugin_premium_class) {
     
    9598                    if (!class_exists(self::$plugin_premium_class)) {
    9699
    97                         $section_description = '<strong>' . __('For even more options', self::$plugin_text_domain) . '</strong>' . ' ' . $upgrade_text;
     100                        $section_description = '<strong>' . __('For even more options', 'remove-powered-by-wp') . '</strong>' . ' ' . $upgrade_text;
    98101
    99102                    } else {
    100103
    101                         $section_description = '<strong>' . __('To keep using premium options', self::$plugin_text_domain) . '</strong>' . ' ' . $upgrade_text;
     104                        $section_description = '<strong>' . __('To keep using premium options', 'remove-powered-by-wp') . '</strong>' . ' ' . $upgrade_text;
    102105
    103106                    }
     
    119122                $section_description .= ' ' . sprintf(
    120123                    wp_kses(
     124/* translators: link to plugin install page */
    121125                        __(
    122126                            '<strong>To reset this section of options to default settings</strong> without affecting other sections in the customizer, install <a href="%s" title="Reset Customizer">Reset Customizer</a>.',
    123                             self::$plugin_text_domain
     127                            'remove-powered-by-wp'
    124128                        ),
    125129                        array('strong' => array(), 'a' => array('href' => array(), 'title' => array()))
     
    145149        public static function control_setting_upgrade_nag() {
    146150
    147             $upgrade_nag = self::control_upgrade_text() . __(' to use this option.', self::$plugin_text_domain);
     151            $upgrade_nag = self::control_upgrade_text() . __(' to use this option.', 'remove-powered-by-wp');
    148152
    149153            return $upgrade_nag;
     
    234238
    235239                $generated_css = sprintf('%s { %s: %s; }', $selector, $style, $prefix.$mod.$postfix);
    236                 echo $generated_css;
     240                echo wp_kses($generated_css, 'strip');
    237241
    238242            } elseif ($mod) {
    239243
    240244                $generated_css = sprintf('%s { %s:%s; }', $selector, $style, $prefix.$value.$postfix);
    241                 echo $generated_css;
     245                echo wp_kses($generated_css, 'strip');
    242246
    243247            }
     
    249253            if (self::$plugin_premium_class) {
    250254
    251                 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'], 'https://webd.uk/product/' . self::$plugin_text_domain . '-upgrade/');
    252 
     255                if (isset($_SERVER['HTTP_HOST'])) {
     256
     257                    return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . filter_var(wp_unslash($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL)), 'https://webd.uk/product/' . 'remove-powered-by-wp' . '-upgrade/');
     258
     259                } else {
     260
     261                    return 'https://webd.uk/product/' . 'remove-powered-by-wp' . '-upgrade/';
     262
     263                }
    253264
    254265            } else {
     
    276287            $settings_links = array();
    277288
    278             $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', self::$plugin_text_domain)) . '">' . __('Settings', self::$plugin_text_domain) . '</a>';
     289            $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', 'remove-powered-by-wp')) . '">' . __('Settings', 'remove-powered-by-wp') . '</a>';
    279290
    280291            if (!get_option(self::$plugin_prefix . '_purchased')) {
     
    284295                    if (self::$plugin_upgrade) {
    285296
    286                         $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>';
     297/* translators: name of the plugin */
     298                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', 'remove-powered-by-wp'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'remove-powered-by-wp') . '</a>';
    287299
    288300                    } else {
    289301
    290                         $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>';
     302/* translators: name of the plugin */
     303                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', 'remove-powered-by-wp'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'remove-powered-by-wp') . '</a>';
    291304
    292305                    }
     
    294307                } else {
    295308
    296                     $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name) : sprintf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', self::$plugin_text_domain) : __('Support Us', self::$plugin_text_domain)) . '</a>';
     309/* translators: name of the plugin */
     310                    $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name) : sprintf(__('Contribute to %s', 'remove-powered-by-wp'), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', 'remove-powered-by-wp') : __('Support Us', 'remove-powered-by-wp')) . '</a>';
    297311
    298312                }
     
    300314                if ($premium) {
    301315
    302                     $settings_links[] = '<a href="' . wp_nonce_url('?activate-' . self::$plugin_prefix . '=true', self::$plugin_prefix . '_activate') . '" id="' . self::$plugin_prefix . '_activate_upgrade" title="' . esc_attr(__('Activate Purchase', self::$plugin_text_domain)) . '" onclick="jQuery(this).append(&#39; <img src=&#34;/wp-admin/images/loading.gif&#34; style=&#34;float: none; width: auto; height: auto;&#34; />&#39;); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', self::$plugin_text_domain) . '</a>';
    303 
    304                 } elseif (self::$plugin_trial && !is_plugin_active(self::$plugin_text_domain . '-premium/' . self::$plugin_text_domain . '-premium.php')) {
    305 
    306                     $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', self::$plugin_text_domain), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', self::$plugin_text_domain) . '</a>';
     316                    $settings_links[] = '<a href="' . wp_nonce_url('?activate-' . self::$plugin_prefix . '=true', self::$plugin_prefix . '_activate') . '" id="' . self::$plugin_prefix . '_activate_upgrade" title="' . esc_attr(__('Activate Purchase', 'remove-powered-by-wp')) . '" onclick="jQuery(this).append(&#39; <img src=&#34;/wp-admin/images/loading.gif&#34; style=&#34;float: none; width: auto; height: auto;&#34; />&#39;); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', 'remove-powered-by-wp') . '</a>';
     317
     318                } elseif (self::$plugin_trial && !is_plugin_active('remove-powered-by-wp' . '-premium/' . 'remove-powered-by-wp' . '-premium.php')) {
     319
     320/* translators: name of the plugin */
     321                    $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', 'remove-powered-by-wp'), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', 'remove-powered-by-wp') . '</a>';
    307322
    308323                }
     
    310325            } elseif ($premium) {
    311326
    312                 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', self::$plugin_text_domain) . '</strong>';
     327                $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', 'remove-powered-by-wp') . '</strong>';
    313328
    314329            }
     
    320335        public static function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) {
    321336
    322             if ($plugin_file === self::$plugin_text_domain . '/' . self::$plugin_text_domain . '.php') {
    323 
    324                 $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', self::$plugin_text_domain) . '" style="color: orange; font-weight: bold;">' . __('Need help?', self::$plugin_text_domain) . '</a>';
    325                 $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . self::$plugin_text_domain . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', self::$plugin_text_domain), self::$plugin_name)) . '">' . __('Review plugin', self::$plugin_text_domain) . '</a>';
     337            if ($plugin_file === 'remove-powered-by-wp' . '/' . 'remove-powered-by-wp' . '.php') {
     338
     339                $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', 'remove-powered-by-wp') . '" style="color: orange; font-weight: bold;">' . __('Need help?', 'remove-powered-by-wp') . '</a>';
     340/* translators: name of the plugin */
     341                $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . 'remove-powered-by-wp' . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', 'remove-powered-by-wp'), self::$plugin_name)) . '">' . __('Review plugin', 'remove-powered-by-wp') . '</a>';
    326342
    327343            }
     
    357373?>
    358374
    359 <div class="notice notice-error is-dismissible <?php echo self::$plugin_prefix; ?>-notice">
    360 
    361 <p><strong><?php echo self::$plugin_name; ?></strong><br />
    362 <?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', self::$plugin_text_domain); ?></p>
    363 
    364 <p><a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name); ?></a></p>
     375<div class="notice notice-error is-dismissible <?php echo esc_html(self::$plugin_prefix); ?>-notice">
     376
     377<p><strong><?php echo esc_html(self::$plugin_name); ?></strong><br />
     378<?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', 'remove-powered-by-wp'); ?></p>
     379
     380<p><a href="<?php
     381/* translators: name of the plugin */
     382echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Download %s Premium', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></a></p>
    365383
    366384</div>
    367385
    368386<script type="text/javascript">
    369     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     387    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    370388        jQuery.ajax({
    371389            url: ajaxurl,
    372390            data: {
    373                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    374                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     391                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     392                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    375393            }
    376394        });
     
    384402?>
    385403
    386 <div class="notice notice-info is-dismissible <?php echo self::$plugin_prefix; ?>-notice">
    387 
    388 <p><strong><?php printf(__('Thank you for using %s plugin', self::$plugin_text_domain), self::$plugin_name); ?></strong><br />
     404<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     405
     406<p><strong><?php
     407/* translators: name of the plugin */
     408printf(esc_html(__('Thank you for using %s plugin', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></strong><br />
    389409<?php
    390410
    391411                    if (self::$plugin_trial == true) {
    392412
    393                         _e('Would you like to try even more features? Download your 7 day free trial now!', self::$plugin_text_domain);
     413                        echo esc_html(__('Would you like to try even more features? Download your 7 day free trial now!', 'remove-powered-by-wp'));
    394414
    395415                    } else {
    396416
    397                         echo sprintf(__('Upgrade now to %s Premium to enable more options and features and contribute to the further development of this plugin.', self::$plugin_text_domain), self::$plugin_name);
     417/* translators: name of the plugin */
     418                        echo esc_html(sprintf(__('Upgrade now to %s Premium to enable more options and features and contribute to the further development of this plugin.', 'remove-powered-by-wp'), self::$plugin_name));
    398419
    399420                    }
     
    407428?>
    408429
    409 <a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Try %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Trial %s Premium for 7 days', self::$plugin_text_domain), self::$plugin_name); ?></a>
     430<a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php
     431/* translators: name of the plugin */
     432echo esc_attr(sprintf(__('Try %s Premium', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Trial %s Premium for 7 days', 'remove-powered-by-wp'), self::$plugin_name)); ?></a>
    410433
    411434<?php
     
    414437
    415438?>
    416 <a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php echo esc_attr(sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name); ?></a></p>
     439<a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php
     440/* translators: name of the plugin */
     441echo esc_attr(sprintf(__('Upgrade now to %s Premium', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Upgrade now to %s Premium', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></a></p>
    417442
    418443</div>
    419444
    420445<script type="text/javascript">
    421     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     446    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    422447        jQuery.ajax({
    423448            url: ajaxurl,
    424449            data: {
    425                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    426                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     450                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     451                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    427452            }
    428453        });
     
    434459                }
    435460
    436             } elseif (time() > (strtotime('+1 hour', filectime(__DIR__))) && get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() && !get_option(self::$plugin_prefix . '_donated')) {
    437 
    438 ?>
    439 
    440 <div class="notice notice-info is-dismissible <?php echo self::$plugin_prefix; ?>-notice">
    441 <p><strong><?php printf(__('Thank you for using %s plugin', self::$plugin_text_domain), self::$plugin_name); ?></strong></p>
    442 <?php
    443 
     461            } elseif (
     462//                time() > (strtotime('+1 hour', filectime(__DIR__))) &&
     463                get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() &&
     464                !get_option(self::$plugin_prefix . '_donated')
     465            ) {
     466
     467?>
     468
     469<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     470<p><strong><?php
     471/* translators: name of the plugin */
     472printf(esc_html(__('Thank you for using %s plugin', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></strong></p>
     473<?php
     474
     475// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
    444476                do_action(self::$plugin_prefix . '_admin_notice_donate');
    445477
    446478?>
    447 <p><?php esc_html_e('Funding plugins like this one with small financial contributions is essential to pay the developers to continue to do what they do. Please take a moment to give a small amount ...', self::$plugin_text_domain); ?></p>
    448 <p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php echo esc_attr(sprintf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name); ?></a> <a href="#" id="<?php echo self::$plugin_prefix; ?>-already-paid" title="<?php echo esc_attr(__('Aleady Contributed!', self::$plugin_text_domain)); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', self::$plugin_text_domain); ?></a></p>
     479<p><?php esc_html_e('Funding plugins like this one with small financial contributions is essential to pay the developers to continue to do what they do. Please take a moment to give a small amount ...', 'remove-powered-by-wp'); ?></p>
     480<p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php
     481/* translators: name of the plugin */
     482echo esc_attr(sprintf(__('Contribute to %s', 'remove-powered-by-wp'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Contribute to %s', 'remove-powered-by-wp')), esc_html(self::$plugin_name)); ?></a> <a href="#" id="<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid" title="<?php echo esc_attr(__('Aleady Contributed!', 'remove-powered-by-wp')); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', 'remove-powered-by-wp'); ?></a></p>
    449483</div>
    450484
    451485<script type="text/javascript">
    452     jQuery(document).on('click', '#<?php echo self::$plugin_prefix; ?>-already-paid', function() {
    453         if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', self::$plugin_text_domain)); ?>)) {
    454             alert(<?php echo json_encode(__('Thank you!', self::$plugin_text_domain)); ?>);
    455             jQuery('.<?php echo self::$plugin_prefix; ?>-notice').fadeTo(100, 0, function() {
    456                 jQuery('.<?php echo self::$plugin_prefix; ?>-notice').slideUp(100, function() {
    457                     jQuery('.<?php echo self::$plugin_prefix; ?>-notice').remove()
     486    jQuery(document).on('click', '#<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid', function() {
     487        if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', 'remove-powered-by-wp')); ?>)) {
     488            alert(<?php echo json_encode(__('Thank you!', 'remove-powered-by-wp')); ?>);
     489            jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').fadeTo(100, 0, function() {
     490                jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').slideUp(100, function() {
     491                    jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').remove()
    458492                });
    459493            });
     
    461495                url: ajaxurl,
    462496                data: {
    463                     action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
     497                    action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
    464498                    donated: 'true',
    465                     _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     499                    _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    466500                }
    467501            });
    468502        } else {
    469             window.location.assign('<?php echo self::upgrade_link(); ?>');
     503            window.location.assign('<?php echo esc_url(self::upgrade_link()); ?>');
    470504        }
    471505    });
    472     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     506    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    473507        jQuery.ajax({
    474508            url: ajaxurl,
    475509            data: {
    476                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    477                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     510                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     511                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    478512            }
    479513        });
     
    509543                    is_admin() &&
    510544                    $pagenow === 'customize.php' &&
    511                     isset($_GET['theme']) &&
    512                     !in_array($_GET['theme'], $themes, true)
     545                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     546                    !in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    513547                ) && !(
    514548                    !is_admin() &&
    515549                    $pagenow === 'index.php' &&
    516                     isset($_GET['customize_theme']) &&
    517                     isset($_GET['customize_changeset_uuid']) &&
    518                     !in_array($_GET['customize_theme'], $themes, true)
     550                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     551                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     552                    !in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    519553                )
    520554            ) {
     
    530564                    is_admin() &&
    531565                    $pagenow === 'customize.php' &&
    532                     isset($_GET['theme']) &&
    533                     in_array($_GET['theme'], $themes, true)
     566                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     567                    in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    534568                ) || (
    535569                    !is_admin() &&
    536570                    $pagenow === 'index.php' &&
    537                     isset($_GET['customize_theme']) &&
    538                     isset($_GET['customize_changeset_uuid']) &&
    539                     in_array($_GET['customize_theme'], $themes, true)
     571                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     572                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     573                    in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    540574                ))
    541575            ) {
     
    549583                    !is_admin() &&
    550584                    $pagenow === 'index.php' &&
    551                     isset($_GET['customize_theme']) &&
    552                     isset($_GET['customize_changeset_uuid'])
     585                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     586                    isset($_GET['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    553587               
    554588            ) {
    555589
    556                 $child = wp_get_theme($_GET['customize_theme']);
     590                $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    557591
    558592                if (isset($child->template) && in_array($child->template, $themes, true)) {
     
    568602                is_admin() &&
    569603                ($pagenow === 'customize.php' || $pagenow === 'admin-ajax.php') &&
    570                 isset($_GET['theme']) || (isset($_POST['customize_theme']) && isset($_POST['customize_changeset_uuid']))
     604                (
     605                    isset($_GET['theme']) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     606                    (
     607                        isset($_POST['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Missing
     608                        isset($_POST['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Missing
     609                    )
     610                )
    571611            ) {
    572612
    573                 if (isset($_GET['theme'])) {
    574 
    575                     $child = wp_get_theme($_GET['theme']);
     613                if (isset($_GET['theme'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     614
     615                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    576616
    577617                } else {
    578618
    579                     $child = wp_get_theme($_POST['customize_theme']);
     619                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_POST['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Missing
    580620
    581621                }
     
    622662
    623663?>
    624 <span class="description customize-control-description"><?php echo $this->description; ?></span>
     664<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
    625665<?php
    626666
     
    647687?>
    648688        </ul>
    649         <input type="hidden" id="_customize-input-<?php echo $this->id; ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
     689        <input type="hidden" id="_customize-input-<?php echo esc_attr($this->id); ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
    650690<?php
    651691
  • remove-powered-by-wp/trunk/readme.txt

    r3412273 r3415522  
    66Tested up to: 6.9
    77Requires PHP: 5.6
    8 Stable tag: 1.6.1
     8Stable tag: 1.6.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6767== Changelog ==
    6868
     69= 1.6.2 =
     70* General housekeeping preparing for "Plugin Check" code review
     71
    6972= 1.6.1 =
    7073* Added compatibility for GeneratePress theme
     
    207210== Upgrade Notice ==
    208211
    209 = 1.6.1 =
    210 * Added compatibility for GeneratePress theme
     212= 1.6.2 =
     213* General housekeeping preparing for "Plugin Check" code review
  • remove-powered-by-wp/trunk/remove-powered-by-wp.php

    r3076277 r3415522  
    22/*
    33 * Plugin Name: Remove "Powered by WordPress"
    4  * Version: 1.6.1
     4 * Version: 1.6.2
    55 * Plugin URI: https://webd.uk/product/support-us/
    66 * Description: Removes the WordPress credit on all default WordPress themes and inserts a widget area
    77 * Author: Webd Ltd
    88 * Author URI: https://webd.uk
     9 * License: GPLv2 or later
     10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    911 * Text Domain: remove-powered-by-wp
    1012 */
     
    1618    class remove_powered_by_wp_class {
    1719
    18         public static $version = '1.6.1';
     20        public static $version = '1.6.2';
    1921
    2022        public static $rpbw_compatible_themes = array(
     
    106108                    $wp_customize->add_section('more_theme_options', array(
    107109                        'title'     => __('More Theme Options', 'remove-powered-by-wp'),
     110/* translators: theme name */
    108111                        'description'  => sprintf(__('Would you like even more options and features for your theme %s?', 'remove-powered-by-wp'), $key),
    109112                        'priority'     => 0
    110113                    ));
    111114
    112                     rpbwCommon::add_hidden_control($wp_customize, 'install_' . $value, 'more_theme_options', __('Options for ' . $key),
    113                    
    114                     sprintf(wp_kses(__('<a href="%s" class="button">Install Options for %s Plugin</a>', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'class' => array()))), esc_url(add_query_arg(array(
     115/* translators: theme name */
     116                    rpbwCommon::add_hidden_control($wp_customize, 'install_' . $value, 'more_theme_options', sprintf(__('Options for %s', 'remove-powered-by-wp'), $key),
     117
     118/* translators: link to plugin installer, theme name */
     119                    sprintf(wp_kses(__('<a href="%1$s" class="button">Install Options for %2$s Plugin</a>', 'remove-powered-by-wp'), array('a' => array('href' => array(), 'class' => array()))), esc_url(add_query_arg(array(
    115120                            's' => $value . ' please our modification',
    116121                            'tab' => 'search',
     
    667672            ) as $key => $value) {
    668673
    669                 if (get_template() == $value) {
     674                if ($value === get_template()) {
    670675
    671676                    echo '<p>';
    672677                    printf(
    673                         __('You are using %s theme so you should try %s plugin which has loads more options and features!', 'remove-powered-by-wp'),
    674                         '<strong>' . $key . '</strong>',
    675                         '<strong><a href="' . add_query_arg(array(
     678                        wp_kses(
     679/* translators: theme name, theme name linked to plugin installer */
     680                            __('You are using %1$s theme so you should try %2$s plugin which has loads more options and features!', 'remove-powered-by-wp'),
     681                            array('a' => array('href' => array(), 'title' => array()), 'strong' => array())
     682                        ),
     683                        '<strong>' . esc_html($key) . '</strong>',
     684                        '<strong><a href="' . esc_url(add_query_arg(array(
    676685                            's' => $value . ' please our modification',
    677686                            'tab' => 'search',
    678687                            'type' => 'term'
    679                         ), admin_url('plugin-install.php')) . '" title="' . __('Options for ' . $key, 'remove-powered-by-wp') . '">' . __('Options for ' . $key, 'remove-powered-by-wp') . '</a></strong>'
     688/* translators: theme name */
     689                        ), admin_url('plugin-install.php'))) . '" title="' . sprintf(esc_attr(__('Options for %s', 'remove-powered-by-wp')), esc_attr($key)) . '">' . sprintf(esc_html(__('Options for %s', 'remove-powered-by-wp')), esc_html($key)) . '</a></strong>'
    680690                    );
    681691                    echo '</p>';
     
    882892
    883893        printf(
    884             __('This plugin requires one of the compatible themes to be active or live previewed in order to function. Your theme "%s" is not compatible. Please install and activate or live preview one of these themes (or a child theme thereof):', 'remove-powered-by-wp'),
    885             get_template()
     894/* translators: theme slug */
     895            esc_html(__('This plugin requires one of the compatible themes to be active or live previewed in order to function. Your theme "%s" is not compatible. Please install and activate or live preview one of these themes (or a child theme thereof):', 'remove-powered-by-wp')),
     896            esc_html(get_template())
    886897        );
    887898
     
    890901        foreach (remove_powered_by_wp_class::$rpbw_compatible_themes as $key => $value) {
    891902
    892             $theme_list[] = '<a href="' . add_query_arg('search', $value, admin_url('theme-install.php')) . '" title="' .  __($key, 'remove-powered-by-wp') . '">' .  __($key, 'remove-powered-by-wp') . '</a>';
    893 
    894         }
    895 
    896         echo ' ' . implode(', ', $theme_list) . '.';
     903            $theme_list[] = '<a href="' . add_query_arg('search', $value, admin_url('theme-install.php')) . '" title="' . esc_attr($key) . '">' .  esc_html($key) . '</a>';
     904
     905        }
     906
     907        echo esc_html(' ' . implode(', ', $theme_list) . '.');
    897908
    898909?></p>
Note: See TracChangeset for help on using the changeset viewer.