Changeset 3417427
- Timestamp:
- 12/11/2025 01:47:32 PM (2 days ago)
- Location:
- options-for-twenty-seventeen
- Files:
-
- 1 deleted
- 4 edited
- 3 copied
-
tags/2.5.5 (copied) (copied from options-for-twenty-seventeen/trunk)
-
tags/2.5.5/css (deleted)
-
tags/2.5.5/includes/class-ofts-common.php (modified) (29 diffs)
-
tags/2.5.5/options-for-twenty-seventeen.php (copied) (copied from options-for-twenty-seventeen/trunk/options-for-twenty-seventeen.php) (29 diffs)
-
tags/2.5.5/readme.txt (copied) (copied from options-for-twenty-seventeen/trunk/readme.txt) (3 diffs)
-
trunk/includes/class-ofts-common.php (modified) (29 diffs)
-
trunk/options-for-twenty-seventeen.php (modified) (29 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
options-for-twenty-seventeen/tags/2.5.5/includes/class-ofts-common.php
r2986658 r3417427 1 1 <?php 2 2 /* 3 * Version: 1. 3.93 * Version: 1.4.1 4 4 */ 5 5 … … 43 43 public static function plugin_text_domain() { 44 44 45 return self::$plugin_text_domain;45 return 'options-for-twenty-seventeen'; 46 46 47 47 } … … 61 61 public static function support_url() { 62 62 63 return 'https://wordpress.org/support/plugin/' . self::$plugin_text_domain. '/';63 return 'https://wordpress.org/support/plugin/' . 'options-for-twenty-seventeen' . '/'; 64 64 65 65 } … … 67 67 public static function control_upgrade_text() { 68 68 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-seventeen'), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name) . '</a>'; 70 71 71 72 if (!class_exists(self::$plugin_premium_class) || !get_option(self::$plugin_prefix . '_purchased')) { … … 73 74 if (!class_exists(self::$plugin_premium_class)) { 74 75 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-seventeen'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::premium_link())); 76 78 77 79 } … … 85 87 public static function control_section_description() { 86 88 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-seventeen'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::support_url())); 88 91 89 92 if (self::$plugin_premium_class) { … … 95 98 if (!class_exists(self::$plugin_premium_class)) { 96 99 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-seventeen') . '</strong>' . ' ' . $upgrade_text; 98 101 99 102 } else { 100 103 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-seventeen') . '</strong>' . ' ' . $upgrade_text; 102 105 103 106 } … … 119 122 $section_description .= ' ' . sprintf( 120 123 wp_kses( 124 /* translators: link to plugin install page */ 121 125 __( 122 126 '<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_domain127 'options-for-twenty-seventeen' 124 128 ), 125 129 array('strong' => array(), 'a' => array('href' => array(), 'title' => array())) … … 145 149 public static function control_setting_upgrade_nag() { 146 150 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-seventeen'); 148 152 149 153 return $upgrade_nag; … … 234 238 235 239 $generated_css = sprintf('%s { %s: %s; }', $selector, $style, $prefix.$mod.$postfix); 236 echo $generated_css;240 echo wp_kses($generated_css, 'strip'); 237 241 238 242 } elseif ($mod) { 239 243 240 244 $generated_css = sprintf('%s { %s:%s; }', $selector, $style, $prefix.$value.$postfix); 241 echo $generated_css;245 echo wp_kses($generated_css, 'strip'); 242 246 243 247 } … … 249 253 if (self::$plugin_premium_class) { 250 254 251 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'], 'https://webd.uk/product/' . self::$plugin_text_domain . '-upgrade/'); 252 255 if (isset($_SERVER['HTTP_HOST'])) { 256 257 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . filter_var(wp_unslash($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL)), 'https://webd.uk/product/' . 'options-for-twenty-seventeen' . '-upgrade/'); 258 259 } else { 260 261 return 'https://webd.uk/product/' . 'options-for-twenty-seventeen' . '-upgrade/'; 262 263 } 253 264 254 265 } else { … … 276 287 $settings_links = array(); 277 288 278 $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', self::$plugin_text_domain)) . '">' . __('Settings', self::$plugin_text_domain) . '</a>';289 $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', 'options-for-twenty-seventeen')) . '">' . __('Settings', 'options-for-twenty-seventeen') . '</a>'; 279 290 280 291 if (!get_option(self::$plugin_prefix . '_purchased')) { … … 284 295 if (self::$plugin_upgrade) { 285 296 286 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>'; 297 /* translators: name of the plugin */ 298 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-seventeen') . '</a>'; 287 299 288 300 } else { 289 301 290 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>'; 302 /* translators: name of the plugin */ 303 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', 'options-for-twenty-seventeen'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-seventeen') . '</a>'; 291 304 292 305 } … … 294 307 } else { 295 308 296 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name) : sprintf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', self::$plugin_text_domain) : __('Support Us', self::$plugin_text_domain)) . '</a>'; 309 /* translators: name of the plugin */ 310 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name) : sprintf(__('Contribute to %s', 'options-for-twenty-seventeen'), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', 'options-for-twenty-seventeen') : __('Support Us', 'options-for-twenty-seventeen')) . '</a>'; 297 311 298 312 } … … 300 314 if ($premium) { 301 315 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(' <img src="/wp-admin/images/loading.gif" style="float: none; width: auto; height: auto;" />'); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', self::$plugin_text_domain) . '</a>'; 303 304 } elseif (self::$plugin_trial && !is_plugin_active(self::$plugin_text_domain . '-premium/' . self::$plugin_text_domain . '-premium.php')) { 305 306 $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', self::$plugin_text_domain), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', self::$plugin_text_domain) . '</a>'; 316 $settings_links[] = '<a href="' . wp_nonce_url('?activate-' . self::$plugin_prefix . '=true', self::$plugin_prefix . '_activate') . '" id="' . self::$plugin_prefix . '_activate_upgrade" title="' . esc_attr(__('Activate Purchase', 'options-for-twenty-seventeen')) . '" onclick="jQuery(this).append(' <img src="/wp-admin/images/loading.gif" style="float: none; width: auto; height: auto;" />'); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', 'options-for-twenty-seventeen') . '</a>'; 317 318 } elseif (self::$plugin_trial && !is_plugin_active('options-for-twenty-seventeen' . '-premium/' . 'options-for-twenty-seventeen' . '-premium.php')) { 319 320 /* translators: name of the plugin */ 321 $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', 'options-for-twenty-seventeen') . '</a>'; 307 322 308 323 } … … 310 325 } elseif ($premium) { 311 326 312 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', self::$plugin_text_domain) . '</strong>';327 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', 'options-for-twenty-seventeen') . '</strong>'; 313 328 314 329 } … … 320 335 public static function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) { 321 336 322 if ($plugin_file === self::$plugin_text_domain . '/' . self::$plugin_text_domain . '.php') { 323 324 $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', self::$plugin_text_domain) . '" style="color: orange; font-weight: bold;">' . __('Need help?', self::$plugin_text_domain) . '</a>'; 325 $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . self::$plugin_text_domain . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', self::$plugin_text_domain), self::$plugin_name)) . '">' . __('Review plugin', self::$plugin_text_domain) . '</a>'; 337 if ($plugin_file === 'options-for-twenty-seventeen' . '/' . 'options-for-twenty-seventeen' . '.php') { 338 339 $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', 'options-for-twenty-seventeen') . '" style="color: orange; font-weight: bold;">' . __('Need help?', 'options-for-twenty-seventeen') . '</a>'; 340 /* translators: name of the plugin */ 341 $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . 'options-for-twenty-seventeen' . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', 'options-for-twenty-seventeen'), self::$plugin_name)) . '">' . __('Review plugin', 'options-for-twenty-seventeen') . '</a>'; 326 342 327 343 } … … 357 373 ?> 358 374 359 <div class="notice notice-error is-dismissible <?php echo self::$plugin_prefix; ?>-notice"> 360 361 <p><strong><?php echo self::$plugin_name; ?></strong><br /> 362 <?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', self::$plugin_text_domain); ?></p> 363 364 <p><a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name); ?></a></p> 375 <div class="notice notice-error is-dismissible <?php echo esc_html(self::$plugin_prefix); ?>-notice"> 376 377 <p><strong><?php echo esc_html(self::$plugin_name); ?></strong><br /> 378 <?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', 'options-for-twenty-seventeen'); ?></p> 379 380 <p><a href="<?php 381 /* translators: name of the plugin */ 382 echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Download %s Premium', 'options-for-twenty-seventeen')), esc_html(self::$plugin_name)); ?></a></p> 365 383 366 384 </div> 367 385 368 386 <script type="text/javascript"> 369 jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {387 jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() { 370 388 jQuery.ajax({ 371 389 url: ajaxurl, 372 390 data: { 373 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',374 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'391 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 392 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 375 393 } 376 394 }); … … 380 398 <?php 381 399 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 /> 400 } elseif ( 401 !class_exists(self::$plugin_premium_class) && 402 time() > (strtotime('+1 hour', filectime(__DIR__))) && 403 get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() 404 ) { 405 406 ?> 407 408 <div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice"> 409 410 <p style="font-size:15px;"><strong><?php 411 /* translators: name of the plugin */ 412 printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-seventeen')), esc_html(self::$plugin_name)); ?></strong></p> 389 413 <?php 390 414 391 415 if (self::$plugin_trial == true) { 392 416 393 _e('Would you like to try even more features? Download your 7 day free trial now!', self::$plugin_text_domain); 417 ?> 418 419 <p><?php echo esc_html(__('Would you like to try even more features? Download your 7 day free trial now!', 'options-for-twenty-seventeen')); ?></p> 420 <?php 394 421 395 422 } else { 396 423 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); 424 ?> 425 426 <p> 427 <?php 428 /* translators: name of the plugin */ 429 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-seventeen'), self::$plugin_name)); ?> 430 </p> 431 <?php 398 432 399 433 } 400 434 401 ?> </p>402 403 <p><?php435 ?> 436 437 <p><?php 404 438 405 439 if (self::$plugin_trial == true) { … … 407 441 ?> 408 442 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 443 <a href="<?php echo esc_url(self::premium_link()); ?>" 444 title="<?php 445 /* translators: name of the plugin */ 446 echo esc_attr(sprintf(__('Try %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" 447 class="button-secondary"> 448 <?php echo esc_html(__('Try premium plugin free for 7 days', 'options-for-twenty-seventeen')); ?> 449 </a> 411 450 <?php 412 451 … … 414 453 415 454 ?> 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> 455 456 <a href="<?php echo esc_url(self::upgrade_link()); ?>" 457 title="<?php 458 /* translators: name of the plugin */ 459 echo esc_attr(sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" 460 class="button-primary"> 461 <?php echo esc_html(__('Upgrade now to premium plugin', 'options-for-twenty-seventeen')); ?> 462 </a> 463 464 </p> 465 466 <hr style="margin:12px 0;"> 467 468 <p> 469 <strong>✨ Need help with your WordPress site?</strong> 470 🚀 Slow, want new features, or need a glow-up? 471 <a href="https://webd.uk/services/?utm_campaign=notice&utm_term=options-for-twenty-seventeen" class="button-secondary" style="margin-left:6px; vertical-align: middle;">Explore our services</a> 472 </p> 417 473 418 474 </div> 419 475 420 476 <script type="text/javascript"> 421 jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {477 jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() { 422 478 jQuery.ajax({ 423 479 url: ajaxurl, 424 480 data: { 425 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',426 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'481 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 482 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 427 483 } 428 484 }); … … 434 490 } 435 491 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 492 } elseif ( 493 time() > (strtotime('+1 hour', filectime(__DIR__))) && 494 get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() && 495 !get_option(self::$plugin_prefix . '_donated') 496 ) { 497 498 ?> 499 500 <div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice"> 501 <p><strong><?php 502 /* translators: name of the plugin */ 503 printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-seventeen')), esc_html(self::$plugin_name)); ?></strong></p> 504 <?php 505 506 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 444 507 do_action(self::$plugin_prefix . '_admin_notice_donate'); 445 508 446 509 ?> 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> 510 <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-seventeen'); ?></p> 511 <p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php 512 /* translators: name of the plugin */ 513 echo esc_attr(sprintf(__('Contribute to %s', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Contribute to %s', 'options-for-twenty-seventeen')), 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-seventeen')); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', 'options-for-twenty-seventeen'); ?></a></p> 449 514 </div> 450 515 451 516 <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()517 jQuery(document).on('click', '#<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid', function() { 518 if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', 'options-for-twenty-seventeen')); ?>)) { 519 alert(<?php echo json_encode(__('Thank you!', 'options-for-twenty-seventeen')); ?>); 520 jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').fadeTo(100, 0, function() { 521 jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').slideUp(100, function() { 522 jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').remove() 458 523 }); 459 524 }); … … 461 526 url: ajaxurl, 462 527 data: { 463 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',528 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 464 529 donated: 'true', 465 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'530 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 466 531 } 467 532 }); 468 533 } else { 469 window.location.assign('<?php echo self::upgrade_link(); ?>');534 window.location.assign('<?php echo esc_url(self::upgrade_link()); ?>'); 470 535 } 471 536 }); 472 jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {537 jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() { 473 538 jQuery.ajax({ 474 539 url: ajaxurl, 475 540 data: { 476 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',477 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'541 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 542 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 478 543 } 479 544 }); … … 509 574 is_admin() && 510 575 $pagenow === 'customize.php' && 511 isset($_GET['theme']) && 512 !in_array($_GET['theme'], $themes, true) 576 isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 577 !in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 513 578 ) && !( 514 579 !is_admin() && 515 580 $pagenow === 'index.php' && 516 isset($_GET['customize_theme']) && 517 isset($_GET['customize_changeset_uuid']) && 518 !in_array($_GET['customize_theme'], $themes, true) 581 isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 582 isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 583 !in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 519 584 ) 520 585 ) { … … 530 595 is_admin() && 531 596 $pagenow === 'customize.php' && 532 isset($_GET['theme']) && 533 in_array($_GET['theme'], $themes, true) 597 isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 598 in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 534 599 ) || ( 535 600 !is_admin() && 536 601 $pagenow === 'index.php' && 537 isset($_GET['customize_theme']) && 538 isset($_GET['customize_changeset_uuid']) && 539 in_array($_GET['customize_theme'], $themes, true) 602 isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 603 isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 604 in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 540 605 )) 541 606 ) { … … 549 614 !is_admin() && 550 615 $pagenow === 'index.php' && 551 isset($_GET['customize_theme']) && 552 isset($_GET['customize_changeset_uuid']) 616 isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 617 isset($_GET['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 553 618 554 619 ) { 555 620 556 $child = wp_get_theme( $_GET['customize_theme']);621 $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 557 622 558 623 if (isset($child->template) && in_array($child->template, $themes, true)) { … … 568 633 is_admin() && 569 634 ($pagenow === 'customize.php' || $pagenow === 'admin-ajax.php') && 570 isset($_GET['theme']) || (isset($_POST['customize_theme']) && isset($_POST['customize_changeset_uuid'])) 635 ( 636 isset($_GET['theme']) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended 637 ( 638 isset($_POST['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Missing 639 isset($_POST['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Missing 640 ) 641 ) 571 642 ) { 572 643 573 if (isset($_GET['theme'])) { 574 575 $child = wp_get_theme( $_GET['theme']);644 if (isset($_GET['theme'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 645 646 $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 576 647 577 648 } else { 578 649 579 $child = wp_get_theme( $_POST['customize_theme']);650 $child = wp_get_theme(sanitize_file_name(wp_unslash($_POST['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Missing 580 651 581 652 } … … 622 693 623 694 ?> 624 <span class="description customize-control-description"><?php echo $this->description; ?></span>695 <span class="description customize-control-description"><?php echo esc_html($this->description); ?></span> 625 696 <?php 626 697 … … 647 718 ?> 648 719 </ul> 649 <input type="hidden" id="_customize-input-<?php echo $this->id; ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />720 <input type="hidden" id="_customize-input-<?php echo esc_attr($this->id); ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" /> 650 721 <?php 651 722 -
options-for-twenty-seventeen/tags/2.5.5/options-for-twenty-seventeen.php
r3180351 r3417427 2 2 /* 3 3 * Plugin Name: Options for Twenty Seventeen 4 * Version: 2.5. 44 * Version: 2.5.5 5 5 * Plugin URI: https://webd.uk/product/options-for-twenty-seventeen-upgrade/ 6 6 * Description: Adds powerful customizer options to modify all aspects of the default WordPress theme Twenty Seventeen 7 7 * Author: Webd Ltd 8 8 * Author URI: https://webd.uk 9 * License: GPLv2 or later 10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 9 11 * Text Domain: options-for-twenty-seventeen 10 12 */ … … 22 24 class options_for_twenty_seventeen_class { 23 25 24 public static $version = '2.5. 4';26 public static $version = '2.5.5'; 25 27 26 28 function __construct() { … … 64 66 65 67 $wp_customize->add_section('theme_options', array( 66 'title' => __('Theme Options', ' twentyseventeen'),68 'title' => __('Theme Options', 'options-for-twenty-seventeen'), 67 69 'description' => __('Use these options to customise the page layout and static front page sections.', 'options-for-twenty-seventeen') . ' ' . $section_description 68 70 )); 69 71 70 72 $wp_customize->add_control('page_layout', array( 71 'label' => __( 'Page Layout', ' twentyseventeen' ),73 'label' => __( 'Page Layout', 'options-for-twenty-seventeen' ), 72 74 'section' => 'theme_options', 73 75 'type' => 'radio', 74 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', ' twentyseventeen' ),76 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'options-for-twenty-seventeen' ), 75 77 'choices' => array( 76 'one-column' => __( 'One Column', ' twentyseventeen' ),77 'two-column' => __( 'Two Column', ' twentyseventeen' ),78 'one-column' => __( 'One Column', 'options-for-twenty-seventeen' ), 79 'two-column' => __( 'Two Column', 'options-for-twenty-seventeen' ), 78 80 ), 79 81 'priority' => 1 … … 1622 1624 1623 1625 $control_label = __('Search / Archive Page Layout', 'options-for-twenty-seventeen'); 1624 $control_description = __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', ' twentyseventeen' );1626 $control_description = __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'options-for-twenty-seventeen' ); 1625 1627 oftsCommon::add_hidden_control($wp_customize, 'search_archive_page_layout', 'theme_options', $control_label, $control_description . ' ' . $upgrade_nag, 5); 1626 1628 … … 1722 1724 1723 1725 $control_label = __('Slider Cover', 'options-for-twenty-seventeen'); 1726 /* translators: link to plugin installer */ 1724 1727 $control_description = sprintf(wp_kses(__('Replaces the cover image with a <a href="%s">Nivo</a>, Sliderspack or MetaSlider Slider. Remember to set "Image Size" to "Twenty-Seventeen-featured-image" in your slider settings for best results.', 'options-for-twenty-seventeen'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=nivo-slider-lite&tab=search&type=term'))); 1725 1728 oftsCommon::add_hidden_control($wp_customize, 'nivo_slider_cover', 'ofts_header', $control_label, $control_description . ' ' . $upgrade_nag); … … 1794 1797 1795 1798 $control_label = __('Implement Yoast SEO Breadcrumbs', 'options-for-twenty-seventeen'); 1799 /* translators: link to plugin installer */ 1796 1800 $control_description = sprintf(wp_kses(__('Inject <a href="%s">Yoast SEO</a> breadcrumbs above and / or below single post and page content.', 'options-for-twenty-seventeen'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=wordpress-seo&tab=search&type=term'))); 1797 1801 oftsCommon::add_hidden_control($wp_customize, 'implement_yoast_breadcrumbs', 'ofts_content', $control_label, $control_description . ' ' . $upgrade_nag); … … 1863 1867 )); 1864 1868 1869 /* translators: link to plugin installer */ 1865 1870 oftsCommon::add_hidden_control($wp_customize, 'install_sidemenu', 'sidemenu', 'Install SideMenu', sprintf(wp_kses(__('Add a slide-in side menu and widget area to the site by <a href="%s">installing SideMenu plugin</a>.', 'options-for-twenty-seventeen'), array('a' => array('href' => array()))), esc_url(add_query_arg(array('s' => 'sidemenu+injects', 'tab' => 'search', 'type' => 'term'), self_admin_url('plugin-install.php'))))); 1866 1871 … … 2042 2047 ?> 2043 2048 #page { 2044 <?php echo $mod; ?>2049 <?php echo wp_kses($mod, 'strip'); ?> 2045 2050 } 2046 2051 <?php … … 2281 2286 ?> 2282 2287 .site-title { 2283 font-size: <?php echo $mod / 3000 * 2; ?>rem;2288 font-size: <?php echo wp_kses($mod / 6000, 'strip'); ?>rem; 2284 2289 } 2285 2290 @media screen and (min-width: 48em) { 2286 2291 .site-title { 2287 font-size: <?php echo $mod / 1000; ?>rem;2292 font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem; 2288 2293 } 2289 2294 } … … 2302 2307 ?> 2303 2308 .site-description { 2304 font-size: <?php echo $mod * 0.0008125; ?>rem;2309 font-size: <?php echo wp_kses($mod * 0.0008125, 'strip'); ?>rem; 2305 2310 } 2306 2311 @media screen and (min-width: 48em) { 2307 2312 .site-description { 2308 font-size: <?php echo $mod / 1000; ?>rem;2313 font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem; 2309 2314 } 2310 2315 } … … 2323 2328 @media screen and (min-width: 48em) { 2324 2329 .twentyseventeen-front-page.has-header-image .custom-header-media:before, .twentyseventeen-front-page.has-header-video .custom-header-media:before, .home.blog.has-header-image .custom-header-media:before, .home.blog.has-header-video .custom-header-media:before { 2325 height: <?php echo $mod; ?>%;2330 height: <?php echo wp_kses($mod, 'strip'); ?>%; 2326 2331 } 2327 2332 } … … 2344 2349 ?> 2345 2350 .custom-header-media:before { 2346 background: linear-gradient(to bottom, rgba(<?php echo $r; ?>, <?php echo $g; ?>, <?php echo $b; ?>, 0) 0%, rgba(<?php echo $r; ?>, <?php echo $g; ?>, <?php echo $b; ?>, <?php echo $gradient_opacity; ?>) 75%, rgba(<?php echo $r; ?>, <?php echo $g; ?>, <?php echo $b; ?>, <?php echo $gradient_opacity; ?>) 100%);2351 background: linear-gradient(to bottom, rgba(<?php echo wp_kses($r, 'strip'); ?>, <?php echo wp_kses($g, 'strip'); ?>, <?php echo wp_kses($b, 'strip'); ?>, 0) 0%, rgba(<?php echo wp_kses($r, 'strip'); ?>, <?php echo wp_kses($g, 'strip'); ?>, <?php echo wp_kses($b, 'strip'); ?>, <?php echo wp_kses($gradient_opacity, 'strip'); ?>) 75%, rgba(<?php echo wp_kses($r, 'strip'); ?>, <?php echo wp_kses($g, 'strip'); ?>, <?php echo wp_kses($b, 'strip'); ?>, <?php echo wp_kses($gradient_opacity, 'strip'); ?>) 100%); 2347 2352 } 2348 2353 <?php … … 2382 2387 @media screen and (min-width: 48em) { 2383 2388 .site-navigation-fixed.navigation-top { 2384 width: <?php echo get_theme_mod('nav_bar_width'); ?>;2389 width: <?php echo wp_kses(get_theme_mod('nav_bar_width'), 'strip'); ?>; 2385 2390 left: 50%; 2386 2391 transform: translate(-50%, 0); … … 2406 2411 } 2407 2412 .navigation-top, .colors-dark .navigation-top, .colors-custom .navigation-top { 2408 background-image: url("<?php echo $mod; ?>");2413 background-image: url("<?php echo wp_kses($mod, 'strip'); ?>"); 2409 2414 } 2410 2415 .navigation-top { … … 2456 2461 ?> 2457 2462 .navigation-top { 2458 font-size: <?php echo ($mod + 125) / 1000; ?>rem;2463 font-size: <?php echo wp_kses(($mod + 125) / 1000, 'strip'); ?>rem; 2459 2464 } 2460 2465 @media screen and (min-width: 48em) { 2461 2466 .navigation-top { 2462 font-size: <?php echo $mod / 1000; ?>rem;2467 font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem; 2463 2468 } 2464 2469 } … … 2476 2481 @media screen and (min-width: 48em) { 2477 2482 .main-navigation a { 2478 padding-top: <?php echo $mod - 1; ?>px;2479 padding-bottom: <?php echo $mod - 1; ?>px;2483 padding-top: <?php echo wp_kses($mod - 1, 'strip'); ?>px; 2484 padding-bottom: <?php echo wp_kses($mod - 1, 'strip'); ?>px; 2480 2485 } 2481 2486 } … … 2502 2507 .colors-dark .main-navigation li:hover, .colors-dark .main-navigation li.focus, .colors-dark .main-navigation li li:hover, .colors-dark .main-navigation li li.focus, 2503 2508 .colors-custom .main-navigation li:hover, .colors-custom .main-navigation li.focus, .colors-custom .main-navigation li li:hover, .colors-custom .main-navigation li li.focus { 2504 background-color: <?php echo $mod; ?>;2509 background-color: <?php echo wp_kses($mod, 'strip'); ?>; 2505 2510 } 2506 2511 } … … 2518 2523 @media screen and (min-width: 48em) { 2519 2524 .main-navigation ul ul, .colors-dark .main-navigation ul ul, .colors-custom .main-navigation ul ul { 2520 background-color: <?php echo $background_color; ?>;2525 background-color: <?php echo wp_kses($background_color, 'strip'); ?>; 2521 2526 border: none; 2522 2527 } … … 2560 2565 ?> 2561 2566 .navigation-top { 2562 background-color: rgba(255, 255, 255, <?php echo $background_opacity; ?>);2563 border-top-color: rgba(238, 238, 238, <?php echo $background_opacity; ?>);2564 border-bottom-color: rgba(238, 238, 238, <?php echo $background_opacity; ?>);2567 background-color: rgba(255, 255, 255, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2568 border-top-color: rgba(238, 238, 238, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2569 border-bottom-color: rgba(238, 238, 238, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2565 2570 } 2566 2571 .colors-dark .navigation-top, .colors-custom .navigation-top { 2567 background-color: rgba(34, 34, 34, <?php echo $background_opacity; ?>);2568 border-top-color: rgba(51, 51, 51, <?php echo $background_opacity; ?>);2569 border-bottom-color: rgba(51, 51, 51, <?php echo $background_opacity; ?>);2572 background-color: rgba(34, 34, 34, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2573 border-top-color: rgba(51, 51, 51, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2574 border-bottom-color: rgba(51, 51, 51, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2570 2575 } 2571 2576 <?php … … 2580 2585 ?> 2581 2586 .colors-custom .navigation-top { 2582 background-color: background: hsla(' . $hue . ', ' . $saturation . ', 100%, <?php echo $background_opacity; ?>);2583 border-top-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo $background_opacity; ?>);2584 border-bottom-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo $background_opacity; ?>);2587 background-color: background: hsla(' . $hue . ', ' . $saturation . ', 100%, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2588 border-top-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2589 border-bottom-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2585 2590 } 2586 2591 <?php … … 2598 2603 @media screen and (min-width: 48em) { 2599 2604 .main-navigation ul ul, .colors-dark .main-navigation ul ul, .colors-custom .main-navigation ul ul { 2600 background-color: <?php echo $mod; ?>;2605 background-color: <?php echo wp_kses($mod, 'strip'); ?>; 2601 2606 border: none; 2602 2607 } … … 2658 2663 @media screen and (min-width: 30em) { 2659 2664 .page-one-column .panel-content .wrap { 2660 max-width: <?php echo $mod; ?>;2665 max-width: <?php echo wp_kses($mod, 'strip'); ?>; 2661 2666 } 2662 2667 } … … 2707 2712 @media screen and (min-width: 48em) { 2708 2713 .site-content, .panel-content .wrap { 2709 padding-top: <?php echo (($mod / 2) - 0.5); ?>em;2714 padding-top: <?php echo wp_kses((($mod / 2) - 0.5), 'strip'); ?>em; 2710 2715 } 2711 2716 } … … 2762 2767 @media screen and (min-width: 48em) { 2763 2768 .page.page-one-column .entry-header, .twentyseventeen-front-page.page-one-column .entry-header, .archive.page-one-column:not(.has-sidebar) .page-header { 2764 margin-bottom: <?php echo (($mod / 2) - 0.5); ?>em;2769 margin-bottom: <?php echo wp_kses((($mod / 2) - 0.5), 'strip'); ?>em; 2765 2770 } 2766 2771 } … … 3019 3024 'url' => plugin_dir_url(__FILE__) . 'images/header.jpg', 3020 3025 'thumbnail_url' => plugin_dir_url(__FILE__) . 'images/header.jpg', 3021 'description' => __( 'Default Header Image', ' twentyseventeen' ),3026 'description' => __( 'Default Header Image', 'options-for-twenty-seventeen' ), 3022 3027 ), 3023 3028 ) … … 3203 3208 if (oftsCommon::is_theme_being_used('twentyseventeen')) { 3204 3209 3210 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound 3205 3211 $options_for_twenty_seventeen_object = new options_for_twenty_seventeen_class(); 3206 3212 … … 3209 3215 if (is_admin()) { 3210 3216 3211 $themes = wp_get_themes(); 3212 3213 if (!isset($themes['twentyseventeen'])) { 3217 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound 3218 $options_for_twenty_seventeen_themes = wp_get_themes(); 3219 3220 if (!isset($options_for_twenty_seventeen_themes['twentyseventeen'])) { 3214 3221 3215 3222 add_action('admin_notices', 'ofts_wrong_theme_notice'); … … 3221 3228 } 3222 3229 3230 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound 3223 3231 function ofts_wrong_theme_notice() { 3224 3232 … … 3230 3238 <?php 3231 3239 printf( 3232 __('This plugin requires the default WordPress theme Twenty Seventeen to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-seventeen'), 3233 get_template() 3240 /* translators: theme slug */ 3241 esc_html(__('This plugin requires the default WordPress theme Twenty Seventeen to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-seventeen')), 3242 esc_html(get_template()) 3234 3243 ); 3235 3244 ?> 3236 3245 3237 <a href="<?php echo add_query_arg('search', 'twentyseventeen', admin_url('theme-install.php')); ?>" title="<?php esc_attr_e('Twenty Seventeen', 'options-for-twenty-seventeen'); ?>"><?php3246 <a href="<?php echo esc_url(add_query_arg('search', 'twentyseventeen', admin_url('theme-install.php'))); ?>" title="<?php esc_attr_e('Twenty Seventeen', 'options-for-twenty-seventeen'); ?>"><?php 3238 3247 esc_html_e('Please install and activate or live preview the Twenty Seventeen theme (or a child theme thereof)', 'options-for-twenty-seventeen'); 3239 3248 ?></a>.</p> -
options-for-twenty-seventeen/tags/2.5.5/readme.txt
r3412270 r3417427 6 6 Tested up to: 6.9 7 7 Requires PHP: 5.6 8 Stable tag: 2.5. 48 Stable tag: 2.5.5 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 181 181 == Changelog == 182 182 183 = 2.5.5 = 184 * General housekeeping preparing for "Plugin Check" code review 185 183 186 = 2.5.4 = 184 187 * Remove Customizer CSS due to incompatible change introduced in WordPress v6.7 … … 718 721 == Upgrade Notice == 719 722 720 = 2.5. 4=721 * Remove Customizer CSS due to incompatible change introduced in WordPress v6.7723 = 2.5.5 = 724 * General housekeeping preparing for "Plugin Check" code review -
options-for-twenty-seventeen/trunk/includes/class-ofts-common.php
r2986658 r3417427 1 1 <?php 2 2 /* 3 * Version: 1. 3.93 * Version: 1.4.1 4 4 */ 5 5 … … 43 43 public static function plugin_text_domain() { 44 44 45 return self::$plugin_text_domain;45 return 'options-for-twenty-seventeen'; 46 46 47 47 } … … 61 61 public static function support_url() { 62 62 63 return 'https://wordpress.org/support/plugin/' . self::$plugin_text_domain. '/';63 return 'https://wordpress.org/support/plugin/' . 'options-for-twenty-seventeen' . '/'; 64 64 65 65 } … … 67 67 public static function control_upgrade_text() { 68 68 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-seventeen'), self::$plugin_name)) . '">' . sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name) . '</a>'; 70 71 71 72 if (!class_exists(self::$plugin_premium_class) || !get_option(self::$plugin_prefix . '_purchased')) { … … 73 74 if (!class_exists(self::$plugin_premium_class)) { 74 75 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-seventeen'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::premium_link())); 76 78 77 79 } … … 85 87 public static function control_section_description() { 86 88 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-seventeen'), array('a' => array('href' => array(), 'title' => array()))), esc_url(self::support_url())); 88 91 89 92 if (self::$plugin_premium_class) { … … 95 98 if (!class_exists(self::$plugin_premium_class)) { 96 99 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-seventeen') . '</strong>' . ' ' . $upgrade_text; 98 101 99 102 } else { 100 103 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-seventeen') . '</strong>' . ' ' . $upgrade_text; 102 105 103 106 } … … 119 122 $section_description .= ' ' . sprintf( 120 123 wp_kses( 124 /* translators: link to plugin install page */ 121 125 __( 122 126 '<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_domain127 'options-for-twenty-seventeen' 124 128 ), 125 129 array('strong' => array(), 'a' => array('href' => array(), 'title' => array())) … … 145 149 public static function control_setting_upgrade_nag() { 146 150 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-seventeen'); 148 152 149 153 return $upgrade_nag; … … 234 238 235 239 $generated_css = sprintf('%s { %s: %s; }', $selector, $style, $prefix.$mod.$postfix); 236 echo $generated_css;240 echo wp_kses($generated_css, 'strip'); 237 241 238 242 } elseif ($mod) { 239 243 240 244 $generated_css = sprintf('%s { %s:%s; }', $selector, $style, $prefix.$value.$postfix); 241 echo $generated_css;245 echo wp_kses($generated_css, 'strip'); 242 246 243 247 } … … 249 253 if (self::$plugin_premium_class) { 250 254 251 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'], 'https://webd.uk/product/' . self::$plugin_text_domain . '-upgrade/'); 252 255 if (isset($_SERVER['HTTP_HOST'])) { 256 257 return add_query_arg('url', (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . filter_var(wp_unslash($_SERVER['HTTP_HOST'], FILTER_SANITIZE_URL)), 'https://webd.uk/product/' . 'options-for-twenty-seventeen' . '-upgrade/'); 258 259 } else { 260 261 return 'https://webd.uk/product/' . 'options-for-twenty-seventeen' . '-upgrade/'; 262 263 } 253 264 254 265 } else { … … 276 287 $settings_links = array(); 277 288 278 $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', self::$plugin_text_domain)) . '">' . __('Settings', self::$plugin_text_domain) . '</a>';289 $settings_links[] = '<a href="' . esc_url($settings_link) . '" title="' . esc_attr(__('Settings', 'options-for-twenty-seventeen')) . '">' . __('Settings', 'options-for-twenty-seventeen') . '</a>'; 279 290 280 291 if (!get_option(self::$plugin_prefix . '_purchased')) { … … 284 295 if (self::$plugin_upgrade) { 285 296 286 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>'; 297 /* translators: name of the plugin */ 298 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-seventeen') . '</a>'; 287 299 288 300 } else { 289 301 290 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', self::$plugin_text_domain), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', self::$plugin_text_domain) . '</a>'; 302 /* translators: name of the plugin */ 303 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr(sprintf(__('Buy %s', 'options-for-twenty-seventeen'), self::$plugin_name)) . '" style="color: orange; font-weight: bold;">' . __('Buy Now', 'options-for-twenty-seventeen') . '</a>'; 291 304 292 305 } … … 294 307 } else { 295 308 296 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', self::$plugin_text_domain), self::$plugin_name) : sprintf(__('Contribute to %s', self::$plugin_text_domain), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', self::$plugin_text_domain) : __('Support Us', self::$plugin_text_domain)) . '</a>'; 309 /* translators: name of the plugin */ 310 $settings_links[] = '<a href="' . esc_url(self::upgrade_link()) . '" title="' . esc_attr((self::$plugin_premium_class ? sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name) : sprintf(__('Contribute to %s', 'options-for-twenty-seventeen'), self::$plugin_name))) . '" style="color: orange; font-weight: bold;">' . (self::$plugin_premium_class ? __('Upgrade', 'options-for-twenty-seventeen') : __('Support Us', 'options-for-twenty-seventeen')) . '</a>'; 297 311 298 312 } … … 300 314 if ($premium) { 301 315 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(' <img src="/wp-admin/images/loading.gif" style="float: none; width: auto; height: auto;" />'); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', self::$plugin_text_domain) . '</a>'; 303 304 } elseif (self::$plugin_trial && !is_plugin_active(self::$plugin_text_domain . '-premium/' . self::$plugin_text_domain . '-premium.php')) { 305 306 $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', self::$plugin_text_domain), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', self::$plugin_text_domain) . '</a>'; 316 $settings_links[] = '<a href="' . wp_nonce_url('?activate-' . self::$plugin_prefix . '=true', self::$plugin_prefix . '_activate') . '" id="' . self::$plugin_prefix . '_activate_upgrade" title="' . esc_attr(__('Activate Purchase', 'options-for-twenty-seventeen')) . '" onclick="jQuery(this).append(' <img src="/wp-admin/images/loading.gif" style="float: none; width: auto; height: auto;" />'); setTimeout(function(){document.getElementById(\'' . self::$plugin_prefix . '_activate_upgrade\').removeAttribute(\'href\');},1); return true;">' . __('Activate Purchase', 'options-for-twenty-seventeen') . '</a>'; 317 318 } elseif (self::$plugin_trial && !is_plugin_active('options-for-twenty-seventeen' . '-premium/' . 'options-for-twenty-seventeen' . '-premium.php')) { 319 320 /* translators: name of the plugin */ 321 $settings_links[] = '<a href="' . esc_url(self::premium_link()) . '" title="' . esc_attr(sprintf(__('Trial %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)) . ' for 7 days">' . __('Download Trial', 'options-for-twenty-seventeen') . '</a>'; 307 322 308 323 } … … 310 325 } elseif ($premium) { 311 326 312 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', self::$plugin_text_domain) . '</strong>';327 $settings_links[] = '<strong style="color: green; display: inline;">' . __('Purchase Confirmed', 'options-for-twenty-seventeen') . '</strong>'; 313 328 314 329 } … … 320 335 public static function plugin_row_meta($plugin_meta, $plugin_file, $plugin_data, $status) { 321 336 322 if ($plugin_file === self::$plugin_text_domain . '/' . self::$plugin_text_domain . '.php') { 323 324 $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', self::$plugin_text_domain) . '" style="color: orange; font-weight: bold;">' . __('Need help?', self::$plugin_text_domain) . '</a>'; 325 $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . self::$plugin_text_domain . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', self::$plugin_text_domain), self::$plugin_name)) . '">' . __('Review plugin', self::$plugin_text_domain) . '</a>'; 337 if ($plugin_file === 'options-for-twenty-seventeen' . '/' . 'options-for-twenty-seventeen' . '.php') { 338 339 $plugin_meta[] = '<a href="' . esc_url(self::support_url()) . '" title="' . __('Problems? We are here to help!', 'options-for-twenty-seventeen') . '" style="color: orange; font-weight: bold;">' . __('Need help?', 'options-for-twenty-seventeen') . '</a>'; 340 /* translators: name of the plugin */ 341 $plugin_meta[] = '<a href="https://wordpress.org/support/plugin/' . 'options-for-twenty-seventeen' . '/reviews/#new-post" title="' . esc_attr(sprintf(__('If you like %s, please leave a review!', 'options-for-twenty-seventeen'), self::$plugin_name)) . '">' . __('Review plugin', 'options-for-twenty-seventeen') . '</a>'; 326 342 327 343 } … … 357 373 ?> 358 374 359 <div class="notice notice-error is-dismissible <?php echo self::$plugin_prefix; ?>-notice"> 360 361 <p><strong><?php echo self::$plugin_name; ?></strong><br /> 362 <?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', self::$plugin_text_domain); ?></p> 363 364 <p><a href="<?php echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name)); ?>" class="button-primary"><?php printf(__('Download %s Premium', self::$plugin_text_domain), self::$plugin_name); ?></a></p> 375 <div class="notice notice-error is-dismissible <?php echo esc_html(self::$plugin_prefix); ?>-notice"> 376 377 <p><strong><?php echo esc_html(self::$plugin_name); ?></strong><br /> 378 <?php esc_html_e('In order to use the premium features, you need to install the premium version of the plugin ...', 'options-for-twenty-seventeen'); ?></p> 379 380 <p><a href="<?php 381 /* translators: name of the plugin */ 382 echo esc_url(self::premium_link()); ?>" title="<?php echo esc_attr(sprintf(__('Download %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Download %s Premium', 'options-for-twenty-seventeen')), esc_html(self::$plugin_name)); ?></a></p> 365 383 366 384 </div> 367 385 368 386 <script type="text/javascript"> 369 jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {387 jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() { 370 388 jQuery.ajax({ 371 389 url: ajaxurl, 372 390 data: { 373 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',374 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'391 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 392 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 375 393 } 376 394 }); … … 380 398 <?php 381 399 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 /> 400 } elseif ( 401 !class_exists(self::$plugin_premium_class) && 402 time() > (strtotime('+1 hour', filectime(__DIR__))) && 403 get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() 404 ) { 405 406 ?> 407 408 <div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice"> 409 410 <p style="font-size:15px;"><strong><?php 411 /* translators: name of the plugin */ 412 printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-seventeen')), esc_html(self::$plugin_name)); ?></strong></p> 389 413 <?php 390 414 391 415 if (self::$plugin_trial == true) { 392 416 393 _e('Would you like to try even more features? Download your 7 day free trial now!', self::$plugin_text_domain); 417 ?> 418 419 <p><?php echo esc_html(__('Would you like to try even more features? Download your 7 day free trial now!', 'options-for-twenty-seventeen')); ?></p> 420 <?php 394 421 395 422 } else { 396 423 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); 424 ?> 425 426 <p> 427 <?php 428 /* translators: name of the plugin */ 429 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-seventeen'), self::$plugin_name)); ?> 430 </p> 431 <?php 398 432 399 433 } 400 434 401 ?> </p>402 403 <p><?php435 ?> 436 437 <p><?php 404 438 405 439 if (self::$plugin_trial == true) { … … 407 441 ?> 408 442 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 443 <a href="<?php echo esc_url(self::premium_link()); ?>" 444 title="<?php 445 /* translators: name of the plugin */ 446 echo esc_attr(sprintf(__('Try %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" 447 class="button-secondary"> 448 <?php echo esc_html(__('Try premium plugin free for 7 days', 'options-for-twenty-seventeen')); ?> 449 </a> 411 450 <?php 412 451 … … 414 453 415 454 ?> 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> 455 456 <a href="<?php echo esc_url(self::upgrade_link()); ?>" 457 title="<?php 458 /* translators: name of the plugin */ 459 echo esc_attr(sprintf(__('Upgrade now to %s Premium', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" 460 class="button-primary"> 461 <?php echo esc_html(__('Upgrade now to premium plugin', 'options-for-twenty-seventeen')); ?> 462 </a> 463 464 </p> 465 466 <hr style="margin:12px 0;"> 467 468 <p> 469 <strong>✨ Need help with your WordPress site?</strong> 470 🚀 Slow, want new features, or need a glow-up? 471 <a href="https://webd.uk/services/?utm_campaign=notice&utm_term=options-for-twenty-seventeen" class="button-secondary" style="margin-left:6px; vertical-align: middle;">Explore our services</a> 472 </p> 417 473 418 474 </div> 419 475 420 476 <script type="text/javascript"> 421 jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {477 jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() { 422 478 jQuery.ajax({ 423 479 url: ajaxurl, 424 480 data: { 425 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',426 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'481 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 482 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 427 483 } 428 484 }); … … 434 490 } 435 491 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 492 } elseif ( 493 time() > (strtotime('+1 hour', filectime(__DIR__))) && 494 get_user_meta(get_current_user_id(), self::$plugin_prefix . '-notice-dismissed', true) != self::plugin_version() && 495 !get_option(self::$plugin_prefix . '_donated') 496 ) { 497 498 ?> 499 500 <div class="notice notice-info is-dismissible <?php echo esc_attr(self::$plugin_prefix); ?>-notice"> 501 <p><strong><?php 502 /* translators: name of the plugin */ 503 printf(esc_html(__('Thank you for using %s plugin', 'options-for-twenty-seventeen')), esc_html(self::$plugin_name)); ?></strong></p> 504 <?php 505 506 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound 444 507 do_action(self::$plugin_prefix . '_admin_notice_donate'); 445 508 446 509 ?> 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> 510 <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-seventeen'); ?></p> 511 <p><a href="<?php echo esc_url(self::upgrade_link()); ?>" title="<?php 512 /* translators: name of the plugin */ 513 echo esc_attr(sprintf(__('Contribute to %s', 'options-for-twenty-seventeen'), self::$plugin_name)); ?>" class="button-primary"><?php printf(esc_html(__('Contribute to %s', 'options-for-twenty-seventeen')), 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-seventeen')); ?>" class="button-primary"><?php esc_html_e('Aleady Contributed!', 'options-for-twenty-seventeen'); ?></a></p> 449 514 </div> 450 515 451 516 <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()517 jQuery(document).on('click', '#<?php echo esc_attr(self::$plugin_prefix); ?>-already-paid', function() { 518 if (confirm(<?php echo json_encode(__('Have you really? Press "Cancel" if you forgot to 🙂', 'options-for-twenty-seventeen')); ?>)) { 519 alert(<?php echo json_encode(__('Thank you!', 'options-for-twenty-seventeen')); ?>); 520 jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').fadeTo(100, 0, function() { 521 jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').slideUp(100, function() { 522 jQuery('.<?php echo esc_attr(self::$plugin_prefix); ?>-notice').remove() 458 523 }); 459 524 }); … … 461 526 url: ajaxurl, 462 527 data: { 463 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',528 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 464 529 donated: 'true', 465 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'530 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 466 531 } 467 532 }); 468 533 } else { 469 window.location.assign('<?php echo self::upgrade_link(); ?>');534 window.location.assign('<?php echo esc_url(self::upgrade_link()); ?>'); 470 535 } 471 536 }); 472 jQuery(document).on('click', '.<?php echo self::$plugin_prefix; ?>-notice .notice-dismiss', function() {537 jQuery(document).on('click', '.<?php echo esc_attr(self::$plugin_prefix); ?>-notice .notice-dismiss', function() { 473 538 jQuery.ajax({ 474 539 url: ajaxurl, 475 540 data: { 476 action: 'dismiss_<?php echo self::$plugin_prefix; ?>_notice_handler',477 _ajax_nonce: '<?php echo wp_create_nonce(self::$plugin_prefix . '-ajax-nonce'); ?>'541 action: 'dismiss_<?php echo esc_attr(self::$plugin_prefix); ?>_notice_handler', 542 _ajax_nonce: '<?php echo esc_attr(wp_create_nonce(self::$plugin_prefix . '-ajax-nonce')); ?>' 478 543 } 479 544 }); … … 509 574 is_admin() && 510 575 $pagenow === 'customize.php' && 511 isset($_GET['theme']) && 512 !in_array($_GET['theme'], $themes, true) 576 isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 577 !in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 513 578 ) && !( 514 579 !is_admin() && 515 580 $pagenow === 'index.php' && 516 isset($_GET['customize_theme']) && 517 isset($_GET['customize_changeset_uuid']) && 518 !in_array($_GET['customize_theme'], $themes, true) 581 isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 582 isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 583 !in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 519 584 ) 520 585 ) { … … 530 595 is_admin() && 531 596 $pagenow === 'customize.php' && 532 isset($_GET['theme']) && 533 in_array($_GET['theme'], $themes, true) 597 isset($_GET['theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 598 in_array($_GET['theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 534 599 ) || ( 535 600 !is_admin() && 536 601 $pagenow === 'index.php' && 537 isset($_GET['customize_theme']) && 538 isset($_GET['customize_changeset_uuid']) && 539 in_array($_GET['customize_theme'], $themes, true) 602 isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 603 isset($_GET['customize_changeset_uuid']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 604 in_array($_GET['customize_theme'], $themes, true) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 540 605 )) 541 606 ) { … … 549 614 !is_admin() && 550 615 $pagenow === 'index.php' && 551 isset($_GET['customize_theme']) && 552 isset($_GET['customize_changeset_uuid']) 616 isset($_GET['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Recommended 617 isset($_GET['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Recommended 553 618 554 619 ) { 555 620 556 $child = wp_get_theme( $_GET['customize_theme']);621 $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 557 622 558 623 if (isset($child->template) && in_array($child->template, $themes, true)) { … … 568 633 is_admin() && 569 634 ($pagenow === 'customize.php' || $pagenow === 'admin-ajax.php') && 570 isset($_GET['theme']) || (isset($_POST['customize_theme']) && isset($_POST['customize_changeset_uuid'])) 635 ( 636 isset($_GET['theme']) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended 637 ( 638 isset($_POST['customize_theme']) && // phpcs:ignore WordPress.Security.NonceVerification.Missing 639 isset($_POST['customize_changeset_uuid']) // phpcs:ignore WordPress.Security.NonceVerification.Missing 640 ) 641 ) 571 642 ) { 572 643 573 if (isset($_GET['theme'])) { 574 575 $child = wp_get_theme( $_GET['theme']);644 if (isset($_GET['theme'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended 645 646 $child = wp_get_theme(sanitize_file_name(wp_unslash($_GET['theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Recommended 576 647 577 648 } else { 578 649 579 $child = wp_get_theme( $_POST['customize_theme']);650 $child = wp_get_theme(sanitize_file_name(wp_unslash($_POST['customize_theme']))); // phpcs:ignore WordPress.Security.NonceVerification.Missing 580 651 581 652 } … … 622 693 623 694 ?> 624 <span class="description customize-control-description"><?php echo $this->description; ?></span>695 <span class="description customize-control-description"><?php echo esc_html($this->description); ?></span> 625 696 <?php 626 697 … … 647 718 ?> 648 719 </ul> 649 <input type="hidden" id="_customize-input-<?php echo $this->id; ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" />720 <input type="hidden" id="_customize-input-<?php echo esc_attr($this->id); ?>" <?php $this->link(); ?> value="<?php echo esc_attr(implode(',', $multi_values)); ?>" /> 650 721 <?php 651 722 -
options-for-twenty-seventeen/trunk/options-for-twenty-seventeen.php
r3180351 r3417427 2 2 /* 3 3 * Plugin Name: Options for Twenty Seventeen 4 * Version: 2.5. 44 * Version: 2.5.5 5 5 * Plugin URI: https://webd.uk/product/options-for-twenty-seventeen-upgrade/ 6 6 * Description: Adds powerful customizer options to modify all aspects of the default WordPress theme Twenty Seventeen 7 7 * Author: Webd Ltd 8 8 * Author URI: https://webd.uk 9 * License: GPLv2 or later 10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 9 11 * Text Domain: options-for-twenty-seventeen 10 12 */ … … 22 24 class options_for_twenty_seventeen_class { 23 25 24 public static $version = '2.5. 4';26 public static $version = '2.5.5'; 25 27 26 28 function __construct() { … … 64 66 65 67 $wp_customize->add_section('theme_options', array( 66 'title' => __('Theme Options', ' twentyseventeen'),68 'title' => __('Theme Options', 'options-for-twenty-seventeen'), 67 69 'description' => __('Use these options to customise the page layout and static front page sections.', 'options-for-twenty-seventeen') . ' ' . $section_description 68 70 )); 69 71 70 72 $wp_customize->add_control('page_layout', array( 71 'label' => __( 'Page Layout', ' twentyseventeen' ),73 'label' => __( 'Page Layout', 'options-for-twenty-seventeen' ), 72 74 'section' => 'theme_options', 73 75 'type' => 'radio', 74 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', ' twentyseventeen' ),76 'description' => __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'options-for-twenty-seventeen' ), 75 77 'choices' => array( 76 'one-column' => __( 'One Column', ' twentyseventeen' ),77 'two-column' => __( 'Two Column', ' twentyseventeen' ),78 'one-column' => __( 'One Column', 'options-for-twenty-seventeen' ), 79 'two-column' => __( 'Two Column', 'options-for-twenty-seventeen' ), 78 80 ), 79 81 'priority' => 1 … … 1622 1624 1623 1625 $control_label = __('Search / Archive Page Layout', 'options-for-twenty-seventeen'); 1624 $control_description = __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', ' twentyseventeen' );1626 $control_description = __( 'When the two-column layout is assigned, the page title is in one column and content is in the other.', 'options-for-twenty-seventeen' ); 1625 1627 oftsCommon::add_hidden_control($wp_customize, 'search_archive_page_layout', 'theme_options', $control_label, $control_description . ' ' . $upgrade_nag, 5); 1626 1628 … … 1722 1724 1723 1725 $control_label = __('Slider Cover', 'options-for-twenty-seventeen'); 1726 /* translators: link to plugin installer */ 1724 1727 $control_description = sprintf(wp_kses(__('Replaces the cover image with a <a href="%s">Nivo</a>, Sliderspack or MetaSlider Slider. Remember to set "Image Size" to "Twenty-Seventeen-featured-image" in your slider settings for best results.', 'options-for-twenty-seventeen'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=nivo-slider-lite&tab=search&type=term'))); 1725 1728 oftsCommon::add_hidden_control($wp_customize, 'nivo_slider_cover', 'ofts_header', $control_label, $control_description . ' ' . $upgrade_nag); … … 1794 1797 1795 1798 $control_label = __('Implement Yoast SEO Breadcrumbs', 'options-for-twenty-seventeen'); 1799 /* translators: link to plugin installer */ 1796 1800 $control_description = sprintf(wp_kses(__('Inject <a href="%s">Yoast SEO</a> breadcrumbs above and / or below single post and page content.', 'options-for-twenty-seventeen'), array('a' => array('href' => array()))), esc_url(admin_url('plugin-install.php?s=wordpress-seo&tab=search&type=term'))); 1797 1801 oftsCommon::add_hidden_control($wp_customize, 'implement_yoast_breadcrumbs', 'ofts_content', $control_label, $control_description . ' ' . $upgrade_nag); … … 1863 1867 )); 1864 1868 1869 /* translators: link to plugin installer */ 1865 1870 oftsCommon::add_hidden_control($wp_customize, 'install_sidemenu', 'sidemenu', 'Install SideMenu', sprintf(wp_kses(__('Add a slide-in side menu and widget area to the site by <a href="%s">installing SideMenu plugin</a>.', 'options-for-twenty-seventeen'), array('a' => array('href' => array()))), esc_url(add_query_arg(array('s' => 'sidemenu+injects', 'tab' => 'search', 'type' => 'term'), self_admin_url('plugin-install.php'))))); 1866 1871 … … 2042 2047 ?> 2043 2048 #page { 2044 <?php echo $mod; ?>2049 <?php echo wp_kses($mod, 'strip'); ?> 2045 2050 } 2046 2051 <?php … … 2281 2286 ?> 2282 2287 .site-title { 2283 font-size: <?php echo $mod / 3000 * 2; ?>rem;2288 font-size: <?php echo wp_kses($mod / 6000, 'strip'); ?>rem; 2284 2289 } 2285 2290 @media screen and (min-width: 48em) { 2286 2291 .site-title { 2287 font-size: <?php echo $mod / 1000; ?>rem;2292 font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem; 2288 2293 } 2289 2294 } … … 2302 2307 ?> 2303 2308 .site-description { 2304 font-size: <?php echo $mod * 0.0008125; ?>rem;2309 font-size: <?php echo wp_kses($mod * 0.0008125, 'strip'); ?>rem; 2305 2310 } 2306 2311 @media screen and (min-width: 48em) { 2307 2312 .site-description { 2308 font-size: <?php echo $mod / 1000; ?>rem;2313 font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem; 2309 2314 } 2310 2315 } … … 2323 2328 @media screen and (min-width: 48em) { 2324 2329 .twentyseventeen-front-page.has-header-image .custom-header-media:before, .twentyseventeen-front-page.has-header-video .custom-header-media:before, .home.blog.has-header-image .custom-header-media:before, .home.blog.has-header-video .custom-header-media:before { 2325 height: <?php echo $mod; ?>%;2330 height: <?php echo wp_kses($mod, 'strip'); ?>%; 2326 2331 } 2327 2332 } … … 2344 2349 ?> 2345 2350 .custom-header-media:before { 2346 background: linear-gradient(to bottom, rgba(<?php echo $r; ?>, <?php echo $g; ?>, <?php echo $b; ?>, 0) 0%, rgba(<?php echo $r; ?>, <?php echo $g; ?>, <?php echo $b; ?>, <?php echo $gradient_opacity; ?>) 75%, rgba(<?php echo $r; ?>, <?php echo $g; ?>, <?php echo $b; ?>, <?php echo $gradient_opacity; ?>) 100%);2351 background: linear-gradient(to bottom, rgba(<?php echo wp_kses($r, 'strip'); ?>, <?php echo wp_kses($g, 'strip'); ?>, <?php echo wp_kses($b, 'strip'); ?>, 0) 0%, rgba(<?php echo wp_kses($r, 'strip'); ?>, <?php echo wp_kses($g, 'strip'); ?>, <?php echo wp_kses($b, 'strip'); ?>, <?php echo wp_kses($gradient_opacity, 'strip'); ?>) 75%, rgba(<?php echo wp_kses($r, 'strip'); ?>, <?php echo wp_kses($g, 'strip'); ?>, <?php echo wp_kses($b, 'strip'); ?>, <?php echo wp_kses($gradient_opacity, 'strip'); ?>) 100%); 2347 2352 } 2348 2353 <?php … … 2382 2387 @media screen and (min-width: 48em) { 2383 2388 .site-navigation-fixed.navigation-top { 2384 width: <?php echo get_theme_mod('nav_bar_width'); ?>;2389 width: <?php echo wp_kses(get_theme_mod('nav_bar_width'), 'strip'); ?>; 2385 2390 left: 50%; 2386 2391 transform: translate(-50%, 0); … … 2406 2411 } 2407 2412 .navigation-top, .colors-dark .navigation-top, .colors-custom .navigation-top { 2408 background-image: url("<?php echo $mod; ?>");2413 background-image: url("<?php echo wp_kses($mod, 'strip'); ?>"); 2409 2414 } 2410 2415 .navigation-top { … … 2456 2461 ?> 2457 2462 .navigation-top { 2458 font-size: <?php echo ($mod + 125) / 1000; ?>rem;2463 font-size: <?php echo wp_kses(($mod + 125) / 1000, 'strip'); ?>rem; 2459 2464 } 2460 2465 @media screen and (min-width: 48em) { 2461 2466 .navigation-top { 2462 font-size: <?php echo $mod / 1000; ?>rem;2467 font-size: <?php echo wp_kses($mod / 1000, 'strip'); ?>rem; 2463 2468 } 2464 2469 } … … 2476 2481 @media screen and (min-width: 48em) { 2477 2482 .main-navigation a { 2478 padding-top: <?php echo $mod - 1; ?>px;2479 padding-bottom: <?php echo $mod - 1; ?>px;2483 padding-top: <?php echo wp_kses($mod - 1, 'strip'); ?>px; 2484 padding-bottom: <?php echo wp_kses($mod - 1, 'strip'); ?>px; 2480 2485 } 2481 2486 } … … 2502 2507 .colors-dark .main-navigation li:hover, .colors-dark .main-navigation li.focus, .colors-dark .main-navigation li li:hover, .colors-dark .main-navigation li li.focus, 2503 2508 .colors-custom .main-navigation li:hover, .colors-custom .main-navigation li.focus, .colors-custom .main-navigation li li:hover, .colors-custom .main-navigation li li.focus { 2504 background-color: <?php echo $mod; ?>;2509 background-color: <?php echo wp_kses($mod, 'strip'); ?>; 2505 2510 } 2506 2511 } … … 2518 2523 @media screen and (min-width: 48em) { 2519 2524 .main-navigation ul ul, .colors-dark .main-navigation ul ul, .colors-custom .main-navigation ul ul { 2520 background-color: <?php echo $background_color; ?>;2525 background-color: <?php echo wp_kses($background_color, 'strip'); ?>; 2521 2526 border: none; 2522 2527 } … … 2560 2565 ?> 2561 2566 .navigation-top { 2562 background-color: rgba(255, 255, 255, <?php echo $background_opacity; ?>);2563 border-top-color: rgba(238, 238, 238, <?php echo $background_opacity; ?>);2564 border-bottom-color: rgba(238, 238, 238, <?php echo $background_opacity; ?>);2567 background-color: rgba(255, 255, 255, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2568 border-top-color: rgba(238, 238, 238, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2569 border-bottom-color: rgba(238, 238, 238, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2565 2570 } 2566 2571 .colors-dark .navigation-top, .colors-custom .navigation-top { 2567 background-color: rgba(34, 34, 34, <?php echo $background_opacity; ?>);2568 border-top-color: rgba(51, 51, 51, <?php echo $background_opacity; ?>);2569 border-bottom-color: rgba(51, 51, 51, <?php echo $background_opacity; ?>);2572 background-color: rgba(34, 34, 34, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2573 border-top-color: rgba(51, 51, 51, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2574 border-bottom-color: rgba(51, 51, 51, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2570 2575 } 2571 2576 <?php … … 2580 2585 ?> 2581 2586 .colors-custom .navigation-top { 2582 background-color: background: hsla(' . $hue . ', ' . $saturation . ', 100%, <?php echo $background_opacity; ?>);2583 border-top-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo $background_opacity; ?>);2584 border-bottom-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo $background_opacity; ?>);2587 background-color: background: hsla(' . $hue . ', ' . $saturation . ', 100%, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2588 border-top-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2589 border-bottom-color: hsla(' . $hue . ', ' . $saturation . ', 93%, <?php echo wp_kses($background_opacity, 'strip'); ?>); 2585 2590 } 2586 2591 <?php … … 2598 2603 @media screen and (min-width: 48em) { 2599 2604 .main-navigation ul ul, .colors-dark .main-navigation ul ul, .colors-custom .main-navigation ul ul { 2600 background-color: <?php echo $mod; ?>;2605 background-color: <?php echo wp_kses($mod, 'strip'); ?>; 2601 2606 border: none; 2602 2607 } … … 2658 2663 @media screen and (min-width: 30em) { 2659 2664 .page-one-column .panel-content .wrap { 2660 max-width: <?php echo $mod; ?>;2665 max-width: <?php echo wp_kses($mod, 'strip'); ?>; 2661 2666 } 2662 2667 } … … 2707 2712 @media screen and (min-width: 48em) { 2708 2713 .site-content, .panel-content .wrap { 2709 padding-top: <?php echo (($mod / 2) - 0.5); ?>em;2714 padding-top: <?php echo wp_kses((($mod / 2) - 0.5), 'strip'); ?>em; 2710 2715 } 2711 2716 } … … 2762 2767 @media screen and (min-width: 48em) { 2763 2768 .page.page-one-column .entry-header, .twentyseventeen-front-page.page-one-column .entry-header, .archive.page-one-column:not(.has-sidebar) .page-header { 2764 margin-bottom: <?php echo (($mod / 2) - 0.5); ?>em;2769 margin-bottom: <?php echo wp_kses((($mod / 2) - 0.5), 'strip'); ?>em; 2765 2770 } 2766 2771 } … … 3019 3024 'url' => plugin_dir_url(__FILE__) . 'images/header.jpg', 3020 3025 'thumbnail_url' => plugin_dir_url(__FILE__) . 'images/header.jpg', 3021 'description' => __( 'Default Header Image', ' twentyseventeen' ),3026 'description' => __( 'Default Header Image', 'options-for-twenty-seventeen' ), 3022 3027 ), 3023 3028 ) … … 3203 3208 if (oftsCommon::is_theme_being_used('twentyseventeen')) { 3204 3209 3210 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound 3205 3211 $options_for_twenty_seventeen_object = new options_for_twenty_seventeen_class(); 3206 3212 … … 3209 3215 if (is_admin()) { 3210 3216 3211 $themes = wp_get_themes(); 3212 3213 if (!isset($themes['twentyseventeen'])) { 3217 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound 3218 $options_for_twenty_seventeen_themes = wp_get_themes(); 3219 3220 if (!isset($options_for_twenty_seventeen_themes['twentyseventeen'])) { 3214 3221 3215 3222 add_action('admin_notices', 'ofts_wrong_theme_notice'); … … 3221 3228 } 3222 3229 3230 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound 3223 3231 function ofts_wrong_theme_notice() { 3224 3232 … … 3230 3238 <?php 3231 3239 printf( 3232 __('This plugin requires the default WordPress theme Twenty Seventeen to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-seventeen'), 3233 get_template() 3240 /* translators: theme slug */ 3241 esc_html(__('This plugin requires the default WordPress theme Twenty Seventeen to be active or live previewed in order to function. Your theme "%s" is not compatible.', 'options-for-twenty-seventeen')), 3242 esc_html(get_template()) 3234 3243 ); 3235 3244 ?> 3236 3245 3237 <a href="<?php echo add_query_arg('search', 'twentyseventeen', admin_url('theme-install.php')); ?>" title="<?php esc_attr_e('Twenty Seventeen', 'options-for-twenty-seventeen'); ?>"><?php3246 <a href="<?php echo esc_url(add_query_arg('search', 'twentyseventeen', admin_url('theme-install.php'))); ?>" title="<?php esc_attr_e('Twenty Seventeen', 'options-for-twenty-seventeen'); ?>"><?php 3238 3247 esc_html_e('Please install and activate or live preview the Twenty Seventeen theme (or a child theme thereof)', 'options-for-twenty-seventeen'); 3239 3248 ?></a>.</p> -
options-for-twenty-seventeen/trunk/readme.txt
r3412270 r3417427 6 6 Tested up to: 6.9 7 7 Requires PHP: 5.6 8 Stable tag: 2.5. 48 Stable tag: 2.5.5 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 181 181 == Changelog == 182 182 183 = 2.5.5 = 184 * General housekeeping preparing for "Plugin Check" code review 185 183 186 = 2.5.4 = 184 187 * Remove Customizer CSS due to incompatible change introduced in WordPress v6.7 … … 718 721 == Upgrade Notice == 719 722 720 = 2.5. 4=721 * Remove Customizer CSS due to incompatible change introduced in WordPress v6.7723 = 2.5.5 = 724 * General housekeeping preparing for "Plugin Check" code review
Note: See TracChangeset
for help on using the changeset viewer.