Changeset 3395560
- Timestamp:
- 11/14/2025 08:07:54 AM (3 months ago)
- Location:
- coding-bunny-easy-duplicate-post
- Files:
-
- 22 added
- 5 edited
-
tags/1.1.2 (added)
-
tags/1.1.2/admin (added)
-
tags/1.1.2/admin/admin-menu.php (added)
-
tags/1.1.2/admin/enqueue-scripts.php (added)
-
tags/1.1.2/admin/settings.php (added)
-
tags/1.1.2/assets (added)
-
tags/1.1.2/assets/css (added)
-
tags/1.1.2/assets/css/styles.css (added)
-
tags/1.1.2/assets/js (added)
-
tags/1.1.2/assets/js/admin.js (added)
-
tags/1.1.2/coding-bunny-easy-duplicate-post.php (added)
-
tags/1.1.2/includes (added)
-
tags/1.1.2/includes/duplicate-menu.php (added)
-
tags/1.1.2/includes/duplicate-post.php (added)
-
tags/1.1.2/index.php (added)
-
tags/1.1.2/languages (added)
-
tags/1.1.2/languages/coding-bunny-easy-duplicate-post-it_IT.mo (added)
-
tags/1.1.2/languages/coding-bunny-easy-duplicate-post-it_IT.po (added)
-
tags/1.1.2/languages/coding-bunny-easy-duplicate-post.pot (added)
-
tags/1.1.2/readme.txt (added)
-
tags/1.1.2/uninstall.php (added)
-
trunk/admin/enqueue-scripts.php (modified) (2 diffs)
-
trunk/coding-bunny-easy-duplicate-post.php (modified) (2 diffs)
-
trunk/includes/duplicate-menu.php (modified) (4 diffs)
-
trunk/includes/duplicate-post.php (modified) (1 diff)
-
trunk/index.php (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
coding-bunny-easy-duplicate-post/trunk/admin/enqueue-scripts.php
r3300892 r3395560 5 5 } 6 6 7 // Function to enqueue admin styles and scripts for the plugin8 7 function cbedp_enqueue_styles($hook_suffix) { 9 if ( isset( $_GET['page'] ) && $_GET['page'] === 'easy-duplicate-post' ) { 8 // phpcs:ignore WordPress.Security.NonceVerification.Recommended 9 if ( isset( $_GET['page'] ) && $_GET['page'] === 'easy-duplicate-post' ) { 10 10 $css_file = plugin_dir_path( __FILE__ ) . '../assets/css/styles.css'; 11 11 if ( file_exists( $css_file ) ) { 12 $version = '1. 0.8';12 $version = '1.1.2'; 13 13 wp_enqueue_style( 'easy-duplicate-post-admin-styles', plugin_dir_url( __FILE__ ) . '../assets/css/styles.css', [], $version ); 14 14 } … … 17 17 $js_file = plugin_dir_path( __FILE__ ) . '../assets/js/admin.js'; 18 18 if ( file_exists( $js_file ) ) { 19 $version = '1. 0.1';19 $version = '1.1.2'; 20 20 wp_enqueue_script( 'easy-duplicate-post-admin-js', plugin_dir_url( __FILE__ ) . '../assets/js/admin.js', [], $version, true ); 21 21 } -
coding-bunny-easy-duplicate-post/trunk/coding-bunny-easy-duplicate-post.php
r3300892 r3395560 5 5 * Plugin URI: https://coding-bunny.com/easy-duplicate-post/ 6 6 * Description: Duplicate posts, pages, custom posts and menus using single click. 7 * Version: 1.1. 17 * Version: 1.1.2 8 8 * Requires at least: 6.0 9 9 * Requires PHP: 8.0 … … 20 20 } 21 21 22 define( 'CBEDP_VERSION', '1.1. 1' );22 define( 'CBEDP_VERSION', '1.1.2' ); 23 23 24 24 require_once plugin_dir_path( __FILE__ ) . 'admin/admin-menu.php'; -
coding-bunny-easy-duplicate-post/trunk/includes/duplicate-menu.php
r3300892 r3395560 6 6 7 7 if ( empty( $id ) || empty( $name ) ) { 8 return false;8 return false; 9 9 } 10 10 … … 48 48 } 49 49 50 do_action( 'duplicate_menu_item', $menu_item, $args );50 do_action( 'cbedp_duplicate_menu_item', $menu_item, $args ); 51 51 52 52 $i++; … … 62 62 <div id="icon-options-general" class="icon32"><br /></div> 63 63 64 <?php if ( ! empty( $_POST ) && wp_verify_nonce( $_POST['duplicate_menu_nonce'], 'duplicate_menu' ) ) : ?> 65 <?php 66 $source = intval( $_POST['source'] ); 67 $destination = sanitize_text_field( $_POST['new_menu_name'] ); 64 <?php 65 if ( 66 ! empty( $_POST ) 67 && isset( $_POST['duplicate_menu_nonce'], $_POST['source'], $_POST['new_menu_name'] ) 68 && wp_verify_nonce( wp_unslash( $_POST['duplicate_menu_nonce'] ), 'duplicate_menu' ) // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized 69 ) : 70 $source = intval( wp_unslash( $_POST['source'] ) ); 71 $destination = sanitize_text_field( wp_unslash( $_POST['new_menu_name'] ) ); 68 72 69 $duplicator = new DuplicateMenu(); 70 $new_menu_id = $duplicator->cbedp_duplicate( $source, $destination ); 71 ?> 72 73 $duplicator = new DuplicateMenu(); 74 $new_menu_id = $duplicator->cbedp_duplicate( $source, $destination ); 75 ?> 73 76 <div id="message" class="updated"><p> 74 77 <?php if ( $new_menu_id ) : ?> … … 78 81 <?php endif; ?> 79 82 </p></div> 80 81 83 <?php endif; ?> 82 84 -
coding-bunny-easy-duplicate-post/trunk/includes/duplicate-post.php
r3232487 r3395560 197 197 198 198 if ( $redirect_option === 'list' ) { 199 wp_ redirect(admin_url('edit.php?post_type=' . $post->post_type));199 wp_safe_redirect(admin_url('edit.php?post_type=' . $post->post_type)); 200 200 } else { 201 wp_ redirect(admin_url('post.php?action=edit&post=' . $new_post_id));201 wp_safe_redirect(admin_url('post.php?action=edit&post=' . $new_post_id)); 202 202 } 203 203 exit; -
coding-bunny-easy-duplicate-post/trunk/readme.txt
r3300892 r3395560 4 4 Requires at least: 6.0 5 5 Tested up to: 6.8 6 Stable tag: 1.1. 16 Stable tag: 1.1.2 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 54 54 = Changelog = 55 55 56 1.1.2: 2025-11-14 57 - Fix: Minor issues fixed 58 56 59 1.1.1: 2025-05-26 57 60 - Fix: Minor issues fixed
Note: See TracChangeset
for help on using the changeset viewer.