Plugin Directory

Changeset 3395560


Ignore:
Timestamp:
11/14/2025 08:07:54 AM (3 months ago)
Author:
codingbunny
Message:

v.1.1.2

Location:
coding-bunny-easy-duplicate-post
Files:
22 added
5 edited

Legend:

Unmodified
Added
Removed
  • coding-bunny-easy-duplicate-post/trunk/admin/enqueue-scripts.php

    r3300892 r3395560  
    55}
    66
    7 // Function to enqueue admin styles and scripts for the plugin
    87function 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' ) {
    1010        $css_file = plugin_dir_path( __FILE__ ) . '../assets/css/styles.css';
    1111        if ( file_exists( $css_file ) ) {
    12             $version = '1.0.8';
     12            $version = '1.1.2';
    1313            wp_enqueue_style( 'easy-duplicate-post-admin-styles', plugin_dir_url( __FILE__ ) . '../assets/css/styles.css', [], $version );
    1414        }
     
    1717    $js_file = plugin_dir_path( __FILE__ ) . '../assets/js/admin.js';
    1818    if ( file_exists( $js_file ) ) {
    19         $version = '1.0.1';
     19        $version = '1.1.2';
    2020        wp_enqueue_script( 'easy-duplicate-post-admin-js', plugin_dir_url( __FILE__ ) . '../assets/js/admin.js', [], $version, true );
    2121    }
  • coding-bunny-easy-duplicate-post/trunk/coding-bunny-easy-duplicate-post.php

    r3300892 r3395560  
    55* Plugin URI:  https://coding-bunny.com/easy-duplicate-post/
    66* Description: Duplicate posts, pages, custom posts and menus using single click.
    7 * Version:     1.1.1
     7* Version:     1.1.2
    88* Requires at least: 6.0
    99* Requires PHP: 8.0
     
    2020}
    2121
    22 define( 'CBEDP_VERSION', '1.1.1' );
     22define( 'CBEDP_VERSION', '1.1.2' );
    2323
    2424require_once plugin_dir_path( __FILE__ ) . 'admin/admin-menu.php';
  • coding-bunny-easy-duplicate-post/trunk/includes/duplicate-menu.php

    r3300892 r3395560  
    66
    77        if ( empty( $id ) || empty( $name ) ) {
    8             return false;
     8            return false;
    99        }
    1010
     
    4848            }
    4949
    50             do_action( 'duplicate_menu_item', $menu_item, $args );
     50            do_action( 'cbedp_duplicate_menu_item', $menu_item, $args );
    5151
    5252            $i++;
     
    6262        <div id="icon-options-general" class="icon32"><br /></div>
    6363
    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'] ) );
    6872
    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            ?>
    7376                <div id="message" class="updated"><p>
    7477                    <?php if ( $new_menu_id ) : ?>
     
    7881                    <?php endif; ?>
    7982                </p></div>
    80 
    8183            <?php endif; ?>
    8284
  • coding-bunny-easy-duplicate-post/trunk/includes/duplicate-post.php

    r3232487 r3395560  
    197197
    198198    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));
    200200    } 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));
    202202    }
    203203    exit;
  • coding-bunny-easy-duplicate-post/trunk/readme.txt

    r3300892 r3395560  
    44Requires at least: 6.0
    55Tested up to: 6.8
    6 Stable tag: 1.1.1
     6Stable tag: 1.1.2
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    5454= Changelog =
    5555
     561.1.2: 2025-11-14
     57- Fix: Minor issues fixed
     58
    56591.1.1: 2025-05-26
    5760- Fix: Minor issues fixed
Note: See TracChangeset for help on using the changeset viewer.