Plugin Directory

Changeset 3418400


Ignore:
Timestamp:
12/12/2025 03:55:42 PM (40 hours ago)
Author:
domainsupport
Message:

Tagging version 1.7.9

Location:
options-for-twenty-twenty-one
Files:
1 deleted
4 edited
3 copied

Legend:

Unmodified
Added
Removed
  • options-for-twenty-twenty-one/tags/1.7.9/includes/class-oftto-common.php

    r2986074 r3418400  
    11<?php
    22/*
    3  * Version: 1.3.9
     3 * Version: 1.4.2
    44 */
    55
     
    4343        public static function plugin_text_domain() {
    4444
    45             return self::$plugin_text_domain;
     45            return 'options-for-twenty-twenty-one';
    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/' . 'options-for-twenty-twenty-one' . '/';
    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', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-twenty-one'), 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>', 'options-for-twenty-twenty-one'), 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>.', 'options-for-twenty-twenty-one'), 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', 'options-for-twenty-twenty-one') . '</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', 'options-for-twenty-twenty-one') . '</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                            'options-for-twenty-twenty-one'
    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.', 'options-for-twenty-twenty-one');
    148152
    149153            return $upgrade_nag;
     
    234238
    235239                $generated_css = sprintf('%s { %s: %s; }', $selector, $style, $prefix.$mod.$postfix);
    236                 echo $generated_css;
     240
     241// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     242                echo wp_strip_all_tags($generated_css);
    237243
    238244            } elseif ($mod) {
    239245
    240246                $generated_css = sprintf('%s { %s:%s; }', $selector, $style, $prefix.$value.$postfix);
    241                 echo $generated_css;
     247
     248// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     249                echo wp_strip_all_tags($generated_css);
    242250
    243251            }
     
    249257            if (self::$plugin_premium_class) {
    250258
    251                 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'], 'https://webd.uk/product/' . self::$plugin_text_domain . '-upgrade/');
    252 
     259                if (isset($_SERVER['HTTP_HOST'])) {
     260
     261                    return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . filter_var(wp_unslash($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL)), 'https://webd.uk/product/' . 'options-for-twenty-twenty-one' . '-upgrade/');
     262
     263                } else {
     264
     265                    return 'https://webd.uk/product/' . 'options-for-twenty-twenty-one' . '-upgrade/';
     266
     267                }
    253268
    254269            } else {
     
    276291            $settings_links = array();
    277292
    278             $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', self::$plugin_text_domain)) . '">' . __('Settings', self::$plugin_text_domain) . '</a>';
     293            $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', 'options-for-twenty-twenty-one')) . '">' . __('Settings', 'options-for-twenty-twenty-one') . '</a>';
    279294
    280295            if (!get_option(self::$plugin_prefix . '_purchased')) {
     
    284299                    if (self::$plugin_upgrade) {
    285300
    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>';
     301/* translators: name of the plugin */
     302                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-twenty-one') . '</a>';
    287303
    288304                    } else {
    289305
    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>';
     306/* translators: name of the plugin */
     307                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-twenty-one') . '</a>';
    291308
    292309                    }
     
    294311                } else {
    295312
    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>';
     313/* translators: name of the plugin */
     314                    $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name) : sprintf(__('Contribute to %s', 'options-for-twenty-twenty-one'), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', 'options-for-twenty-twenty-one') : __('Support Us', 'options-for-twenty-twenty-one')) . '</a>';
    297315
    298316                }
     
    300318                if ($premium) {
    301319
    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>';
     320                    $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', 'options-for-twenty-twenty-one')) . '" 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', 'options-for-twenty-twenty-one') . '</a>';
     321
     322                } elseif (self::$plugin_trial && !is_plugin_active('options-for-twenty-twenty-one' . '-premium/' . 'options-for-twenty-twenty-one' . '-premium.php')) {
     323
     324/* translators: name of the plugin */
     325                    $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', 'options-for-twenty-twenty-one') . '</a>';
    307326
    308327                }
     
    310329            } elseif ($premium) {
    311330
    312                 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', self::$plugin_text_domain) . '</strong>';
     331                $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', 'options-for-twenty-twenty-one') . '</strong>';
    313332
    314333            }
     
    320339        public static function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) {
    321340
    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>';
     341            if ($plugin_file === 'options-for-twenty-twenty-one' . '/' . 'options-for-twenty-twenty-one' . '.php') {
     342
     343                $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', 'options-for-twenty-twenty-one') . '" style="color: orange; font-weight: bold;">' . __('Need help?', 'options-for-twenty-twenty-one') . '</a>';
     344/* translators: name of the plugin */
     345                $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . 'options-for-twenty-twenty-one' . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '">' . __('Review plugin', 'options-for-twenty-twenty-one') . '</a>';
    326346
    327347            }
     
    357377?>
    358378
    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>
     379<div class="notice notice-error is-dismissible <?php echo esc_html(self::$plugin_prefix); ?>-notice">
     380
     381<p><strong><?php echo esc_html(self::$plugin_name); ?></strong><br />
     382<?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', 'options-for-twenty-twenty-one'); ?></p>
     383
     384<p><a href="<?php
     385/* translators: name of the plugin */
     386echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Download %s Premium', 'options-for-twenty-twenty-one')), esc_html(self::$plugin_name)); ?></a></p>
    365387
    366388</div>
    367389
    368390<script type="text/javascript">
    369     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     391    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    370392        jQuery.ajax({
    371393            url: ajaxurl,
    372394            data: {
    373                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    374                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     395                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     396                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    375397            }
    376398        });
     
    380402<?php
    381403
    382                 } elseif (!class_exists(self::$plugin_premium_class) && time() > (strtotime('+1 hour', filectime(__DIR__))) && get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version()) {
    383 
    384 ?>
    385 
    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                } elseif (
     405                    !class_exists(self::$plugin_premium_class) &&
     406                    time() > (strtotime('+1 hour', filectime(__DIR__))) &&
     407                    get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version()
     408                ) {
     409
     410?>
     411
     412<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     413
     414    <p style="font-size:15px;"><strong><?php
     415/* translators: name of the plugin */
     416printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-twenty-one')), esc_html(self::$plugin_name)); ?></strong></p>
    389417<?php
    390418
    391419                    if (self::$plugin_trial == true) {
    392420
    393                         _e('Would you like to try even more features? Download your 7 day free trial now!', self::$plugin_text_domain);
     421?>
     422
     423    <p><?php echo esc_html(__('Would you like to try even more features? Download your 7 day free trial now!', 'options-for-twenty-twenty-one')); ?></p>
     424<?php
    394425
    395426                    } else {
    396427
    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);
     428?>
     429
     430    <p>
     431        <?php
     432/* translators: name of the plugin */
     433                        echo esc_html(sprintf(__('Upgrade now to %s Premium to enable more options and features and contribute to the further development of this plugin.', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>
     434    </p>
     435<?php
    398436
    399437                    }
    400438
    401 ?></p>
    402 
    403 <p><?php
     439?>
     440
     441    <p><?php
    404442
    405443                    if (self::$plugin_trial == true) {
     
    407445?>
    408446
    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>
    410 
     447        <a href="<?php echo esc_url(self::premium_link()); ?>"
     448           title="<?php
     449/* translators: name of the plugin */
     450echo esc_attr(sprintf(__('Try %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>"
     451           class="button-secondary">
     452           <?php echo esc_html(__('Try premium plugin free for 7 days', 'options-for-twenty-twenty-one')); ?>
     453        </a>
    411454<?php
    412455
     
    414457
    415458?>
    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>
     459
     460        <a href="<?php echo esc_url(self::upgrade_link()); ?>"
     461           title="<?php
     462/* translators: name of the plugin */
     463echo esc_attr(sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>"
     464           class="button-primary">
     465           <?php echo esc_html(__('Upgrade now to premium plugin', 'options-for-twenty-twenty-one')); ?>
     466        </a>
     467
     468    </p>
     469
     470    <hr style="margin:12px 0;">
     471
     472    <p>
     473        <strong>✨ Need help with your WordPress site?</strong>
     474        🚀 Slow, want new features, or need a glow-up?
     475        <a href="https://webd.uk/services/?utm_campaign=notice&utm_term=options-for-twenty-twenty-one" class="button-secondary" style="margin-left:6px; vertical-align: middle;">Explore our services</a>
     476    </p>
    417477
    418478</div>
    419479
    420480<script type="text/javascript">
    421     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     481    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    422482        jQuery.ajax({
    423483            url: ajaxurl,
    424484            data: {
    425                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    426                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     485                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     486                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    427487            }
    428488        });
     
    434494                }
    435495
    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 
     496            } elseif (
     497                time() > (strtotime('+1 hour', filectime(__DIR__))) &&
     498                get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() &&
     499                !get_option(self::$plugin_prefix . '_donated')
     500            ) {
     501
     502?>
     503
     504<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     505<p><strong><?php
     506/* translators: name of the plugin */
     507printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-twenty-one')), esc_html(self::$plugin_name)); ?></strong></p>
     508<?php
     509
     510// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
    444511                do_action(self::$plugin_prefix . '_admin_notice_donate');
    445512
    446513?>
    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>
     514<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 ...', 'options-for-twenty-twenty-one'); ?></p>
     515<p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php
     516/* translators: name of the plugin */
     517echo esc_attr(sprintf(__('Contribute to %s', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Contribute to %s', 'options-for-twenty-twenty-one')), 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!', 'options-for-twenty-twenty-one')); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', 'options-for-twenty-twenty-one'); ?></a></p>
    449518</div>
    450519
    451520<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()
     521    jQuery(document).on('click', '#<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid', function() {
     522        if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', 'options-for-twenty-twenty-one')); ?>)) {
     523            alert(<?php echo json_encode(__('Thank you!', 'options-for-twenty-twenty-one')); ?>);
     524            jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').fadeTo(100, 0, function() {
     525                jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').slideUp(100, function() {
     526                    jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').remove()
    458527                });
    459528            });
     
    461530                url: ajaxurl,
    462531                data: {
    463                     action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
     532                    action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
    464533                    donated: 'true',
    465                     _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     534                    _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    466535                }
    467536            });
    468537        } else {
    469             window.location.assign('<?php echo self::upgrade_link(); ?>');
     538            window.location.assign('<?php echo esc_url(self::upgrade_link()); ?>');
    470539        }
    471540    });
    472     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     541    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    473542        jQuery.ajax({
    474543            url: ajaxurl,
    475544            data: {
    476                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    477                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     545                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     546                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    478547            }
    479548        });
     
    509578                    is_admin() &&
    510579                    $pagenow === 'customize.php' &&
    511                     isset($_GET['theme']) &&
    512                     !in_array($_GET['theme'], $themes, true)
     580                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     581                    !in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    513582                ) && !(
    514583                    !is_admin() &&
    515584                    $pagenow === 'index.php' &&
    516                     isset($_GET['customize_theme']) &&
    517                     isset($_GET['customize_changeset_uuid']) &&
    518                     !in_array($_GET['customize_theme'], $themes, true)
     585                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     586                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     587                    !in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    519588                )
    520589            ) {
     
    530599                    is_admin() &&
    531600                    $pagenow === 'customize.php' &&
    532                     isset($_GET['theme']) &&
    533                     in_array($_GET['theme'], $themes, true)
     601                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     602                    in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    534603                ) || (
    535604                    !is_admin() &&
    536605                    $pagenow === 'index.php' &&
    537                     isset($_GET['customize_theme']) &&
    538                     isset($_GET['customize_changeset_uuid']) &&
    539                     in_array($_GET['customize_theme'], $themes, true)
     606                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     607                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     608                    in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    540609                ))
    541610            ) {
     
    549618                    !is_admin() &&
    550619                    $pagenow === 'index.php' &&
    551                     isset($_GET['customize_theme']) &&
    552                     isset($_GET['customize_changeset_uuid'])
     620                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     621                    isset($_GET['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    553622               
    554623            ) {
    555624
    556                 $child = wp_get_theme($_GET['customize_theme']);
     625                $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    557626
    558627                if (isset($child->template) && in_array($child->template, $themes, true)) {
     
    568637                is_admin() &&
    569638                ($pagenow === 'customize.php' || $pagenow === 'admin-ajax.php') &&
    570                 isset($_GET['theme']) || (isset($_POST['customize_theme']) && isset($_POST['customize_changeset_uuid']))
     639                (
     640                    isset($_GET['theme']) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     641                    (
     642                        isset($_POST['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Missing
     643                        isset($_POST['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Missing
     644                    )
     645                )
    571646            ) {
    572647
    573                 if (isset($_GET['theme'])) {
    574 
    575                     $child = wp_get_theme($_GET['theme']);
     648                if (isset($_GET['theme'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     649
     650                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    576651
    577652                } else {
    578653
    579                     $child = wp_get_theme($_POST['customize_theme']);
     654                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_POST['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Missing
    580655
    581656                }
     
    622697
    623698?>
    624 <span class="description customize-control-description"><?php echo $this->description; ?></span>
     699<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
    625700<?php
    626701
     
    647722?>
    648723        </ul>
    649         <input type="hidden" id="_customize-input-<?php echo $this->id; ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
     724        <input type="hidden" id="_customize-input-<?php echo esc_attr($this->id); ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
    650725<?php
    651726
  • options-for-twenty-twenty-one/tags/1.7.9/options-for-twenty-twenty-one.php

    r3180355 r3418400  
    22/*
    33 * Plugin Name: Options for Twenty Twenty-One
    4  * Version: 1.7.8
     4 * Version: 1.7.9
    55 * Plugin URI: https://webd.uk/product/options-for-twenty-twenty-one-upgrade/
    66 * Description: Adds powerful customizer options to modify all aspects of the default Wordpress theme Twenty Twenty-One
    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: options-for-twenty-twenty-one
    1012 */
     
    2224    class options_for_twenty_twenty_one_class {
    2325
    24         public static $version = '1.7.8';
     26        public static $version = '1.7.9';
    2527
    2628        function __construct() {
     
    14131415            $wp_customize->add_control('inject_breadcrumbs', array(
    14141416                'label'         => __('Inject Breadcrumbs', 'options-for-twenty-twenty-one'),
    1415                 'description'   => sprintf(wp_kses(__('Inject <a href="%s">Yoast SEO</a> or <a href="%s">Breadcrumb NavXT</a> breadcrumbs above page content.', 'options-for-twenty-twenty-one'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=wordpress-seo&tab=search&type=term')), esc_url(admin_url('plugin-install.php?s=breadcrumb-navxt&tab=search&type=term'))),
     1417/* translators: links to plugin installer */
     1418                'description'   => sprintf(wp_kses(__('Inject <a href="%1$s">Yoast SEO</a> or <a href="%2$s">Breadcrumb NavXT</a> breadcrumbs above page content.', 'options-for-twenty-twenty-one'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=wordpress-seo&tab=search&type=term')), esc_url(admin_url('plugin-install.php?s=breadcrumb-navxt&tab=search&type=term'))),
    14161419                'section'       => 'oftto_content',
    14171420                'settings'      => 'inject_breadcrumbs',
     
    26752678@media only screen and (min-width: 482px) {
    26762679    :root {
    2677         --responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     2680        --responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    26782681    }
    26792682}
    26802683@media only screen and (min-width: 822px) {
    26812684    :root {
    2682         --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     2685        --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    26832686    }
    26842687}
     
    27092712    }
    27102713}<?php if (($mod + 200) > 822) { ?>
    2711 @media only screen and (min-width: 822px) and (max-width: <?php echo $mod + 200; ?>px) {
     2714@media only screen and (min-width: 822px) and (max-width: <?php echo wp_kses($mod + 200, 'strip'); ?>px) {
    27122715    .post-thumbnail,
    27132716    .entry-content .wp-audio-shortcode,
     
    27352738    }
    27362739}<?php } ?>
    2737 @media only screen and (min-width: <?php echo $mod + 201; ?>px) {
     2740@media only screen and (min-width: <?php echo wp_kses($mod + 201, 'strip'); ?>px) {
    27382741    .post-thumbnail,
    27392742    .entry-content .wp-audio-shortcode,
     
    27472750    .author-bio,
    27482751    .search-form {
    2749         max-width: <?php echo $mod; ?>px;
     2752        max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    27502753    }
    27512754    .author-bio.show-avatars .author-bio-content {
    2752         max-width: <?php echo $mod -90; ?>px;
     2755        max-width: <?php echo wp_kses($mod - 90, 'strip'); ?>px;
    27532756    }
    27542757    .entry-content > .alignleft,
    27552758    .entry-content > .alignright {
    2756         margin-right: calc(0.5 * (100vw - <?php echo $mod; ?>px));
     2759        margin-right: calc(0.5 * (100vw - <?php echo wp_kses($mod, 'strip'); ?>px));
    27572760    }
    27582761    .entry-content > .alignleft,
    27592762    .entry-content > .alignright {
    2760         max-width: calc(0.5 * <?php echo $mod; ?>px);
     2763        max-width: calc(0.5 * <?php echo wp_kses($mod, 'strip'); ?>px);
    27612764    }
    27622765}
     
    28072810@media only screen and (min-width: 822px) {
    28082811    :root {
    2809         --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     2812        --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    28102813    }
    28112814}
    2812 @media only screen and (min-width: 822px) and (max-width: <?php echo $mod + 200; ?>px) {
     2815@media only screen and (min-width: 822px) and (max-width: <?php echo wp_kses($mod + 200, 'strip'); ?>px) {
    28132816    .widget-area,
    28142817    .pagination,
     
    28352838    }
    28362839}
    2837 @media only screen and (min-width: <?php echo $mod + 201; ?>px) {
     2840@media only screen and (min-width: <?php echo wp_kses($mod + 201, 'strip'); ?>px) {
    28382841    .widget-area,
    28392842    .pagination,
     
    28472850    .wp-block-pullquote.alignwide blockquote,
    28482851    hr.wp-block-separator:not(.is-style-dots).alignwide {
    2849         max-width: <?php echo $mod; ?>px;
     2852        max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    28502853    }
    28512854    .entry-header .post-thumbnail,
     
    28572860    .alignfull [class*=inner-container] > .alignwide,
    28582861    .alignwide [class*=inner-container] > .alignwide {
    2859         width: <?php echo $mod; ?>px;
     2862        width: <?php echo wp_kses($mod, 'strip'); ?>px;
    28602863    }
    28612864}
     
    28722875?>
    28732876.woocommerce .content-area {
    2874     max-width: var(--responsive--align<?php echo $mod; ?>-width);
     2877    max-width: var(--responsive--align<?php echo wp_kses($mod, 'strip'); ?>-width);
    28752878    margin-left: auto;
    28762879    margin-right: auto;
     
    29232926
    29242927?>
    2925 @media (min-width: <?php echo $alignwide_max_width; ?>px) {
    2926     .<?php echo $taxonomy; ?> .page-header {
     2928@media (min-width: <?php echo wp_kses($alignwide_max_width, 'strip'); ?>px) {
     2929    .<?php echo wp_kses($taxonomy, 'strip'); ?> .page-header {
    29272930        max-width: none;
    29282931    }
    29292932}
    2930 .<?php echo $taxonomy; ?> .search-result-count {
     2933.<?php echo wp_kses($taxonomy, 'strip'); ?> .search-result-count {
    29312934    max-width: none;
    29322935}
    2933 .<?php echo $taxonomy; ?> .site-main {
     2936.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main {
    29342937    display: flex;
    29352938    flex-wrap: wrap;
     
    29392942}
    29402943@media (min-width: 482px) {
    2941     .<?php echo $taxonomy; ?> .site-main {
     2944    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main {
    29422945        padding-left: 1rem;
    29432946        padding-right: 1rem;
    29442947    }
    29452948}
    2946 .<?php echo $taxonomy; ?> .site-main>* {
     2949.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>* {
    29472950    padding: 1rem;
    29482951    width: 100%;
    29492952}
    2950 .<?php echo $taxonomy; ?> .site-main>article {
     2953.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article {
    29512954    margin: 0;
    29522955}
    29532956@media (min-width: 482px) {
    2954     .<?php echo $taxonomy; ?> .site-main>article {
     2957    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article {
    29552958        width: 50%;
    29562959    }
    29572960}
    29582961@media (min-width: 822px) {
    2959     .<?php echo $taxonomy; ?> .site-main>article {
     2962    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article {
    29602963        width: 25%;
    29612964    }
    29622965}
    2963 .<?php echo $taxonomy; ?> .site-main>article>.entry-header {
     2966.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header {
    29642967    width: 100%;
    29652968    position: relative;
    29662969    margin: 0;
    29672970}
    2968 .<?php echo $taxonomy; ?> .site-main>article:not(.has-post-thumbnail)>.entry-header {
     2971.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article:not(.has-post-thumbnail)>.entry-header {
    29692972    border: 1px solid #28303d;
    29702973}
    2971 .<?php echo $taxonomy; ?> .site-main>article>.entry-header::after {
     2974.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header::after {
    29722975    display: block;
    29732976    content: '';
    29742977    padding-bottom: 65%;
    29752978}
    2976 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2979.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29772980    position: absolute;
    29782981    z-index: 2;
     
    29822985}
    29832986@media (max-width: 482px) {
    2984     .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2987    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29852988        font-size: 8vw;
    29862989    }
    29872990}
    29882991@media (min-width: 482px) and (max-width: 821px) {
    2989     .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2992    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29902993        font-size: 4vw;
    29912994    }
    29922995}
    29932996@media (min-width: 822px) {
    2994     .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2997    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29952998        font-size: 2vw;
    29962999    }
    29973000}
    2998 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title>a {
     3001.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title>a {
    29993002    display: flex;
    30003003    justify-content: center;
     
    30063009    font-weight: 900;
    30073010}
    3008 .<?php echo $taxonomy; ?> .site-main>article.has-post-thumbnail>.entry-header>.entry-title>a {
     3011.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article.has-post-thumbnail>.entry-header>.entry-title>a {
    30093012    text-shadow: -1px -1px 0 var(--global--color-background), 1px -1px 0 var(--global--color-background), -1px 1px 0 var(--global--color-background), 1px 1px 0 var(--global--color-background);
    30103013}
    3011 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.post-thumbnail {
     3014.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.post-thumbnail {
    30123015    margin: 0;
    30133016}
    3014 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.post-thumbnail img {
     3017.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.post-thumbnail img {
    30153018    position: absolute;
    30163019    width: 100% !important;
     
    30213024    z-index: 1;
    30223025}
    3023 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.post-thumbnail figcaption,
    3024 .<?php echo $taxonomy; ?> .site-main>article>.entry-footer,
    3025 .<?php echo $taxonomy; ?> .site-main>article>.entry-content {
     3026.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.post-thumbnail figcaption,
     3027.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-footer,
     3028.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-content {
    30263029    display: none;
    30273030}
    3028 .<?php echo $taxonomy; ?> .pagination {
     3031.<?php echo wp_kses($taxonomy, 'strip'); ?> .pagination {
    30293032padding: 0;
    30303033max-width: none;
    30313034border: none;
    30323035}
    3033 .<?php echo $taxonomy; ?> .pagination .nav-links {
     3036.<?php echo wp_kses($taxonomy, 'strip'); ?> .pagination .nav-links {
    30343037padding: 1rem;
    30353038border-top: 3px solid var(--global--color-border);
     
    30493052?>
    30503053<?php echo (get_theme_mod('site_wide_header_height') ? '' : '.home '); ?>#masthead {
    3051     min-height: <?php echo $mod; ?>vh;
     3054    min-height: <?php echo wp_kses($mod, 'strip'); ?>vh;
    30523055}
    30533056<?php echo (get_theme_mod('site_wide_header_height') ? '' : '.home'); ?>.admin-bar #masthead {
    3054     min-height: calc(<?php echo $mod; ?>vh - 32px);
     3057    min-height: calc(<?php echo wp_kses($mod, 'strip'); ?>vh - 32px);
    30553058}
    30563059@media screen and (max-width: 782px) {
    30573060    <?php echo (get_theme_mod('site_wide_header_height') ? '' : '.home'); ?>.admin-bar #masthead {
    3058         min-height: calc(<?php echo $mod; ?>vh - 46px);
     3061        min-height: calc(<?php echo wp_kses($mod, 'strip'); ?>vh - 46px);
    30593062    }
    30603063}
     
    31033106?>
    31043107#masthead-wrapper {<?php if ($header_color) { ?>
    3105     background-color: <?php echo $header_color; ?>;<?php } if ($header_image) { ?>
    3106     background-image: url("<?php echo (wp_get_attachment_image_src($header_image, 'full') ? wp_get_attachment_image_src($header_image, 'full')[0] : ''); ?>");<?php } ?>
     3108    background-color: <?php echo wp_kses($header_color, 'strip'); ?>;<?php } if ($header_image) { ?>
     3109    background-image: url("<?php echo esc_url(wp_get_attachment_image_src($header_image, 'full') ? wp_get_attachment_image_src($header_image, 'full')[0] : ''); ?>");<?php } ?>
    31073110    background-size: cover;
    31083111    background-repeat: no-repeat;<?php if (get_theme_mod('fix_header_background_image')) { ?>
     
    31263129?>
    31273130.site-header {
    3128     padding-top: <?php echo ($this->oftto_are_title_and_tagline_displayed() ? round($mod * 22.5 / 72, 1) . 'px' : '74px'); ?>;
     3131    padding-top: <?php echo wp_kses(($this->oftto_are_title_and_tagline_displayed() ? round($mod * 22.5 / 72, 1) . 'px' : '74px'), 'strip'); ?>;
    31293132}
    31303133@media only screen and (min-width: 482px) {
    31313134    .site-header {
    3132         padding-top: <?php echo round($mod * 40 / 72, 1); ?>px;
     3135        padding-top: <?php echo wp_kses(round($mod * 40 / 72, 1), 'strip'); ?>px;
    31333136    }
    31343137}
    31353138@media only screen and (min-width: 822px) {
    31363139    .site-header {
    3137         padding-top: <?php echo $mod; ?>px;
     3140        padding-top: <?php echo wp_kses($mod, 'strip'); ?>px;
    31383141    }
    31393142}
     
    31493152?>
    31503153.site-header {
    3151     padding-bottom: <?php echo round($mod * 60 / 90, 1); ?>px;
     3154    padding-bottom: <?php echo wp_kses(round($mod * 60 / 90, 1), 'strip'); ?>px;
    31523155}
    31533156@media only screen and (min-width: 482px) {
    31543157    .site-header {
    3155         padding-bottom: <?php echo round($mod * 40 / 90, 1); ?>px;
     3158        padding-bottom: <?php echo wp_kses(round($mod * 40 / 90, 1), 'strip'); ?>px;
    31563159    }
    31573160}
    31583161@media only screen and (min-width: 822px) {
    31593162    .site-header {
    3160         padding-bottom: <?php echo $mod; ?>px;
     3163        padding-bottom: <?php echo wp_kses($mod, 'strip'); ?>px;
    31613164    }
    31623165}
     
    31923195?>
    31933196.site-header .site-logo .custom-logo {
    3194     max-width: <?php echo $mod; ?>px;
     3197    max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    31953198    max-height: none;
    31963199    width: 100%;
     
    32143217
    32153218?>
    3216 @media screen and (max-width: <?php echo $mobile_breakpoint; ?>px) {
     3219@media screen and (max-width: <?php echo wp_kses($mobile_breakpoint, 'strip'); ?>px) {
    32173220    .site-branding, .site-header:not(.has-logo).has-title-and-tagline .site-branding {
    32183221        width: 100%;
     
    32253228
    32263229?>
    3227 @media screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3230@media screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    32283231    .site-branding, .site-header:not(.has-logo).has-title-and-tagline .site-branding {
    32293232        width: 100%;
     
    32533256?>
    32543257.site-title {
    3255     font-size: <?php echo $mod / 1000; ?>rem;
     3258    font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    32563259}
    32573260<?php
     
    33853388            }
    33863389
    3387 
    3388 
    3389 
    3390 
    3391 
    3392 
    3393 
    3394 
    3395 
    3396 
    3397 
    33983390            if (get_theme_mod('mobile_submenus_on_desktop')) {
    33993391
     
    34093401
    34103402?>
    3411 @media only screen and (min-width: 481px) and (max-width: <?php echo $mobile_breakpoint; ?>px) {
     3403@media only screen and (min-width: 481px) and (max-width: <?php echo wp_kses($mobile_breakpoint, 'strip'); ?>px) {
    34123404<?php
    34133405
     
    35413533            if ($mod) {
    35423534?>
    3543 @media only screen and (max-width: <?php echo $mobile_breakpoint; ?>px) {
     3535@media only screen and (max-width: <?php echo wp_kses($mobile_breakpoint, 'strip'); ?>px) {
    35443536<?php
    35453537
     
    35883580            if ($mod) {
    35893581?>
    3590 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3582@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    35913583<?php
    35923584
     
    36413633?>
    36423634.primary-navigation > .primary-menu-container, .primary-navigation-open .primary-navigation > .primary-menu-container {
    3643     border-width: <?php echo $mod; ?>px;
     3635    border-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    36443636}
    36453637<?php
     
    36553647
    36563648?>
    3657 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3649@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    36583650    .primary-navigation {
    3659         padding: <?php echo $mod; ?>px 0;
     3651        padding: <?php echo wp_kses($mod, 'strip'); ?>px 0;
    36603652    }
    36613653}
     
    36823674@media only screen and (max-width: 481px) {
    36833675.menu-button-container .button.button .dropdown-icon.open .svg-icon {
    3684 width: <?php echo $mod; ?>px;
    3685 height: <?php echo $mod; ?>px;
     3676width: <?php echo wp_kses($mod, 'strip'); ?>px;
     3677height: <?php echo wp_kses($mod, 'strip'); ?>px;
    36863678}
    36873679}
     
    36953687@media only screen and (min-width: 482px) {
    36963688.menu-button-container .button.button .dropdown-icon.open .svg-icon {
    3697 width: <?php echo (($mod - 24) / 2) + 24; ?>px;
    3698 height: <?php echo (($mod - 24) / 2) + 24; ?>px;
     3689width: <?php echo wp_kses((($mod - 24) / 2) + 24, 'strip'); ?>px;
     3690height: <?php echo wp_kses((($mod - 24) / 2) + 24, 'strip'); ?>px;
    36993691}
    37003692}
    37013693@media only screen and (min-width: 822px) {
    37023694.menu-button-container .button.button .dropdown-icon.open .svg-icon {
    3703 width: <?php echo $mod; ?>px;
    3704 height: <?php echo $mod; ?>px;
     3695width: <?php echo wp_kses($mod, 'strip'); ?>px;
     3696height: <?php echo wp_kses($mod, 'strip'); ?>px;
    37053697}
    37063698}
     
    37283720@media only screen and (max-width: 481px) {
    37293721.primary-navigation a:link, .primary-navigation a:visited {
    3730 color: <?php echo $mod; ?>;
     3722color: <?php echo wp_kses($mod, 'strip'); ?>;
    37313723}
    37323724}
     
    37403732@media only screen and (max-width: 481px) {
    37413733.primary-navigation a:hover {
    3742 color: <?php echo $mod; ?>;
     3734color: <?php echo wp_kses($mod, 'strip'); ?>;
    37433735}
    37443736}
     
    37533745
    37543746?>
    3755 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3747@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    37563748    .primary-navigation .primary-menu-container > ul > .menu-item > a {
    3757         padding: <?php echo $size / 1000 * 0.75; ?>rem;
    3758         font-size: <?php echo $size / 1000; ?>rem;
    3759         line-height: <?php echo $size / 1000; ?>rem;
     3749        padding: <?php echo wp_kses($size / 1000 * 0.75, 'strip'); ?>rem;
     3750        font-size: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
     3751        line-height: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
    37603752    }
    37613753    .primary-navigation .primary-menu-container > ul > #menu-item-search > .svg-icon {
    3762         width: <?php echo $size / 1000; ?>rem;
    3763         height: <?php echo $size / 1000; ?>rem;
     3754        width: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
     3755        height: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
    37643756    }
    37653757    .primary-navigation > div > .menu-wrapper .sub-menu-toggle {
    3766         height: <?php echo $size / 1000 * 2.5; ?>rem;
     3758        height: <?php echo wp_kses($size / 1000 * 2.5, 'strip'); ?>rem;
    37673759    }
    37683760    .primary-navigation > div > .menu-wrapper .sub-menu-toggle .icon-plus svg, .primary-navigation > div > .menu-wrapper .sub-menu-toggle .icon-minus svg {
    3769         height: <?php echo $size / 1000; ?>rem;
    3770         width: <?php echo $size / 1000; ?>rem;
     3761        height: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
     3762        width: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
    37713763        margin-top: 0;
    3772         margin-right: <?php echo $size / 1000 * 0.15; ?>rem;
     3764        margin-right: <?php echo wp_kses($size / 1000 * 0.15, 'strip'); ?>rem;
    37733765    }
    37743766    .primary-navigation > div > .menu-wrapper .sub-menu-toggle {
    3775         width: <?php echo $size / 1000 * 2; ?>rem;
     3767        width: <?php echo wp_kses($size / 1000 * 2, 'strip'); ?>rem;
    37763768    }
    37773769}
     
    37883780
    37893781?>
    3790 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3782@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    37913783    .primary-navigation .primary-menu-container > ul > .menu-item > a {
    3792         padding-left: <?php echo round($size * $mod, 2); ?>rem;
    3793         padding-right: <?php echo round($size * $mod, 2); ?>rem;
     3784        padding-left: <?php echo wp_kses(round($size * $mod, 2), 'strip'); ?>rem;
     3785        padding-right: <?php echo wp_kses(round($size * $mod, 2), 'strip'); ?>rem;
    37943786    }
    37953787}
     
    38053797?>
    38063798.primary-navigation .sub-menu {
    3807     border-color: <?= $mod; ?>;
     3799    border-color: <?php echo wp_kses($mod, 'strip'); ?>;
    38083800}
    38093801@media only screen and (min-width: 482px) {
    38103802    .primary-navigation > div > .menu-wrapper > li > .sub-menu:before,
    38113803    .primary-navigation > div > .menu-wrapper > li > .sub-menu:after {
    3812         border-color: <?= $mod; ?> transparent;
     3804        border-color: <?php echo wp_kses($mod, 'strip'); ?> transparent;
    38133805    }
    38143806}
     
    38243816@media only screen and (min-width: 482px) {
    38253817    .primary-navigation > div > .menu-wrapper > li > .sub-menu:after {
    3826         border-bottom-color: <?php echo $mod; ?>;
     3818        border-bottom-color: <?php echo wp_kses($mod, 'strip'); ?>;
    38273819    }
    38283820    .primary-navigation > div > .menu-wrapper > li > .sub-menu, .primary-navigation > div > .menu-wrapper > li > .sub-menu li {
    3829         background-color: <?php echo $mod; ?>;
     3821        background-color: <?php echo wp_kses($mod, 'strip'); ?>;
    38303822    }
    38313823}
     
    38373829            if ($mod) {
    38383830?>
    3839 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3831@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    38403832    .primary-navigation .sub-menu .menu-item > a:link, .primary-navigation .sub-menu .menu-item > a:visited {
    3841         color: <?php echo $mod; ?>;
     3833        color: <?php echo wp_kses($mod, 'strip'); ?>;
    38423834    }
    38433835}
     
    38503842?>
    38513843.primary-navigation .sub-menu .menu-item > a {
    3852     font-size: <?php echo $mod / 1000 * 1.125; ?>rem;
     3844    font-size: <?php echo wp_kses($mod / 1000 * 1.125, 'strip'); ?>rem;
    38533845}
    38543846@media only screen and (min-width: 482px) {
    38553847    .primary-navigation .sub-menu .menu-item > a {
    3856         font-size: <?php echo $mod / 1000; ?>rem;
     3848        font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    38573849    }
    38583850}
     
    38963888?>
    38973889.entry-title {
    3898     font-size: <?php echo $mod / 1000 * 0.9; ?>rem;
     3890    font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    38993891}
    39003892@media only screen and (min-width: 652px) {
    39013893    .entry-title {
    3902         font-size: <?php echo $mod / 1000; ?>rem;
     3894        font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    39033895    }
    39043896}
     
    39133905?>
    39143906.site-main > article .entry-content {
    3915     margin-top: <?php echo $mod - 1; ?>px;
     3907    margin-top: <?php echo wp_kses($mod - 1, 'strip'); ?>px;
    39163908}
    39173909@media only screen and (min-width: 482px) {
    39183910.site-main > article .entry-content {
    3919     margin-top: <?php echo round(($mod - 1) / 3 * 2, 1); ?>px;
     3911    margin-top: <?php echo wp_kses(round(($mod - 1) / 3 * 2, 1), 'strip'); ?>px;
    39203912}
    39213913}
     
    39373929?>
    39383930.comments-title, .comment-reply-title {
    3939     font-size: <?php echo $mod / 1000 * 0.75; ?>rem;
     3931    font-size: <?php echo wp_kses($mod / 1000 * 0.75, 'strip'); ?>rem;
    39403932}
    39413933@media only screen and (min-width: 652px) {
    39423934    .comments-title, .comment-reply-title {
    3943         font-size: <?php echo $mod / 1000; ?>rem;
     3935        font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    39443936    }
    39453937}
     
    39683960?>
    39693961#footer-wrapper {<?php if ($footer_color) { ?>
    3970     background-color: <?php echo $footer_color; ?>;<?php } if ($footer_image) { ?>
    3971     background-image: url("<?php echo (wp_get_attachment_image_src($footer_image, 'full') ? wp_get_attachment_image_src($footer_image, 'full')[0] : ''); ?>");<?php } ?>
     3962    background-color: <?php echo wp_kses($footer_color, 'strip'); ?>;<?php } if ($footer_image) { ?>
     3963    background-image: url("<?php echo esc_url(wp_get_attachment_image_src($footer_image, 'full') ? wp_get_attachment_image_src($footer_image, 'full')[0] : ''); ?>");<?php } ?>
    39723964    background-size: cover;
    39733965    background-repeat: no-repeat;
     
    39893981?>
    39903982.widget-area, .no-widgets .site-footer {
    3991     margin-top: <?php echo $mod -1; ?>px;
     3983    margin-top: <?php echo wp_kses($mod -1, 'strip'); ?>px;
    39923984}
    39933985@media only screen and (max-width: 481px) {
    39943986    .widget-area {
    3995         margin-top: <?php echo ceil(($mod -1) / 2); ?>px;
     3987        margin-top: <?php echo wp_kses(ceil(($mod -1) / 2), 'strip'); ?>px;
    39963988    }
    39973989}
     
    40053997.widget-area {
    40063998    display: grid;
    4007     grid-template-columns: repeat(<?php echo $mod; ?>, 1fr);
     3999    grid-template-columns: repeat(<?php echo wp_kses($mod, 'strip'); ?>, 1fr);
    40084000    column-gap: calc(2 * var(--global--spacing-horizontal));
    40094001}
     
    40174009@media only screen and (min-width: 652px) {
    40184010    .widget-area {
    4019         grid-template-columns: repeat(<?php echo $mod; ?>, 1fr);
     4011        grid-template-columns: repeat(<?php echo wp_kses($mod, 'strip'); ?>, 1fr);
    40204012    }
    40214013}
     
    40294021@media only screen and (min-width: 1024px) {
    40304022    .widget-area {
    4031         grid-template-columns: repeat(<?php echo $mod; ?>, 1fr);
     4023        grid-template-columns: repeat(<?php echo wp_kses($mod, 'strip'); ?>, 1fr);
    40324024    }
    40334025}
     
    40424034@media only screen and (min-width: 822px) {
    40434035    .site-footer {
    4044         max-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     4036        max-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    40454037    }
    40464038}
    4047 @media only screen and (min-width: 822px) and (max-width: <?php echo $mod + 200; ?>px) {
     4039@media only screen and (min-width: 822px) and (max-width: <?php echo wp_kses($mod + 200, 'strip'); ?>px) {
    40484040    .site-footer {
    40494041        max-width: calc(100vw - 200px);
    40504042    }
    40514043}
    4052 @media only screen and (min-width: <?php echo $mod + 201; ?>px) {
     4044@media only screen and (min-width: <?php echo wp_kses($mod + 201, 'strip'); ?>px) {
    40534045    .site-footer {
    4054         max-width: <?php echo $mod; ?>px;
     4046        max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    40554047    }
    40564048}
     
    40974089?>
    40984090.site-footer .site-logo .custom-logo {
    4099     max-width: <?php echo $mod; ?>px;
     4091    max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    41004092    max-height: none;
    41014093    width: 100%;
     
    43524344                    if ($breadcrumbs) {
    43534345
    4354                         echo '<div id="breadcrumbs" class="alignwide">' . $breadcrumbs . '</div>';
     4346                        echo wp_kses('<div id="breadcrumbs" class="alignwide">' . $breadcrumbs . '</div>', 'post');
    43554347
    43564348                    } elseif (function_exists('bcn_display')) {
     
    45494541<?php
    45504542        printf(
    4551             __('This plugin requires the default Wordpress theme Twenty Twenty-One to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-twenty-one'),
    4552             get_template()
     4543/* translators: active theme slug */
     4544            esc_html(__('This plugin requires the default Wordpress theme Twenty Twenty-One to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-twenty-one')),
     4545            esc_html(get_template())
    45534546        );
    45544547?>
    45554548
    4556 <a href="<?php echo add_query_arg('search', 'twentytwentyone', admin_url('theme-install.php')); ?>" title="<?php esc_attr_e('Twenty Twenty-One', 'options-for-twenty-twenty-one'); ?>"><?php
     4549<a href="<?php echo esc_url(add_query_arg('search', 'twentytwentyone', admin_url('theme-install.php'))); ?>" title="<?php esc_attr_e('Twenty Twenty-One', 'options-for-twenty-twenty-one'); ?>"><?php
    45574550        esc_html_e('Please install and activate or live preview the Twenty Twenty-One theme (or a child theme thereof)', 'options-for-twenty-twenty-one');
    45584551?></a>.</p>
  • options-for-twenty-twenty-one/tags/1.7.9/readme.txt

    r3412272 r3418400  
    66Tested up to: 6.9
    77Requires PHP: 5.6
    8 Stable tag: 1.7.8
     8Stable tag: 1.7.9
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    225225== Changelog ==
    226226
     227= 1.7.9 =
     228* General housekeeping preparing for "Plugin Check" code review
     229
    227230= 1.7.8 =
    228231* Remove Customizer CSS due to incompatible change introduced in WordPress v6.7
     
    528531== Upgrade Notice ==
    529532
    530 = 1.7.8 =
    531 * Remove Customizer CSS due to incompatible change introduced in WordPress v6.7
     533= 1.7.9 =
     534* General housekeeping preparing for "Plugin Check" code review
  • options-for-twenty-twenty-one/trunk/includes/class-oftto-common.php

    r2986074 r3418400  
    11<?php
    22/*
    3  * Version: 1.3.9
     3 * Version: 1.4.2
    44 */
    55
     
    4343        public static function plugin_text_domain() {
    4444
    45             return self::$plugin_text_domain;
     45            return 'options-for-twenty-twenty-one';
    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/' . 'options-for-twenty-twenty-one' . '/';
    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', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-twenty-one'), 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>', 'options-for-twenty-twenty-one'), 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>.', 'options-for-twenty-twenty-one'), 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', 'options-for-twenty-twenty-one') . '</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', 'options-for-twenty-twenty-one') . '</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                            'options-for-twenty-twenty-one'
    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.', 'options-for-twenty-twenty-one');
    148152
    149153            return $upgrade_nag;
     
    234238
    235239                $generated_css = sprintf('%s { %s: %s; }', $selector, $style, $prefix.$mod.$postfix);
    236                 echo $generated_css;
     240
     241// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     242                echo wp_strip_all_tags($generated_css);
    237243
    238244            } elseif ($mod) {
    239245
    240246                $generated_css = sprintf('%s { %s:%s; }', $selector, $style, $prefix.$value.$postfix);
    241                 echo $generated_css;
     247
     248// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     249                echo wp_strip_all_tags($generated_css);
    242250
    243251            }
     
    249257            if (self::$plugin_premium_class) {
    250258
    251                 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'], 'https://webd.uk/product/' . self::$plugin_text_domain . '-upgrade/');
    252 
     259                if (isset($_SERVER['HTTP_HOST'])) {
     260
     261                    return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . filter_var(wp_unslash($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL)), 'https://webd.uk/product/' . 'options-for-twenty-twenty-one' . '-upgrade/');
     262
     263                } else {
     264
     265                    return 'https://webd.uk/product/' . 'options-for-twenty-twenty-one' . '-upgrade/';
     266
     267                }
    253268
    254269            } else {
     
    276291            $settings_links = array();
    277292
    278             $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', self::$plugin_text_domain)) . '">' . __('Settings', self::$plugin_text_domain) . '</a>';
     293            $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', 'options-for-twenty-twenty-one')) . '">' . __('Settings', 'options-for-twenty-twenty-one') . '</a>';
    279294
    280295            if (!get_option(self::$plugin_prefix . '_purchased')) {
     
    284299                    if (self::$plugin_upgrade) {
    285300
    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>';
     301/* translators: name of the plugin */
     302                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-twenty-one') . '</a>';
    287303
    288304                    } else {
    289305
    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>';
     306/* translators: name of the plugin */
     307                        $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-twenty-one') . '</a>';
    291308
    292309                    }
     
    294311                } else {
    295312
    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>';
     313/* translators: name of the plugin */
     314                    $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name) : sprintf(__('Contribute to %s', 'options-for-twenty-twenty-one'), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', 'options-for-twenty-twenty-one') : __('Support Us', 'options-for-twenty-twenty-one')) . '</a>';
    297315
    298316                }
     
    300318                if ($premium) {
    301319
    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>';
     320                    $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', 'options-for-twenty-twenty-one')) . '" 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', 'options-for-twenty-twenty-one') . '</a>';
     321
     322                } elseif (self::$plugin_trial && !is_plugin_active('options-for-twenty-twenty-one' . '-premium/' . 'options-for-twenty-twenty-one' . '-premium.php')) {
     323
     324/* translators: name of the plugin */
     325                    $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', 'options-for-twenty-twenty-one') . '</a>';
    307326
    308327                }
     
    310329            } elseif ($premium) {
    311330
    312                 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', self::$plugin_text_domain) . '</strong>';
     331                $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', 'options-for-twenty-twenty-one') . '</strong>';
    313332
    314333            }
     
    320339        public static function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) {
    321340
    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>';
     341            if ($plugin_file === 'options-for-twenty-twenty-one' . '/' . 'options-for-twenty-twenty-one' . '.php') {
     342
     343                $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', 'options-for-twenty-twenty-one') . '" style="color: orange; font-weight: bold;">' . __('Need help?', 'options-for-twenty-twenty-one') . '</a>';
     344/* translators: name of the plugin */
     345                $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . 'options-for-twenty-twenty-one' . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', 'options-for-twenty-twenty-one'), self::$plugin_name)) . '">' . __('Review plugin', 'options-for-twenty-twenty-one') . '</a>';
    326346
    327347            }
     
    357377?>
    358378
    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>
     379<div class="notice notice-error is-dismissible <?php echo esc_html(self::$plugin_prefix); ?>-notice">
     380
     381<p><strong><?php echo esc_html(self::$plugin_name); ?></strong><br />
     382<?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', 'options-for-twenty-twenty-one'); ?></p>
     383
     384<p><a href="<?php
     385/* translators: name of the plugin */
     386echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Download %s Premium', 'options-for-twenty-twenty-one')), esc_html(self::$plugin_name)); ?></a></p>
    365387
    366388</div>
    367389
    368390<script type="text/javascript">
    369     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     391    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    370392        jQuery.ajax({
    371393            url: ajaxurl,
    372394            data: {
    373                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    374                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     395                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     396                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    375397            }
    376398        });
     
    380402<?php
    381403
    382                 } elseif (!class_exists(self::$plugin_premium_class) && time() > (strtotime('+1 hour', filectime(__DIR__))) && get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version()) {
    383 
    384 ?>
    385 
    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                } elseif (
     405                    !class_exists(self::$plugin_premium_class) &&
     406                    time() > (strtotime('+1 hour', filectime(__DIR__))) &&
     407                    get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version()
     408                ) {
     409
     410?>
     411
     412<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     413
     414    <p style="font-size:15px;"><strong><?php
     415/* translators: name of the plugin */
     416printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-twenty-one')), esc_html(self::$plugin_name)); ?></strong></p>
    389417<?php
    390418
    391419                    if (self::$plugin_trial == true) {
    392420
    393                         _e('Would you like to try even more features? Download your 7 day free trial now!', self::$plugin_text_domain);
     421?>
     422
     423    <p><?php echo esc_html(__('Would you like to try even more features? Download your 7 day free trial now!', 'options-for-twenty-twenty-one')); ?></p>
     424<?php
    394425
    395426                    } else {
    396427
    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);
     428?>
     429
     430    <p>
     431        <?php
     432/* translators: name of the plugin */
     433                        echo esc_html(sprintf(__('Upgrade now to %s Premium to enable more options and features and contribute to the further development of this plugin.', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>
     434    </p>
     435<?php
    398436
    399437                    }
    400438
    401 ?></p>
    402 
    403 <p><?php
     439?>
     440
     441    <p><?php
    404442
    405443                    if (self::$plugin_trial == true) {
     
    407445?>
    408446
    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>
    410 
     447        <a href="<?php echo esc_url(self::premium_link()); ?>"
     448           title="<?php
     449/* translators: name of the plugin */
     450echo esc_attr(sprintf(__('Try %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>"
     451           class="button-secondary">
     452           <?php echo esc_html(__('Try premium plugin free for 7 days', 'options-for-twenty-twenty-one')); ?>
     453        </a>
    411454<?php
    412455
     
    414457
    415458?>
    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>
     459
     460        <a href="<?php echo esc_url(self::upgrade_link()); ?>"
     461           title="<?php
     462/* translators: name of the plugin */
     463echo esc_attr(sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>"
     464           class="button-primary">
     465           <?php echo esc_html(__('Upgrade now to premium plugin', 'options-for-twenty-twenty-one')); ?>
     466        </a>
     467
     468    </p>
     469
     470    <hr style="margin:12px 0;">
     471
     472    <p>
     473        <strong>✨ Need help with your WordPress site?</strong>
     474        🚀 Slow, want new features, or need a glow-up?
     475        <a href="https://webd.uk/services/?utm_campaign=notice&utm_term=options-for-twenty-twenty-one" class="button-secondary" style="margin-left:6px; vertical-align: middle;">Explore our services</a>
     476    </p>
    417477
    418478</div>
    419479
    420480<script type="text/javascript">
    421     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     481    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    422482        jQuery.ajax({
    423483            url: ajaxurl,
    424484            data: {
    425                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    426                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     485                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     486                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    427487            }
    428488        });
     
    434494                }
    435495
    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 
     496            } elseif (
     497                time() > (strtotime('+1 hour', filectime(__DIR__))) &&
     498                get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() &&
     499                !get_option(self::$plugin_prefix . '_donated')
     500            ) {
     501
     502?>
     503
     504<div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice">
     505<p><strong><?php
     506/* translators: name of the plugin */
     507printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-twenty-one')), esc_html(self::$plugin_name)); ?></strong></p>
     508<?php
     509
     510// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound
    444511                do_action(self::$plugin_prefix . '_admin_notice_donate');
    445512
    446513?>
    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>
     514<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 ...', 'options-for-twenty-twenty-one'); ?></p>
     515<p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php
     516/* translators: name of the plugin */
     517echo esc_attr(sprintf(__('Contribute to %s', 'options-for-twenty-twenty-one'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Contribute to %s', 'options-for-twenty-twenty-one')), 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!', 'options-for-twenty-twenty-one')); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', 'options-for-twenty-twenty-one'); ?></a></p>
    449518</div>
    450519
    451520<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()
     521    jQuery(document).on('click', '#<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid', function() {
     522        if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', 'options-for-twenty-twenty-one')); ?>)) {
     523            alert(<?php echo json_encode(__('Thank you!', 'options-for-twenty-twenty-one')); ?>);
     524            jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').fadeTo(100, 0, function() {
     525                jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').slideUp(100, function() {
     526                    jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').remove()
    458527                });
    459528            });
     
    461530                url: ajaxurl,
    462531                data: {
    463                     action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
     532                    action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
    464533                    donated: 'true',
    465                     _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     534                    _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    466535                }
    467536            });
    468537        } else {
    469             window.location.assign('<?php echo self::upgrade_link(); ?>');
     538            window.location.assign('<?php echo esc_url(self::upgrade_link()); ?>');
    470539        }
    471540    });
    472     jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {
     541    jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() {
    473542        jQuery.ajax({
    474543            url: ajaxurl,
    475544            data: {
    476                 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',
    477                 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'
     545                action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler',
     546                _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>'
    478547            }
    479548        });
     
    509578                    is_admin() &&
    510579                    $pagenow === 'customize.php' &&
    511                     isset($_GET['theme']) &&
    512                     !in_array($_GET['theme'], $themes, true)
     580                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     581                    !in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    513582                ) && !(
    514583                    !is_admin() &&
    515584                    $pagenow === 'index.php' &&
    516                     isset($_GET['customize_theme']) &&
    517                     isset($_GET['customize_changeset_uuid']) &&
    518                     !in_array($_GET['customize_theme'], $themes, true)
     585                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     586                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     587                    !in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    519588                )
    520589            ) {
     
    530599                    is_admin() &&
    531600                    $pagenow === 'customize.php' &&
    532                     isset($_GET['theme']) &&
    533                     in_array($_GET['theme'], $themes, true)
     601                    isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     602                    in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    534603                ) || (
    535604                    !is_admin() &&
    536605                    $pagenow === 'index.php' &&
    537                     isset($_GET['customize_theme']) &&
    538                     isset($_GET['customize_changeset_uuid']) &&
    539                     in_array($_GET['customize_theme'], $themes, true)
     606                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     607                    isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     608                    in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    540609                ))
    541610            ) {
     
    549618                    !is_admin() &&
    550619                    $pagenow === 'index.php' &&
    551                     isset($_GET['customize_theme']) &&
    552                     isset($_GET['customize_changeset_uuid'])
     620                    isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     621                    isset($_GET['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    553622               
    554623            ) {
    555624
    556                 $child = wp_get_theme($_GET['customize_theme']);
     625                $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    557626
    558627                if (isset($child->template) && in_array($child->template, $themes, true)) {
     
    568637                is_admin() &&
    569638                ($pagenow === 'customize.php' || $pagenow === 'admin-ajax.php') &&
    570                 isset($_GET['theme']) || (isset($_POST['customize_theme']) && isset($_POST['customize_changeset_uuid']))
     639                (
     640                    isset($_GET['theme']) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     641                    (
     642                        isset($_POST['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Missing
     643                        isset($_POST['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Missing
     644                    )
     645                )
    571646            ) {
    572647
    573                 if (isset($_GET['theme'])) {
    574 
    575                     $child = wp_get_theme($_GET['theme']);
     648                if (isset($_GET['theme'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
     649
     650                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
    576651
    577652                } else {
    578653
    579                     $child = wp_get_theme($_POST['customize_theme']);
     654                    $child = wp_get_theme(sanitize_file_name(wp_unslash($_POST['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Missing
    580655
    581656                }
     
    622697
    623698?>
    624 <span class="description customize-control-description"><?php echo $this->description; ?></span>
     699<span class="description customize-control-description"><?php echo esc_html($this->description); ?></span>
    625700<?php
    626701
     
    647722?>
    648723        </ul>
    649         <input type="hidden" id="_customize-input-<?php echo $this->id; ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
     724        <input type="hidden" id="_customize-input-<?php echo esc_attr($this->id); ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />
    650725<?php
    651726
  • options-for-twenty-twenty-one/trunk/options-for-twenty-twenty-one.php

    r3180355 r3418400  
    22/*
    33 * Plugin Name: Options for Twenty Twenty-One
    4  * Version: 1.7.8
     4 * Version: 1.7.9
    55 * Plugin URI: https://webd.uk/product/options-for-twenty-twenty-one-upgrade/
    66 * Description: Adds powerful customizer options to modify all aspects of the default Wordpress theme Twenty Twenty-One
    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: options-for-twenty-twenty-one
    1012 */
     
    2224    class options_for_twenty_twenty_one_class {
    2325
    24         public static $version = '1.7.8';
     26        public static $version = '1.7.9';
    2527
    2628        function __construct() {
     
    14131415            $wp_customize->add_control('inject_breadcrumbs', array(
    14141416                'label'         => __('Inject Breadcrumbs', 'options-for-twenty-twenty-one'),
    1415                 'description'   => sprintf(wp_kses(__('Inject <a href="%s">Yoast SEO</a> or <a href="%s">Breadcrumb NavXT</a> breadcrumbs above page content.', 'options-for-twenty-twenty-one'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=wordpress-seo&tab=search&type=term')), esc_url(admin_url('plugin-install.php?s=breadcrumb-navxt&tab=search&type=term'))),
     1417/* translators: links to plugin installer */
     1418                'description'   => sprintf(wp_kses(__('Inject <a href="%1$s">Yoast SEO</a> or <a href="%2$s">Breadcrumb NavXT</a> breadcrumbs above page content.', 'options-for-twenty-twenty-one'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=wordpress-seo&tab=search&type=term')), esc_url(admin_url('plugin-install.php?s=breadcrumb-navxt&tab=search&type=term'))),
    14161419                'section'       => 'oftto_content',
    14171420                'settings'      => 'inject_breadcrumbs',
     
    26752678@media only screen and (min-width: 482px) {
    26762679    :root {
    2677         --responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     2680        --responsive--aligndefault-width: min(calc(100vw - 4 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    26782681    }
    26792682}
    26802683@media only screen and (min-width: 822px) {
    26812684    :root {
    2682         --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     2685        --responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    26832686    }
    26842687}
     
    27092712    }
    27102713}<?php if (($mod + 200) > 822) { ?>
    2711 @media only screen and (min-width: 822px) and (max-width: <?php echo $mod + 200; ?>px) {
     2714@media only screen and (min-width: 822px) and (max-width: <?php echo wp_kses($mod + 200, 'strip'); ?>px) {
    27122715    .post-thumbnail,
    27132716    .entry-content .wp-audio-shortcode,
     
    27352738    }
    27362739}<?php } ?>
    2737 @media only screen and (min-width: <?php echo $mod + 201; ?>px) {
     2740@media only screen and (min-width: <?php echo wp_kses($mod + 201, 'strip'); ?>px) {
    27382741    .post-thumbnail,
    27392742    .entry-content .wp-audio-shortcode,
     
    27472750    .author-bio,
    27482751    .search-form {
    2749         max-width: <?php echo $mod; ?>px;
     2752        max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    27502753    }
    27512754    .author-bio.show-avatars .author-bio-content {
    2752         max-width: <?php echo $mod -90; ?>px;
     2755        max-width: <?php echo wp_kses($mod - 90, 'strip'); ?>px;
    27532756    }
    27542757    .entry-content > .alignleft,
    27552758    .entry-content > .alignright {
    2756         margin-right: calc(0.5 * (100vw - <?php echo $mod; ?>px));
     2759        margin-right: calc(0.5 * (100vw - <?php echo wp_kses($mod, 'strip'); ?>px));
    27572760    }
    27582761    .entry-content > .alignleft,
    27592762    .entry-content > .alignright {
    2760         max-width: calc(0.5 * <?php echo $mod; ?>px);
     2763        max-width: calc(0.5 * <?php echo wp_kses($mod, 'strip'); ?>px);
    27612764    }
    27622765}
     
    28072810@media only screen and (min-width: 822px) {
    28082811    :root {
    2809         --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     2812        --responsive--alignwide-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    28102813    }
    28112814}
    2812 @media only screen and (min-width: 822px) and (max-width: <?php echo $mod + 200; ?>px) {
     2815@media only screen and (min-width: 822px) and (max-width: <?php echo wp_kses($mod + 200, 'strip'); ?>px) {
    28132816    .widget-area,
    28142817    .pagination,
     
    28352838    }
    28362839}
    2837 @media only screen and (min-width: <?php echo $mod + 201; ?>px) {
     2840@media only screen and (min-width: <?php echo wp_kses($mod + 201, 'strip'); ?>px) {
    28382841    .widget-area,
    28392842    .pagination,
     
    28472850    .wp-block-pullquote.alignwide blockquote,
    28482851    hr.wp-block-separator:not(.is-style-dots).alignwide {
    2849         max-width: <?php echo $mod; ?>px;
     2852        max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    28502853    }
    28512854    .entry-header .post-thumbnail,
     
    28572860    .alignfull [class*=inner-container] > .alignwide,
    28582861    .alignwide [class*=inner-container] > .alignwide {
    2859         width: <?php echo $mod; ?>px;
     2862        width: <?php echo wp_kses($mod, 'strip'); ?>px;
    28602863    }
    28612864}
     
    28722875?>
    28732876.woocommerce .content-area {
    2874     max-width: var(--responsive--align<?php echo $mod; ?>-width);
     2877    max-width: var(--responsive--align<?php echo wp_kses($mod, 'strip'); ?>-width);
    28752878    margin-left: auto;
    28762879    margin-right: auto;
     
    29232926
    29242927?>
    2925 @media (min-width: <?php echo $alignwide_max_width; ?>px) {
    2926     .<?php echo $taxonomy; ?> .page-header {
     2928@media (min-width: <?php echo wp_kses($alignwide_max_width, 'strip'); ?>px) {
     2929    .<?php echo wp_kses($taxonomy, 'strip'); ?> .page-header {
    29272930        max-width: none;
    29282931    }
    29292932}
    2930 .<?php echo $taxonomy; ?> .search-result-count {
     2933.<?php echo wp_kses($taxonomy, 'strip'); ?> .search-result-count {
    29312934    max-width: none;
    29322935}
    2933 .<?php echo $taxonomy; ?> .site-main {
     2936.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main {
    29342937    display: flex;
    29352938    flex-wrap: wrap;
     
    29392942}
    29402943@media (min-width: 482px) {
    2941     .<?php echo $taxonomy; ?> .site-main {
     2944    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main {
    29422945        padding-left: 1rem;
    29432946        padding-right: 1rem;
    29442947    }
    29452948}
    2946 .<?php echo $taxonomy; ?> .site-main>* {
     2949.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>* {
    29472950    padding: 1rem;
    29482951    width: 100%;
    29492952}
    2950 .<?php echo $taxonomy; ?> .site-main>article {
     2953.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article {
    29512954    margin: 0;
    29522955}
    29532956@media (min-width: 482px) {
    2954     .<?php echo $taxonomy; ?> .site-main>article {
     2957    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article {
    29552958        width: 50%;
    29562959    }
    29572960}
    29582961@media (min-width: 822px) {
    2959     .<?php echo $taxonomy; ?> .site-main>article {
     2962    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article {
    29602963        width: 25%;
    29612964    }
    29622965}
    2963 .<?php echo $taxonomy; ?> .site-main>article>.entry-header {
     2966.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header {
    29642967    width: 100%;
    29652968    position: relative;
    29662969    margin: 0;
    29672970}
    2968 .<?php echo $taxonomy; ?> .site-main>article:not(.has-post-thumbnail)>.entry-header {
     2971.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article:not(.has-post-thumbnail)>.entry-header {
    29692972    border: 1px solid #28303d;
    29702973}
    2971 .<?php echo $taxonomy; ?> .site-main>article>.entry-header::after {
     2974.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header::after {
    29722975    display: block;
    29732976    content: '';
    29742977    padding-bottom: 65%;
    29752978}
    2976 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2979.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29772980    position: absolute;
    29782981    z-index: 2;
     
    29822985}
    29832986@media (max-width: 482px) {
    2984     .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2987    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29852988        font-size: 8vw;
    29862989    }
    29872990}
    29882991@media (min-width: 482px) and (max-width: 821px) {
    2989     .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2992    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29902993        font-size: 4vw;
    29912994    }
    29922995}
    29932996@media (min-width: 822px) {
    2994     .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title {
     2997    .<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title {
    29952998        font-size: 2vw;
    29962999    }
    29973000}
    2998 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.entry-title>a {
     3001.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.entry-title>a {
    29993002    display: flex;
    30003003    justify-content: center;
     
    30063009    font-weight: 900;
    30073010}
    3008 .<?php echo $taxonomy; ?> .site-main>article.has-post-thumbnail>.entry-header>.entry-title>a {
     3011.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article.has-post-thumbnail>.entry-header>.entry-title>a {
    30093012    text-shadow: -1px -1px 0 var(--global--color-background), 1px -1px 0 var(--global--color-background), -1px 1px 0 var(--global--color-background), 1px 1px 0 var(--global--color-background);
    30103013}
    3011 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.post-thumbnail {
     3014.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.post-thumbnail {
    30123015    margin: 0;
    30133016}
    3014 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.post-thumbnail img {
     3017.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.post-thumbnail img {
    30153018    position: absolute;
    30163019    width: 100% !important;
     
    30213024    z-index: 1;
    30223025}
    3023 .<?php echo $taxonomy; ?> .site-main>article>.entry-header>.post-thumbnail figcaption,
    3024 .<?php echo $taxonomy; ?> .site-main>article>.entry-footer,
    3025 .<?php echo $taxonomy; ?> .site-main>article>.entry-content {
     3026.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-header>.post-thumbnail figcaption,
     3027.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-footer,
     3028.<?php echo wp_kses($taxonomy, 'strip'); ?> .site-main>article>.entry-content {
    30263029    display: none;
    30273030}
    3028 .<?php echo $taxonomy; ?> .pagination {
     3031.<?php echo wp_kses($taxonomy, 'strip'); ?> .pagination {
    30293032padding: 0;
    30303033max-width: none;
    30313034border: none;
    30323035}
    3033 .<?php echo $taxonomy; ?> .pagination .nav-links {
     3036.<?php echo wp_kses($taxonomy, 'strip'); ?> .pagination .nav-links {
    30343037padding: 1rem;
    30353038border-top: 3px solid var(--global--color-border);
     
    30493052?>
    30503053<?php echo (get_theme_mod('site_wide_header_height') ? '' : '.home '); ?>#masthead {
    3051     min-height: <?php echo $mod; ?>vh;
     3054    min-height: <?php echo wp_kses($mod, 'strip'); ?>vh;
    30523055}
    30533056<?php echo (get_theme_mod('site_wide_header_height') ? '' : '.home'); ?>.admin-bar #masthead {
    3054     min-height: calc(<?php echo $mod; ?>vh - 32px);
     3057    min-height: calc(<?php echo wp_kses($mod, 'strip'); ?>vh - 32px);
    30553058}
    30563059@media screen and (max-width: 782px) {
    30573060    <?php echo (get_theme_mod('site_wide_header_height') ? '' : '.home'); ?>.admin-bar #masthead {
    3058         min-height: calc(<?php echo $mod; ?>vh - 46px);
     3061        min-height: calc(<?php echo wp_kses($mod, 'strip'); ?>vh - 46px);
    30593062    }
    30603063}
     
    31033106?>
    31043107#masthead-wrapper {<?php if ($header_color) { ?>
    3105     background-color: <?php echo $header_color; ?>;<?php } if ($header_image) { ?>
    3106     background-image: url("<?php echo (wp_get_attachment_image_src($header_image, 'full') ? wp_get_attachment_image_src($header_image, 'full')[0] : ''); ?>");<?php } ?>
     3108    background-color: <?php echo wp_kses($header_color, 'strip'); ?>;<?php } if ($header_image) { ?>
     3109    background-image: url("<?php echo esc_url(wp_get_attachment_image_src($header_image, 'full') ? wp_get_attachment_image_src($header_image, 'full')[0] : ''); ?>");<?php } ?>
    31073110    background-size: cover;
    31083111    background-repeat: no-repeat;<?php if (get_theme_mod('fix_header_background_image')) { ?>
     
    31263129?>
    31273130.site-header {
    3128     padding-top: <?php echo ($this->oftto_are_title_and_tagline_displayed() ? round($mod * 22.5 / 72, 1) . 'px' : '74px'); ?>;
     3131    padding-top: <?php echo wp_kses(($this->oftto_are_title_and_tagline_displayed() ? round($mod * 22.5 / 72, 1) . 'px' : '74px'), 'strip'); ?>;
    31293132}
    31303133@media only screen and (min-width: 482px) {
    31313134    .site-header {
    3132         padding-top: <?php echo round($mod * 40 / 72, 1); ?>px;
     3135        padding-top: <?php echo wp_kses(round($mod * 40 / 72, 1), 'strip'); ?>px;
    31333136    }
    31343137}
    31353138@media only screen and (min-width: 822px) {
    31363139    .site-header {
    3137         padding-top: <?php echo $mod; ?>px;
     3140        padding-top: <?php echo wp_kses($mod, 'strip'); ?>px;
    31383141    }
    31393142}
     
    31493152?>
    31503153.site-header {
    3151     padding-bottom: <?php echo round($mod * 60 / 90, 1); ?>px;
     3154    padding-bottom: <?php echo wp_kses(round($mod * 60 / 90, 1), 'strip'); ?>px;
    31523155}
    31533156@media only screen and (min-width: 482px) {
    31543157    .site-header {
    3155         padding-bottom: <?php echo round($mod * 40 / 90, 1); ?>px;
     3158        padding-bottom: <?php echo wp_kses(round($mod * 40 / 90, 1), 'strip'); ?>px;
    31563159    }
    31573160}
    31583161@media only screen and (min-width: 822px) {
    31593162    .site-header {
    3160         padding-bottom: <?php echo $mod; ?>px;
     3163        padding-bottom: <?php echo wp_kses($mod, 'strip'); ?>px;
    31613164    }
    31623165}
     
    31923195?>
    31933196.site-header .site-logo .custom-logo {
    3194     max-width: <?php echo $mod; ?>px;
     3197    max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    31953198    max-height: none;
    31963199    width: 100%;
     
    32143217
    32153218?>
    3216 @media screen and (max-width: <?php echo $mobile_breakpoint; ?>px) {
     3219@media screen and (max-width: <?php echo wp_kses($mobile_breakpoint, 'strip'); ?>px) {
    32173220    .site-branding, .site-header:not(.has-logo).has-title-and-tagline .site-branding {
    32183221        width: 100%;
     
    32253228
    32263229?>
    3227 @media screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3230@media screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    32283231    .site-branding, .site-header:not(.has-logo).has-title-and-tagline .site-branding {
    32293232        width: 100%;
     
    32533256?>
    32543257.site-title {
    3255     font-size: <?php echo $mod / 1000; ?>rem;
     3258    font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    32563259}
    32573260<?php
     
    33853388            }
    33863389
    3387 
    3388 
    3389 
    3390 
    3391 
    3392 
    3393 
    3394 
    3395 
    3396 
    3397 
    33983390            if (get_theme_mod('mobile_submenus_on_desktop')) {
    33993391
     
    34093401
    34103402?>
    3411 @media only screen and (min-width: 481px) and (max-width: <?php echo $mobile_breakpoint; ?>px) {
     3403@media only screen and (min-width: 481px) and (max-width: <?php echo wp_kses($mobile_breakpoint, 'strip'); ?>px) {
    34123404<?php
    34133405
     
    35413533            if ($mod) {
    35423534?>
    3543 @media only screen and (max-width: <?php echo $mobile_breakpoint; ?>px) {
     3535@media only screen and (max-width: <?php echo wp_kses($mobile_breakpoint, 'strip'); ?>px) {
    35443536<?php
    35453537
     
    35883580            if ($mod) {
    35893581?>
    3590 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3582@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    35913583<?php
    35923584
     
    36413633?>
    36423634.primary-navigation > .primary-menu-container, .primary-navigation-open .primary-navigation > .primary-menu-container {
    3643     border-width: <?php echo $mod; ?>px;
     3635    border-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    36443636}
    36453637<?php
     
    36553647
    36563648?>
    3657 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3649@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    36583650    .primary-navigation {
    3659         padding: <?php echo $mod; ?>px 0;
     3651        padding: <?php echo wp_kses($mod, 'strip'); ?>px 0;
    36603652    }
    36613653}
     
    36823674@media only screen and (max-width: 481px) {
    36833675.menu-button-container .button.button .dropdown-icon.open .svg-icon {
    3684 width: <?php echo $mod; ?>px;
    3685 height: <?php echo $mod; ?>px;
     3676width: <?php echo wp_kses($mod, 'strip'); ?>px;
     3677height: <?php echo wp_kses($mod, 'strip'); ?>px;
    36863678}
    36873679}
     
    36953687@media only screen and (min-width: 482px) {
    36963688.menu-button-container .button.button .dropdown-icon.open .svg-icon {
    3697 width: <?php echo (($mod - 24) / 2) + 24; ?>px;
    3698 height: <?php echo (($mod - 24) / 2) + 24; ?>px;
     3689width: <?php echo wp_kses((($mod - 24) / 2) + 24, 'strip'); ?>px;
     3690height: <?php echo wp_kses((($mod - 24) / 2) + 24, 'strip'); ?>px;
    36993691}
    37003692}
    37013693@media only screen and (min-width: 822px) {
    37023694.menu-button-container .button.button .dropdown-icon.open .svg-icon {
    3703 width: <?php echo $mod; ?>px;
    3704 height: <?php echo $mod; ?>px;
     3695width: <?php echo wp_kses($mod, 'strip'); ?>px;
     3696height: <?php echo wp_kses($mod, 'strip'); ?>px;
    37053697}
    37063698}
     
    37283720@media only screen and (max-width: 481px) {
    37293721.primary-navigation a:link, .primary-navigation a:visited {
    3730 color: <?php echo $mod; ?>;
     3722color: <?php echo wp_kses($mod, 'strip'); ?>;
    37313723}
    37323724}
     
    37403732@media only screen and (max-width: 481px) {
    37413733.primary-navigation a:hover {
    3742 color: <?php echo $mod; ?>;
     3734color: <?php echo wp_kses($mod, 'strip'); ?>;
    37433735}
    37443736}
     
    37533745
    37543746?>
    3755 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3747@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    37563748    .primary-navigation .primary-menu-container > ul > .menu-item > a {
    3757         padding: <?php echo $size / 1000 * 0.75; ?>rem;
    3758         font-size: <?php echo $size / 1000; ?>rem;
    3759         line-height: <?php echo $size / 1000; ?>rem;
     3749        padding: <?php echo wp_kses($size / 1000 * 0.75, 'strip'); ?>rem;
     3750        font-size: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
     3751        line-height: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
    37603752    }
    37613753    .primary-navigation .primary-menu-container > ul > #menu-item-search > .svg-icon {
    3762         width: <?php echo $size / 1000; ?>rem;
    3763         height: <?php echo $size / 1000; ?>rem;
     3754        width: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
     3755        height: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
    37643756    }
    37653757    .primary-navigation > div > .menu-wrapper .sub-menu-toggle {
    3766         height: <?php echo $size / 1000 * 2.5; ?>rem;
     3758        height: <?php echo wp_kses($size / 1000 * 2.5, 'strip'); ?>rem;
    37673759    }
    37683760    .primary-navigation > div > .menu-wrapper .sub-menu-toggle .icon-plus svg, .primary-navigation > div > .menu-wrapper .sub-menu-toggle .icon-minus svg {
    3769         height: <?php echo $size / 1000; ?>rem;
    3770         width: <?php echo $size / 1000; ?>rem;
     3761        height: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
     3762        width: <?php echo wp_kses($size / 1000, 'strip'); ?>rem;
    37713763        margin-top: 0;
    3772         margin-right: <?php echo $size / 1000 * 0.15; ?>rem;
     3764        margin-right: <?php echo wp_kses($size / 1000 * 0.15, 'strip'); ?>rem;
    37733765    }
    37743766    .primary-navigation > div > .menu-wrapper .sub-menu-toggle {
    3775         width: <?php echo $size / 1000 * 2; ?>rem;
     3767        width: <?php echo wp_kses($size / 1000 * 2, 'strip'); ?>rem;
    37763768    }
    37773769}
     
    37883780
    37893781?>
    3790 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3782@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    37913783    .primary-navigation .primary-menu-container > ul > .menu-item > a {
    3792         padding-left: <?php echo round($size * $mod, 2); ?>rem;
    3793         padding-right: <?php echo round($size * $mod, 2); ?>rem;
     3784        padding-left: <?php echo wp_kses(round($size * $mod, 2), 'strip'); ?>rem;
     3785        padding-right: <?php echo wp_kses(round($size * $mod, 2), 'strip'); ?>rem;
    37943786    }
    37953787}
     
    38053797?>
    38063798.primary-navigation .sub-menu {
    3807     border-color: <?= $mod; ?>;
     3799    border-color: <?php echo wp_kses($mod, 'strip'); ?>;
    38083800}
    38093801@media only screen and (min-width: 482px) {
    38103802    .primary-navigation > div > .menu-wrapper > li > .sub-menu:before,
    38113803    .primary-navigation > div > .menu-wrapper > li > .sub-menu:after {
    3812         border-color: <?= $mod; ?> transparent;
     3804        border-color: <?php echo wp_kses($mod, 'strip'); ?> transparent;
    38133805    }
    38143806}
     
    38243816@media only screen and (min-width: 482px) {
    38253817    .primary-navigation > div > .menu-wrapper > li > .sub-menu:after {
    3826         border-bottom-color: <?php echo $mod; ?>;
     3818        border-bottom-color: <?php echo wp_kses($mod, 'strip'); ?>;
    38273819    }
    38283820    .primary-navigation > div > .menu-wrapper > li > .sub-menu, .primary-navigation > div > .menu-wrapper > li > .sub-menu li {
    3829         background-color: <?php echo $mod; ?>;
     3821        background-color: <?php echo wp_kses($mod, 'strip'); ?>;
    38303822    }
    38313823}
     
    38373829            if ($mod) {
    38383830?>
    3839 @media only screen and (min-width: <?php echo $mobile_breakpoint + 1; ?>px) {
     3831@media only screen and (min-width: <?php echo wp_kses($mobile_breakpoint + 1, 'strip'); ?>px) {
    38403832    .primary-navigation .sub-menu .menu-item > a:link, .primary-navigation .sub-menu .menu-item > a:visited {
    3841         color: <?php echo $mod; ?>;
     3833        color: <?php echo wp_kses($mod, 'strip'); ?>;
    38423834    }
    38433835}
     
    38503842?>
    38513843.primary-navigation .sub-menu .menu-item > a {
    3852     font-size: <?php echo $mod / 1000 * 1.125; ?>rem;
     3844    font-size: <?php echo wp_kses($mod / 1000 * 1.125, 'strip'); ?>rem;
    38533845}
    38543846@media only screen and (min-width: 482px) {
    38553847    .primary-navigation .sub-menu .menu-item > a {
    3856         font-size: <?php echo $mod / 1000; ?>rem;
     3848        font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    38573849    }
    38583850}
     
    38963888?>
    38973889.entry-title {
    3898     font-size: <?php echo $mod / 1000 * 0.9; ?>rem;
     3890    font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    38993891}
    39003892@media only screen and (min-width: 652px) {
    39013893    .entry-title {
    3902         font-size: <?php echo $mod / 1000; ?>rem;
     3894        font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    39033895    }
    39043896}
     
    39133905?>
    39143906.site-main > article .entry-content {
    3915     margin-top: <?php echo $mod - 1; ?>px;
     3907    margin-top: <?php echo wp_kses($mod - 1, 'strip'); ?>px;
    39163908}
    39173909@media only screen and (min-width: 482px) {
    39183910.site-main > article .entry-content {
    3919     margin-top: <?php echo round(($mod - 1) / 3 * 2, 1); ?>px;
     3911    margin-top: <?php echo wp_kses(round(($mod - 1) / 3 * 2, 1), 'strip'); ?>px;
    39203912}
    39213913}
     
    39373929?>
    39383930.comments-title, .comment-reply-title {
    3939     font-size: <?php echo $mod / 1000 * 0.75; ?>rem;
     3931    font-size: <?php echo wp_kses($mod / 1000 * 0.75, 'strip'); ?>rem;
    39403932}
    39413933@media only screen and (min-width: 652px) {
    39423934    .comments-title, .comment-reply-title {
    3943         font-size: <?php echo $mod / 1000; ?>rem;
     3935        font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem;
    39443936    }
    39453937}
     
    39683960?>
    39693961#footer-wrapper {<?php if ($footer_color) { ?>
    3970     background-color: <?php echo $footer_color; ?>;<?php } if ($footer_image) { ?>
    3971     background-image: url("<?php echo (wp_get_attachment_image_src($footer_image, 'full') ? wp_get_attachment_image_src($footer_image, 'full')[0] : ''); ?>");<?php } ?>
     3962    background-color: <?php echo wp_kses($footer_color, 'strip'); ?>;<?php } if ($footer_image) { ?>
     3963    background-image: url("<?php echo esc_url(wp_get_attachment_image_src($footer_image, 'full') ? wp_get_attachment_image_src($footer_image, 'full')[0] : ''); ?>");<?php } ?>
    39723964    background-size: cover;
    39733965    background-repeat: no-repeat;
     
    39893981?>
    39903982.widget-area, .no-widgets .site-footer {
    3991     margin-top: <?php echo $mod -1; ?>px;
     3983    margin-top: <?php echo wp_kses($mod -1, 'strip'); ?>px;
    39923984}
    39933985@media only screen and (max-width: 481px) {
    39943986    .widget-area {
    3995         margin-top: <?php echo ceil(($mod -1) / 2); ?>px;
     3987        margin-top: <?php echo wp_kses(ceil(($mod -1) / 2), 'strip'); ?>px;
    39963988    }
    39973989}
     
    40053997.widget-area {
    40063998    display: grid;
    4007     grid-template-columns: repeat(<?php echo $mod; ?>, 1fr);
     3999    grid-template-columns: repeat(<?php echo wp_kses($mod, 'strip'); ?>, 1fr);
    40084000    column-gap: calc(2 * var(--global--spacing-horizontal));
    40094001}
     
    40174009@media only screen and (min-width: 652px) {
    40184010    .widget-area {
    4019         grid-template-columns: repeat(<?php echo $mod; ?>, 1fr);
     4011        grid-template-columns: repeat(<?php echo wp_kses($mod, 'strip'); ?>, 1fr);
    40204012    }
    40214013}
     
    40294021@media only screen and (min-width: 1024px) {
    40304022    .widget-area {
    4031         grid-template-columns: repeat(<?php echo $mod; ?>, 1fr);
     4023        grid-template-columns: repeat(<?php echo wp_kses($mod, 'strip'); ?>, 1fr);
    40324024    }
    40334025}
     
    40424034@media only screen and (min-width: 822px) {
    40434035    .site-footer {
    4044         max-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo $mod; ?>px);
     4036        max-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), <?php echo wp_kses($mod, 'strip'); ?>px);
    40454037    }
    40464038}
    4047 @media only screen and (min-width: 822px) and (max-width: <?php echo $mod + 200; ?>px) {
     4039@media only screen and (min-width: 822px) and (max-width: <?php echo wp_kses($mod + 200, 'strip'); ?>px) {
    40484040    .site-footer {
    40494041        max-width: calc(100vw - 200px);
    40504042    }
    40514043}
    4052 @media only screen and (min-width: <?php echo $mod + 201; ?>px) {
     4044@media only screen and (min-width: <?php echo wp_kses($mod + 201, 'strip'); ?>px) {
    40534045    .site-footer {
    4054         max-width: <?php echo $mod; ?>px;
     4046        max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    40554047    }
    40564048}
     
    40974089?>
    40984090.site-footer .site-logo .custom-logo {
    4099     max-width: <?php echo $mod; ?>px;
     4091    max-width: <?php echo wp_kses($mod, 'strip'); ?>px;
    41004092    max-height: none;
    41014093    width: 100%;
     
    43524344                    if ($breadcrumbs) {
    43534345
    4354                         echo '<div id="breadcrumbs" class="alignwide">' . $breadcrumbs . '</div>';
     4346                        echo wp_kses('<div id="breadcrumbs" class="alignwide">' . $breadcrumbs . '</div>', 'post');
    43554347
    43564348                    } elseif (function_exists('bcn_display')) {
     
    45494541<?php
    45504542        printf(
    4551             __('This plugin requires the default Wordpress theme Twenty Twenty-One to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-twenty-one'),
    4552             get_template()
     4543/* translators: active theme slug */
     4544            esc_html(__('This plugin requires the default Wordpress theme Twenty Twenty-One to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-twenty-one')),
     4545            esc_html(get_template())
    45534546        );
    45544547?>
    45554548
    4556 <a href="<?php echo add_query_arg('search', 'twentytwentyone', admin_url('theme-install.php')); ?>" title="<?php esc_attr_e('Twenty Twenty-One', 'options-for-twenty-twenty-one'); ?>"><?php
     4549<a href="<?php echo esc_url(add_query_arg('search', 'twentytwentyone', admin_url('theme-install.php'))); ?>" title="<?php esc_attr_e('Twenty Twenty-One', 'options-for-twenty-twenty-one'); ?>"><?php
    45574550        esc_html_e('Please install and activate or live preview the Twenty Twenty-One theme (or a child theme thereof)', 'options-for-twenty-twenty-one');
    45584551?></a>.</p>
  • options-for-twenty-twenty-one/trunk/readme.txt

    r3412272 r3418400  
    66Tested up to: 6.9
    77Requires PHP: 5.6
    8 Stable tag: 1.7.8
     8Stable tag: 1.7.9
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    225225== Changelog ==
    226226
     227= 1.7.9 =
     228* General housekeeping preparing for "Plugin Check" code review
     229
    227230= 1.7.8 =
    228231* Remove Customizer CSS due to incompatible change introduced in WordPress v6.7
     
    528531== Upgrade Notice ==
    529532
    530 = 1.7.8 =
    531 * Remove Customizer CSS due to incompatible change introduced in WordPress v6.7
     533= 1.7.9 =
     534* General housekeeping preparing for "Plugin Check" code review
Note: See TracChangeset for help on using the changeset viewer.