Plugin Directory

Changeset 3436721


Ignore:
Timestamp:
01/10/2026 04:27:19 PM (3 months ago)
Author:
shsajalchowdhury
Message:

Update to version 1.0.4 from GitHub

Location:
easy-text-replace
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • easy-text-replace/tags/1.0.4/easy-text-replace.php

    r3429459 r3436721  
    44 * Plugin URI: https://wordpress.org/plugins/easy-text-replace/
    55 * Description: Lightweight WordPress string replacement plugin that allows administrators to replace strings from themes, plugins, and WordPress core with minimal performance impact.
    6  * Version: 1.0.3
     6 * Version: 1.0.4
    77 * Author: SH Sajal Chowdhury
    88 * Author URI: https://easywptools.com
     
    2121}
    2222
    23 define( 'ETRP_VERSION', '1.0.2' );
     23define( 'ETRP_VERSION', '1.0.4' );
    2424define( 'ETRP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    2525define( 'ETRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • easy-text-replace/tags/1.0.4/languages/easy-text-replace.pot

    r3402755 r3436721  
    314314msgstr[1] ""
    315315
     316#. translators: %d: number of replacements
     317#: src/Admin/AdminInterface.php:720
     318#, php-format
     319msgid "%d replacement deleted."
     320msgid_plural "%d replacements deleted."
     321msgstr[0] ""
     322msgstr[1] ""
     323
    316324#: src/Admin/AdminInterface.php:740
    317325msgid "Import/Export Replacements"
  • easy-text-replace/tags/1.0.4/readme.txt

    r3429459 r3436721  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    468468
    469469== Changelog ==
     470= 1.0.4 - 2025-01-10 =
     471* Added: Bulk delete functionality - delete multiple replacements at once
     472* Improved: Cleaner admin interface by removing replacement count notice
     473* Enhanced: Better user experience with streamlined replacement management
     474
    470475= 1.0.3 - 2025-12-30 =
    471476* Update: Compatibility
     
    498503
    499504== Upgrade Notice ==
     505= 1.0.4 =
     506New bulk delete feature and cleaner admin interface for better replacement management.
     507
    500508= 1.0.3 =
    501509Update compatibility with the WordPress version.
  • easy-text-replace/tags/1.0.4/src/Admin/AdminInterface.php

    r3420701 r3436721  
    166166        $remaining     = max( 0, $max_limit - $current_count );
    167167
    168         $count_class = 'notice-info';
    169         if ( 0 === $remaining ) {
    170             $count_class = 'notice-error';
    171         } elseif ( 10 >= $remaining ) {
    172             $count_class = 'notice-warning';
    173         }
    174 
    175168        ?>
    176169        <div class="wrap">
     
    191184            settings_errors( 'etrp_messages' );
    192185            ?>
    193 
    194             <div class="notice <?php echo esc_attr( $count_class ); ?> inline">
    195                 <p>
    196                     <?php
    197                     printf(
    198                         /* translators: 1: current count, 2: maximum limit, 3: remaining capacity */
    199                         esc_html__( 'Replacements: %1$d / %2$d (Remaining: %3$d)', 'easy-text-replace' ),
    200                         esc_html( $current_count ),
    201                         esc_html( $max_limit ),
    202                         esc_html( $remaining )
    203                     );
    204                     ?>
    205                     <?php if ( 0 === $remaining ) : ?>
    206                         <strong><?php esc_html_e( 'Limit reached! Delete existing replacements to add new ones.', 'easy-text-replace' ); ?></strong>
    207                     <?php endif; ?>
    208                 </p>
    209             </div>
    210186
    211187            <form method="post">
     
    512488    public function handle_form_submission() {
    513489        // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in individual handlers.
    514         if ( ! isset( $_POST['action'] ) ) {
     490        if ( ! isset( $_POST['action'] ) && ! isset( $_GET['action'] ) ) {
    515491            return;
    516492        }
    517493
     494        // Handle GET-based delete action.
     495        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified in handle_delete_replacement().
     496        if ( isset( $_GET['action'] ) && 'delete' === $_GET['action'] ) {
     497            $this->handle_delete_replacement();
     498            return;
     499        }
     500
    518501        // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in individual handlers.
    519         $action = sanitize_text_field( wp_unslash( $_POST['action'] ) );
     502        $action = isset( $_POST['action'] ) ? sanitize_text_field( wp_unslash( $_POST['action'] ) ) : '';
    520503
    521504        if ( in_array( $action, array( 'add', 'edit' ), true ) ) {
    522505            $this->handle_save_replacement();
    523             return;
    524         }
    525 
    526         if ( 'delete' === $action ) {
    527             $this->handle_delete_replacement();
    528506            return;
    529507        }
     
    533511            // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in handle_bulk_action().
    534512            $bulk_action = sanitize_text_field( wp_unslash( $_POST['action2'] ) );
     513            $this->handle_bulk_action( $bulk_action );
     514        } elseif ( isset( $_POST['action'] ) && '-1' !== $_POST['action'] ) {
     515            // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in handle_bulk_action().
     516            $bulk_action = sanitize_text_field( wp_unslash( $_POST['action'] ) );
    535517            $this->handle_bulk_action( $bulk_action );
    536518        }
     
    736718                        _n( '%d replacement disabled.', '%d replacements disabled.', count( $ids ), 'easy-text-replace' ),
    737719                        count( $ids )
     720                    ),
     721                    'success'
     722                );
     723            }
     724        } elseif ( 'bulk-delete' === $bulk_action ) {
     725            $deleted_count = 0;
     726            foreach ( $ids as $id ) {
     727                if ( $this->repository->delete( $id ) ) {
     728                    $deleted_count++;
     729                }
     730            }
     731            if ( $deleted_count > 0 ) {
     732                $this->cache_manager->clear_replacements();
     733                add_settings_error(
     734                    'etrp_messages',
     735                    'etrp_bulk_deleted',
     736                    sprintf(
     737                        /* translators: %d: number of replacements */
     738                        _n( '%d replacement deleted.', '%d replacements deleted.', $deleted_count, 'easy-text-replace' ),
     739                        $deleted_count
    738740                    ),
    739741                    'success'
  • easy-text-replace/tags/1.0.4/src/Admin/ReplacementListTable.php

    r3402755 r3436721  
    122122            'bulk-enable'  => __( 'Enable', 'easy-text-replace' ),
    123123            'bulk-disable' => __( 'Disable', 'easy-text-replace' ),
     124            'bulk-delete'  => __( 'Delete', 'easy-text-replace' ),
    124125        );
    125126    }
  • easy-text-replace/tags/1.0.4/vendor/composer/installed.php

    r3429459 r3436721  
    22    'root' => array(
    33        'name' => 'shsajalchowdhury/easy-text-replace',
    4         'pretty_version' => '1.0.3',
    5         'version' => '1.0.3.0',
    6         'reference' => 'ee0dfce7e6dd65e1c01a071be164ee7d0bf11d66',
     4        'pretty_version' => '1.0.4',
     5        'version' => '1.0.4.0',
     6        'reference' => '6d23115f69530bc013470b96643ae2b66e641daa',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'shsajalchowdhury/easy-text-replace' => array(
    23             'pretty_version' => '1.0.3',
    24             'version' => '1.0.3.0',
    25             'reference' => 'ee0dfce7e6dd65e1c01a071be164ee7d0bf11d66',
     23            'pretty_version' => '1.0.4',
     24            'version' => '1.0.4.0',
     25            'reference' => '6d23115f69530bc013470b96643ae2b66e641daa',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
  • easy-text-replace/trunk/easy-text-replace.php

    r3429459 r3436721  
    44 * Plugin URI: https://wordpress.org/plugins/easy-text-replace/
    55 * Description: Lightweight WordPress string replacement plugin that allows administrators to replace strings from themes, plugins, and WordPress core with minimal performance impact.
    6  * Version: 1.0.3
     6 * Version: 1.0.4
    77 * Author: SH Sajal Chowdhury
    88 * Author URI: https://easywptools.com
     
    2121}
    2222
    23 define( 'ETRP_VERSION', '1.0.2' );
     23define( 'ETRP_VERSION', '1.0.4' );
    2424define( 'ETRP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    2525define( 'ETRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
  • easy-text-replace/trunk/languages/easy-text-replace.pot

    r3402755 r3436721  
    314314msgstr[1] ""
    315315
     316#. translators: %d: number of replacements
     317#: src/Admin/AdminInterface.php:720
     318#, php-format
     319msgid "%d replacement deleted."
     320msgid_plural "%d replacements deleted."
     321msgstr[0] ""
     322msgstr[1] ""
     323
    316324#: src/Admin/AdminInterface.php:740
    317325msgid "Import/Export Replacements"
  • easy-text-replace/trunk/readme.txt

    r3429459 r3436721  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    468468
    469469== Changelog ==
     470= 1.0.4 - 2025-01-10 =
     471* Added: Bulk delete functionality - delete multiple replacements at once
     472* Improved: Cleaner admin interface by removing replacement count notice
     473* Enhanced: Better user experience with streamlined replacement management
     474
    470475= 1.0.3 - 2025-12-30 =
    471476* Update: Compatibility
     
    498503
    499504== Upgrade Notice ==
     505= 1.0.4 =
     506New bulk delete feature and cleaner admin interface for better replacement management.
     507
    500508= 1.0.3 =
    501509Update compatibility with the WordPress version.
  • easy-text-replace/trunk/src/Admin/AdminInterface.php

    r3420701 r3436721  
    166166        $remaining     = max( 0, $max_limit - $current_count );
    167167
    168         $count_class = 'notice-info';
    169         if ( 0 === $remaining ) {
    170             $count_class = 'notice-error';
    171         } elseif ( 10 >= $remaining ) {
    172             $count_class = 'notice-warning';
    173         }
    174 
    175168        ?>
    176169        <div class="wrap">
     
    191184            settings_errors( 'etrp_messages' );
    192185            ?>
    193 
    194             <div class="notice <?php echo esc_attr( $count_class ); ?> inline">
    195                 <p>
    196                     <?php
    197                     printf(
    198                         /* translators: 1: current count, 2: maximum limit, 3: remaining capacity */
    199                         esc_html__( 'Replacements: %1$d / %2$d (Remaining: %3$d)', 'easy-text-replace' ),
    200                         esc_html( $current_count ),
    201                         esc_html( $max_limit ),
    202                         esc_html( $remaining )
    203                     );
    204                     ?>
    205                     <?php if ( 0 === $remaining ) : ?>
    206                         <strong><?php esc_html_e( 'Limit reached! Delete existing replacements to add new ones.', 'easy-text-replace' ); ?></strong>
    207                     <?php endif; ?>
    208                 </p>
    209             </div>
    210186
    211187            <form method="post">
     
    512488    public function handle_form_submission() {
    513489        // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in individual handlers.
    514         if ( ! isset( $_POST['action'] ) ) {
     490        if ( ! isset( $_POST['action'] ) && ! isset( $_GET['action'] ) ) {
    515491            return;
    516492        }
    517493
     494        // Handle GET-based delete action.
     495        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verified in handle_delete_replacement().
     496        if ( isset( $_GET['action'] ) && 'delete' === $_GET['action'] ) {
     497            $this->handle_delete_replacement();
     498            return;
     499        }
     500
    518501        // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in individual handlers.
    519         $action = sanitize_text_field( wp_unslash( $_POST['action'] ) );
     502        $action = isset( $_POST['action'] ) ? sanitize_text_field( wp_unslash( $_POST['action'] ) ) : '';
    520503
    521504        if ( in_array( $action, array( 'add', 'edit' ), true ) ) {
    522505            $this->handle_save_replacement();
    523             return;
    524         }
    525 
    526         if ( 'delete' === $action ) {
    527             $this->handle_delete_replacement();
    528506            return;
    529507        }
     
    533511            // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in handle_bulk_action().
    534512            $bulk_action = sanitize_text_field( wp_unslash( $_POST['action2'] ) );
     513            $this->handle_bulk_action( $bulk_action );
     514        } elseif ( isset( $_POST['action'] ) && '-1' !== $_POST['action'] ) {
     515            // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in handle_bulk_action().
     516            $bulk_action = sanitize_text_field( wp_unslash( $_POST['action'] ) );
    535517            $this->handle_bulk_action( $bulk_action );
    536518        }
     
    736718                        _n( '%d replacement disabled.', '%d replacements disabled.', count( $ids ), 'easy-text-replace' ),
    737719                        count( $ids )
     720                    ),
     721                    'success'
     722                );
     723            }
     724        } elseif ( 'bulk-delete' === $bulk_action ) {
     725            $deleted_count = 0;
     726            foreach ( $ids as $id ) {
     727                if ( $this->repository->delete( $id ) ) {
     728                    $deleted_count++;
     729                }
     730            }
     731            if ( $deleted_count > 0 ) {
     732                $this->cache_manager->clear_replacements();
     733                add_settings_error(
     734                    'etrp_messages',
     735                    'etrp_bulk_deleted',
     736                    sprintf(
     737                        /* translators: %d: number of replacements */
     738                        _n( '%d replacement deleted.', '%d replacements deleted.', $deleted_count, 'easy-text-replace' ),
     739                        $deleted_count
    738740                    ),
    739741                    'success'
  • easy-text-replace/trunk/src/Admin/ReplacementListTable.php

    r3402755 r3436721  
    122122            'bulk-enable'  => __( 'Enable', 'easy-text-replace' ),
    123123            'bulk-disable' => __( 'Disable', 'easy-text-replace' ),
     124            'bulk-delete'  => __( 'Delete', 'easy-text-replace' ),
    124125        );
    125126    }
  • easy-text-replace/trunk/vendor/composer/installed.php

    r3429459 r3436721  
    22    'root' => array(
    33        'name' => 'shsajalchowdhury/easy-text-replace',
    4         'pretty_version' => '1.0.3',
    5         'version' => '1.0.3.0',
    6         'reference' => 'ee0dfce7e6dd65e1c01a071be164ee7d0bf11d66',
     4        'pretty_version' => '1.0.4',
     5        'version' => '1.0.4.0',
     6        'reference' => '6d23115f69530bc013470b96643ae2b66e641daa',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'shsajalchowdhury/easy-text-replace' => array(
    23             'pretty_version' => '1.0.3',
    24             'version' => '1.0.3.0',
    25             'reference' => 'ee0dfce7e6dd65e1c01a071be164ee7d0bf11d66',
     23            'pretty_version' => '1.0.4',
     24            'version' => '1.0.4.0',
     25            'reference' => '6d23115f69530bc013470b96643ae2b66e641daa',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.