Changeset 3136510
- Timestamp:
- 08/16/2024 10:04:20 AM (20 months ago)
- Location:
- wp-multitasking/trunk
- Files:
-
- 10 edited
-
includes/addquicktag_cpt.php (modified) (4 diffs)
-
includes/floating-popup/exit-popup.php (modified) (3 diffs)
-
includes/floating-popup/welcome-popup.php (modified) (3 diffs)
-
includes/header-footer-scripts.php (modified) (2 diffs)
-
includes/permalinks.php (modified) (2 diffs)
-
includes/shortcode_markid.php (modified) (1 diff)
-
includes/smtp.php (modified) (2 diffs)
-
js/shortcode_markid.js (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
wp-multitasking.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-multitasking/trunk/includes/addquicktag_cpt.php
r1725723 r3136510 24 24 if (isset($_GET['page']) and $_GET['page'] == 'wpmt_addquicktag') { 25 25 if (isset($_POST['action']) and 'save' == $_POST['action']) { 26 if(isset($_POST["wpmt_cpt_addquicktag"]) && !empty($_POST["wpmt_cpt_addquicktag"])){ 27 update_option("wpmt_cpt_addquicktag", json_encode($_POST["wpmt_cpt_addquicktag"])); 28 }else{ 29 delete_option("wpmt_cpt_addquicktag"); 26 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 27 if(isset($_POST["wpmt_cpt_addquicktag"]) && !empty($_POST["wpmt_cpt_addquicktag"])){ 28 update_option("wpmt_cpt_addquicktag", json_encode($_POST["wpmt_cpt_addquicktag"])); 29 }else{ 30 delete_option("wpmt_cpt_addquicktag"); 31 } 32 header("Location: {$_SERVER['REQUEST_URI']}&saved=true"); 33 die(); 30 34 } 31 header("Location: {$_SERVER['REQUEST_URI']}&saved=true");32 die();33 35 } 34 36 } … … 46 48 <?php 47 49 $post_types = get_post_types(); 48 $exclude_types = array('post', 'page', ' revision', 'attachment', 'nav_menu_item', 'custom_css', 'customize_changeset', 'acf-field-group', 'acf-field');50 $exclude_types = array('post', 'page', 'attachment'); 49 51 foreach ($post_types as $post_type) { 50 52 if(in_array($post_type, $exclude_types)){ … … 62 64 </div> 63 65 HTML; 64 }else {66 }else if (is_post_type_viewable($post_type)){ 65 67 echo <<<HTML 66 68 <div> … … 76 78 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> 77 79 <input type="hidden" name="action" value="save" /> 80 <?php wp_nonce_field('security_nonce'); ?> 78 81 </p> 79 82 </form> -
wp-multitasking/trunk/includes/floating-popup/exit-popup.php
r3014283 r3136510 153 153 if (isset($_GET['page']) and $_GET['page'] == 'wpmt_exit_popup') { 154 154 if (isset($_REQUEST['action']) and 'save' == $_REQUEST['action']) { 155 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 155 156 foreach ($wpmt_exit_fields as $field) { 156 157 if (isset($_REQUEST[$field])) { … … 163 164 header("Location: {$_SERVER['REQUEST_URI']}&saved=true"); 164 165 die(); 166 } 165 167 } 166 168 } … … 181 183 ?> 182 184 <form method="post"> 185 <?php wp_nonce_field('security_nonce'); ?> 183 186 <input type="hidden" name="default_exit_init" value="1" /> 184 187 <table class="exit-popup form-table"> -
wp-multitasking/trunk/includes/floating-popup/welcome-popup.php
r3014283 r3136510 162 162 if (isset($_GET['page']) and $_GET['page'] == 'wpmt_welcome_popup') { 163 163 if (isset($_REQUEST['action']) and 'save' == $_REQUEST['action']) { 164 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 164 165 foreach ($wpmt_wcome_fields as $field) { 165 166 if (isset($_REQUEST[$field])) { … … 172 173 header("Location: {$_SERVER['REQUEST_URI']}&saved=true"); 173 174 die(); 175 } 174 176 } 175 177 } … … 190 192 ?> 191 193 <form method="post"> 194 <?php wp_nonce_field('security_nonce'); ?> 192 195 <input type="hidden" name="default_wcome_init" value="1" /> 193 196 <table class="welcome-popup form-table"> -
wp-multitasking/trunk/includes/header-footer-scripts.php
r3027625 r3136510 39 39 } 40 40 if (isset($_POST['action']) and 'save' == $_POST['action']) { 41 $fields = ['wpmt_insert_header', 'wpmt_insert_body', 'wpmt_insert_footer']; 42 foreach ($fields as $field) { 43 if (isset($_REQUEST[$field]) and !empty($_REQUEST[$field])) { 44 update_option($field, $_REQUEST[$field]); 45 } else { 46 delete_option($field); 41 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 42 $fields = ['wpmt_insert_header', 'wpmt_insert_body', 'wpmt_insert_footer']; 43 foreach ($fields as $field) { 44 if (isset($_REQUEST[$field]) and !empty($_REQUEST[$field])) { 45 update_option($field, $_REQUEST[$field]); 46 } else { 47 delete_option($field); 48 } 47 49 } 48 50 } … … 73 75 <input name="save" type="submit" value="Save changes" class="button button-large button-primary" /> 74 76 <input type="hidden" name="action" value="save" /> 77 <?php wp_nonce_field('security_nonce'); ?> 75 78 </div> 76 79 </form> -
wp-multitasking/trunk/includes/permalinks.php
r3027625 r3136510 55 55 56 56 if (isset($_POST[$hidden_field_name]) && $_POST[$hidden_field_name] == 'Y') { 57 $opt_val = preg_replace('/[^0-9a-z]+/i', '', $_POST[$opt_name]); 58 update_option($opt_name, $opt_val); 59 if(isset($_POST["ppo_cpt_slug"]) && !empty($_POST["ppo_cpt_slug"])){ 60 update_option("cpt_without_slug", json_encode($_POST["ppo_cpt_slug"])); 61 }else{ 62 update_option("cpt_without_slug", json_encode(array())); 63 } 64 ?> 65 <div class="updated"><p><strong><?php _e('Settings saved.'); ?></strong></p></div> 66 <?php 67 $this->rewrite_rules(true); 68 $this->add_rules_htaccess(); 57 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 58 $opt_val = preg_replace('/[^0-9a-z]+/i', '', $_POST[$opt_name]); 59 update_option($opt_name, $opt_val); 60 if(isset($_POST["ppo_cpt_slug"]) && !empty($_POST["ppo_cpt_slug"])){ 61 update_option("cpt_without_slug", json_encode($_POST["ppo_cpt_slug"])); 62 }else{ 63 update_option("cpt_without_slug", json_encode(array())); 64 } 65 ?> 66 <div class="updated"><p><strong><?php _e('Settings saved.'); ?></strong></p></div> 67 <?php 68 $this->rewrite_rules(true); 69 $this->add_rules_htaccess(); 70 } 69 71 } 70 72 ?> … … 72 74 <h2>Permalink custom post type</h2> 73 75 <form name="form1" method="post" action=""> 76 <?php wp_nonce_field('security_nonce'); ?> 74 77 <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y"> 75 78 <h3>Strip slug from custom post type:</h3> -
wp-multitasking/trunk/includes/shortcode_markid.php
r831023 r3136510 6 6 function wpmt_markid($atts) { 7 7 extract(shortcode_atts(array( 8 "id" => '' 8 "id" => '', 9 "title" => '' 9 10 ), $atts )); 10 return "<span id=\"$id\"></span>"; 11 if (!empty($title)) { 12 return "<span id=\"".esc_html($id)."\" class=\"mark\">".esc_html($title)."</span>"; 13 } 14 return "<span id=\"".esc_html($id)."\"></span>"; 11 15 } 12 16 -
wp-multitasking/trunk/includes/smtp.php
r2964791 r3136510 37 37 } 38 38 if (isset($_POST['action']) and 'save' == $_POST['action']) { 39 $fields = ['wpmt_smtp_from', 'wpmt_smtp_fromname', 'wpmt_smtp_host', 'wpmt_smtp_user', 'wpmt_smtp_passwd', 'wpmt_smtp_port', 'wpmt_smtp_secure']; 40 foreach ($fields as $field) { 41 if (isset($_REQUEST[$field]) and !empty($_REQUEST[$field])) { 42 update_option($field, $_REQUEST[$field]); 43 } else { 44 delete_option($field); 39 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 40 $fields = ['wpmt_smtp_from', 'wpmt_smtp_fromname', 'wpmt_smtp_host', 'wpmt_smtp_user', 'wpmt_smtp_passwd', 'wpmt_smtp_port', 'wpmt_smtp_secure']; 41 foreach ($fields as $field) { 42 if (isset($_REQUEST[$field]) and !empty($_REQUEST[$field])) { 43 update_option($field, $_REQUEST[$field]); 44 } else { 45 delete_option($field); 46 } 45 47 } 46 48 } … … 135 137 <input name="save" type="submit" value="Save changes" class="button button-large button-primary" /> 136 138 <input type="hidden" name="action" value="save" /> 139 <?php wp_nonce_field('security_nonce'); ?> 137 140 </div> 138 141 </form> -
wp-multitasking/trunk/js/shortcode_markid.js
r831023 r3136510 5 5 // Register command for when button is clicked 6 6 ed.addCommand('markid', function() { 7 content = '[markid id=" Nhap_ten_ID"]';7 content = '[markid id="Selector_ID" title=""]'; 8 8 9 9 tinymce.execCommand('mceInsertContent', false, content); -
wp-multitasking/trunk/readme.txt
r3087160 r3136510 2 2 Contributors: thangnv27 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ADQPKM8RFF4A 4 Tags: shorcode,mark id,bbcode,welcome popup,exit popup,popup,addquicktag,custom post type,post type,remove base slug4 Tags: Google PageSpeed Insights,shorcode,mark id,bbcode,welcome popup,exit popup,popup,addquicktag,custom post type,post type,remove base slug 5 5 Requires at least: 2.1.0 6 6 Tested up to: 6.4.2 7 Stable tag: 0.1.1 27 Stable tag: 0.1.13 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 * Shortcodes: [currentyear], [currentmonth] ... support YoastSEO, RankMath 27 27 * Insert head, body and footer scripts 28 * Support Google PageSpeed Insights for green scores 28 29 29 30 == Installation == … … 71 72 Named Spoiler: [spoiler=two plus two]four[/spoiler] 72 73 Unnamed Spoiler: [spoiler]Boo![/spoiler] 74 Mark ID: [markid id="Selector_ID" title=""] 73 75 74 76 == Screenshots == … … 83 85 84 86 == Changelog == 87 88 = 0.1.13 = 89 * Fix security 90 * Fix addquicktag 91 * Update shortcode markid 92 * Add support Google PageSpeed Insights 85 93 86 94 = 0.1.12 = -
wp-multitasking/trunk/wp-multitasking.php
r3087160 r3136510 4 4 Plugin URI: http://wordpress.org/plugins/wp-multitasking/ 5 5 Description: This plugin is synthetic utility for your WordPress site: Shortcode, BBCode, AddQuickTag, Exit pop-up, Welcome pop-up, Remove base slug, SMTP, Classic Editor, Classic widgets... 6 Version: 0.1.1 26 Version: 0.1.13 7 7 Author: thangnv27 8 8 Author URI: https://ngothang.me/ … … 42 42 if (isset($_GET['page']) and $_GET['page'] == WPMT_MENU_ID) { 43 43 if (isset($_POST['action']) and 'save' == $_POST['action']) { 44 $fields = ['wpmt_menu_name', 'wpmt_classic_editor', 'wpmt_classic_widgets', 'wpmt_popup_type', 'wpmt_colorbox_type']; 45 foreach ($fields as $field) { 46 if (isset($_REQUEST[$field]) and !empty($_REQUEST[$field])) { 47 update_option($field, $_REQUEST[$field]); 48 } else { 49 delete_option($field); 44 if (isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'security_nonce')) { 45 $fields = ['wpmt_menu_name', 'wpmt_classic_editor', 'wpmt_classic_widgets', 'wpmt_popup_type', 'wpmt_colorbox_type']; 46 foreach ($fields as $field) { 47 if (isset($_REQUEST[$field]) and !empty($_REQUEST[$field])) { 48 update_option($field, $_REQUEST[$field]); 49 } else { 50 delete_option($field); 51 } 50 52 } 53 54 header("Location: {$_SERVER['REQUEST_URI']}&saved=true"); 55 die(); 51 56 } 52 53 header("Location: {$_SERVER['REQUEST_URI']}&saved=true");54 die();55 57 } 56 58 } … … 135 137 <input name="save" type="submit" value="Save changes" class="button button-large button-primary" /> 136 138 <input type="hidden" name="action" value="save" /> 139 <?php wp_nonce_field('security_nonce'); ?> 137 140 </div> 138 141 </form> … … 185 188 require_once WPMT_PLUGIN_DIR . '/includes/shortcodes.php'; 186 189 require_once WPMT_PLUGIN_DIR . '/includes/header-footer-scripts.php'; 190 require_once WPMT_PLUGIN_DIR . '/includes/pagespeed-insights.php';
Note: See TracChangeset
for help on using the changeset viewer.