Changeset 3035217
- Timestamp:
- 02/13/2024 06:00:57 PM (2 years ago)
- Location:
- shortcodes-finder/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
admin/class-shortcodes-finder-admin.php (modified) (1 diff)
-
admin/partials/shortcodes-finder-admin-display.php (modified) (14 diffs)
-
shortcodes-finder-consts.php (modified) (1 diff)
-
shortcodes-finder.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shortcodes-finder/trunk/README.txt
r3022828 r3035217 4 4 Tags: shortcode, shortcodes, unused, orphan, search, find, page, post, content, ultimate 5 5 Requires at least: 4.0 6 Tested up to: 6.4. 27 Stable tag: 1.5. 56 Tested up to: 6.4.3 7 Stable tag: 1.5.6 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 46 46 47 47 == Changelog == 48 49 = 1.5.6 = 50 * Changed escaping data methods 51 * WordPress 6.4.3 compatibility 48 52 49 53 = 1.5.5 = -
shortcodes-finder/trunk/admin/class-shortcodes-finder-admin.php
r3022828 r3035217 84 84 85 85 if (isset($_POST['subpage'])) { 86 $_POST['subpage'] = sanitize_text_field($_POST['subpage']);86 $_POST['subpage'] = esc_attr($_POST['subpage']); 87 87 if (($_POST['subpage'] == 'find_content' || $_POST['subpage'] == 'find_unused') && isset($_POST['search_into_content'])) { 88 88 require_once plugin_dir_path(__FILE__) . '../includes/shortcodes-finder-utils.php'; 89 89 90 $post_type = sanitize_text_field($_POST['search_into_content']);91 $include_not_published = (isset($_POST['include_not_published']) && ( sanitize_text_field($_POST['include_not_published']) == 'on'));90 $post_type = esc_attr($_POST['search_into_content']); 91 $include_not_published = (isset($_POST['include_not_published']) && (esc_attr($_POST['include_not_published']) == 'on')); 92 92 93 93 $posts = sf_get_posts_ids($post_type, $include_not_published); // Pass the post type -
shortcodes-finder/trunk/admin/partials/shortcodes-finder-admin-display.php
r3022828 r3035217 25 25 26 26 if (isset($_GET['subpage'])){ 27 $_GET['subpage'] = sanitize_text_field($_GET['subpage']);27 $_GET['subpage'] = esc_attr($_GET['subpage']); 28 28 if ($_GET['subpage'] == 'find_content' || $_GET['subpage'] == 'test_shortcode' || $_GET['subpage'] == 'find_unused' || 29 29 $_GET['subpage'] == 'about' || $_GET['subpage'] == 'settings' || $_GET['subpage'] == 'test' || $_GET['subpage'] == 'documentation' … … 132 132 133 133 <label for="include_not_published" style="margin: 0 15px"> 134 <input type="checkbox" name="include_not_published" id="include_not_published" <?= (isset($_GET['include_not_published']) && ( sanitize_text_field($_GET['include_not_published']) == 'on')) ? 'checked' : '' ?>>134 <input type="checkbox" name="include_not_published" id="include_not_published" <?= (isset($_GET['include_not_published']) && (esc_attr($_GET['include_not_published']) == 'on')) ? 'checked' : '' ?>> 135 135 <?= __('Include not published contents', 'shortcodes-finder') ?> 136 136 <span class="shortcodes-finder-tooltip tooltip-help"> … … 158 158 ?> 159 159 160 <input type="checkbox" name="search_in_multisite" id="search_in_multisite" <?= (!$disabled && isset($_GET['search_in_multisite']) && ( sanitize_text_field($_GET['search_in_multisite']) == 'on')) ? 'checked' : '' ?> <?= $disabled ? 'disabled' : '' ?>>160 <input type="checkbox" name="search_in_multisite" id="search_in_multisite" <?= (!$disabled && isset($_GET['search_in_multisite']) && (esc_attr($_GET['search_in_multisite']) == 'on')) ? 'checked' : '' ?> <?= $disabled ? 'disabled' : '' ?>> 161 161 <?php echo __('Search the whole multisite network', 'shortcodes-finder') ?> 162 162 <span class="shortcodes-finder-tooltip tooltip-help"> … … 172 172 <?php 173 173 if (isset($_GET['shortcode_to_search'])) { 174 $shortcode_to_search = ($_GET['shortcode_to_search'] != -1) ? sanitize_text_field($_GET['shortcode_to_search']) : '';175 $include_not_published = (isset($_GET['include_not_published']) && ( sanitize_text_field($_GET['include_not_published']) == 'on'));176 $search_in_multisite = (is_multisite() && isset($_GET['search_in_multisite']) && ( sanitize_text_field($_GET['search_in_multisite']) == 'on'));174 $shortcode_to_search = ($_GET['shortcode_to_search'] != -1) ? esc_attr($_GET['shortcode_to_search']) : ''; 175 $include_not_published = (isset($_GET['include_not_published']) && (esc_attr($_GET['include_not_published']) == 'on')); 176 $search_in_multisite = (is_multisite() && isset($_GET['search_in_multisite']) && (esc_attr($_GET['search_in_multisite']) == 'on')); 177 177 178 178 if ($search_in_multisite){ … … 286 286 <form class="find_shortcode_form" method="post"> 287 287 <input type="hidden" name="page" value="<?= SHORTCODES_FINDER_PLUGIN_SLUG ?>"> 288 <input type="hidden" name="subpage" value="<?= sanitize_text_field($_GET['subpage']) ?>">288 <input type="hidden" name="subpage" value="<?= esc_attr($_GET['subpage']) ?>"> 289 289 290 290 <p> … … 305 305 306 306 <label for="include_not_published" style="margin: 0 15px"> 307 <input type="checkbox" name="include_not_published" id="include_not_published" <?= (isset($_POST['include_not_published']) && ( sanitize_text_field($_POST['include_not_published']) == 'on')) ? 'checked' : '' ?>>307 <input type="checkbox" name="include_not_published" id="include_not_published" <?= (isset($_POST['include_not_published']) && (esc_attr($_POST['include_not_published']) == 'on')) ? 'checked' : '' ?>> 308 308 <?= __('Include not published contents', 'shortcodes-finder') ?> 309 309 <span class="shortcodes-finder-tooltip tooltip-help"> … … 401 401 <form class="find_shortcode_form" method="post"> 402 402 <input type="hidden" name="page" value="<?= SHORTCODES_FINDER_PLUGIN_SLUG ?>"> 403 <input type="hidden" name="subpage" value="<?= sanitize_text_field($_GET['subpage']) ?>">403 <input type="hidden" name="subpage" value="<?= esc_attr($_GET['subpage']) ?>"> 404 404 405 405 <p> … … 420 420 421 421 <label for="include_not_published" style="margin: 0 15px"> 422 <input type="checkbox" name="include_not_published" id="include_not_published" <?= (isset($_POST['include_not_published']) && ( sanitize_text_field($_POST['include_not_published']) == 'on')) ? 'checked' : '' ?>>422 <input type="checkbox" name="include_not_published" id="include_not_published" <?= (isset($_POST['include_not_published']) && (esc_attr($_POST['include_not_published']) == 'on')) ? 'checked' : '' ?>> 423 423 <?= __('Include not published contents', 'shortcodes-finder') ?> 424 424 <span class="shortcodes-finder-tooltip tooltip-help"> … … 492 492 493 493 if (isset($_GET['shortcode_test_shortcode'])) { 494 $shortcode = sanitize_text_field($_GET['shortcode_test_shortcode']);495 $parameters = (strlen($_GET['shortcode_test_parameters']) > 0) ? stripslashes(urldecode( sanitize_text_field($_GET['shortcode_test_parameters']))) : '';496 $content = (strlen($_GET['shortcode_test_content']) > 0) ? stripslashes(urldecode( sanitize_text_field($_GET['shortcode_test_content']))) : '';494 $shortcode = esc_attr($_GET['shortcode_test_shortcode']); 495 $parameters = (strlen($_GET['shortcode_test_parameters']) > 0) ? stripslashes(urldecode(esc_attr($_GET['shortcode_test_parameters']))) : ''; 496 $content = (strlen($_GET['shortcode_test_content']) > 0) ? stripslashes(urldecode(esc_attr($_GET['shortcode_test_content']))) : ''; 497 497 } else { 498 498 $parameters = ''; … … 518 518 <tr> 519 519 <th scope="row"><label for="shortcode_test_parameters"><?= __('Insert parameters string (optional)', 'shortcodes-finder') ?></label></th> 520 <td><textarea rows="5" id="shortcode_test_parameters" name="shortcode_test_parameters"><? = htmlentities($parameters)?></textarea></td>520 <td><textarea rows="5" id="shortcode_test_parameters" name="shortcode_test_parameters"><?php echo $parameters ?></textarea></td> 521 521 </tr> 522 522 <tr> 523 523 <th scope="row"><label for="shortcode_test_content"><?= __('Insert content (optional)', 'shortcodes-finder') ?></label></th> 524 <td><textarea rows="5" id="shortcode_test_content" name="shortcode_test_content"><? = htmlentities($content)?></textarea></td>524 <td><textarea rows="5" id="shortcode_test_content" name="shortcode_test_content"><?php echo $content ?></textarea></td> 525 525 </tr> 526 526 <tr> … … 574 574 if (isset($_POST['save'])) { 575 575 $res = true; 576 $nonce = sanitize_text_field( $_POST['nonce']);576 $nonce = sanitize_text_field(wp_unslash($_POST['nonce'])); 577 577 578 578 $sf_settings_disable_existing_shortcodes = 579 isset($_POST['sf_settings_disable_existing_shortcodes']) && ( sanitize_text_field($_POST['sf_settings_disable_existing_shortcodes']) == 'on') ? true : false;579 isset($_POST['sf_settings_disable_existing_shortcodes']) && (esc_attr($_POST['sf_settings_disable_existing_shortcodes']) == 'on') ? true : false; 580 580 $sf_settings_disable_unused = 581 isset($_POST['sf_settings_disable_unused']) && ( sanitize_text_field($_POST['sf_settings_disable_unused']) == 'on') ? true : false;581 isset($_POST['sf_settings_disable_unused']) && (esc_attr($_POST['sf_settings_disable_unused']) == 'on') ? true : false; 582 582 583 583 $sf_settings_disabled_shortcodes = array(); … … 626 626 627 627 <form method="post" novalidate="novalidate"> 628 <input type="hidden" name="nonce" value="<? = $nonce?>" />628 <input type="hidden" name="nonce" value="<?php echo esc_attr($nonce) ?>" /> 629 629 <table class="form-table" role="presentation"> 630 630 <tbody> … … 822 822 823 823 // Form options 824 $object_to_search = (isset($_GET['object_to_search']) && $_GET['object_to_search'] != -1) ? sanitize_text_field($_GET['object_to_search']) : '';825 $load_attributes = (isset($_GET['load_attributes']) && sanitize_text_field($_GET['load_attributes']) == 'on');824 $object_to_search = (isset($_GET['object_to_search']) && $_GET['object_to_search'] != -1) ? esc_attr($_GET['object_to_search']) : ''; 825 $load_attributes = (isset($_GET['load_attributes']) && esc_attr($_GET['load_attributes']) == 'on'); 826 826 827 827 // Get shortcodes: Load origins. Don't load attributes. Don't filter objects. … … 839 839 <form class="find_shortcode_form" method="get"> 840 840 <input type="hidden" name="page" value="<?= SHORTCODES_FINDER_PLUGIN_SLUG ?>"> 841 <input type="hidden" name="subpage" value="<?= sanitize_text_field($_GET['subpage']) ?>">841 <input type="hidden" name="subpage" value="<?= esc_attr($_GET['subpage']) ?>"> 842 842 843 843 <p> -
shortcodes-finder/trunk/shortcodes-finder-consts.php
r3022828 r3035217 8 8 */ 9 9 10 define('SHORTCODES_FINDER_VERSION', '1.5. 5');10 define('SHORTCODES_FINDER_VERSION', '1.5.6'); 11 11 12 12 define('SHORTCODES_FINDER_OPTION_VERSION', 'sf_version'); // From version 1.3.0 -
shortcodes-finder/trunk/shortcodes-finder.php
r3022828 r3035217 16 16 * Plugin URI: https://www.scribit.it/en/wordpress-plugins/find-wordpress-website-shortcodes-in-one-click/ 17 17 * Description: Find, test, disable, clean and get informations about the shortcodes in your Wordpress website posts, pages and custom contents (also in multisite network). 18 * Version: 1.5. 518 * Version: 1.5.6 19 19 * Author: Scribit 20 20 * Author URI: https://www.scribit.it/
Note: See TracChangeset
for help on using the changeset viewer.