Plugin Directory

Changeset 3072502

Timestamp:
04/17/2024 03:15:54 PM (3 months ago)
Author:
crossi72
Message:

release 3.11.7

  • optimized renaming process
Location:
phoenix-media-rename
Files:
25 added
5 edited

Legend:

Unmodified
Added
Removed
  • phoenix-media-rename

    • Property svn:global-ignores
      •  

        old new  
        11.git
         2
    • Property svn:ignore set to
      .github
  • phoenix-media-rename/classes/class-media-rename.php

    r3013478 r3072502  
    591591            //avoid the file renaming process
    592592            return 1;
    593             } else {
     593            }
     594        else {
    594595            //renaming is enabled
    595596
     
    658659
    659660                //updates posts content
    660                 self::update_posts($post_types, $searches, $replaces);
     661                self::update_posts($post_types, $searches, $replaces);
    661662
    662663                if ($options->option_update_revisions) {
    663664                    //update revisions, if option to update revisions is active
    664665                    $post_types['revision'] = array('post_type' => $post_types);
    665                     self::update_posts($post_types, $searches, $replaces);
     666                    self::update_posts($post_types, $searches, $replaces);
    666667                }
    667668
     
    812813     * @param array $searches strings to search for
    813814     * @param array $replaces values to replace
    814      * @return void
    815      */
    816     private static function update_posts($post_types, $searches, $replaces){
     815     * @param array $old_filename old file name
     816     * @return void
     817     */
     818    private static function update_posts($post_types, $searches, $replaces, $old_filename){
    817819        $i=0;
    818820
    819         while ($posts = get_posts(array('post_type' => $post_types, 'post_status' => 'any', 'numberposts' => 100, 'offset' => $i * 100))) {
     821        while ($posts = get_posts(array('post_type' => $post_types, 'post_status' => 'any', 'numberposts' => 100, 'offset' => $i * 100))) {
    820822            foreach ($posts as $post) {
    821823                // Updating post content if necessary
  • phoenix-media-rename/readme.txt

    r3071324 r3072502  
    44Requires at least: 5.0
    55Tested up to: 6.5
    6 Stable tag: 3.11.6
     6Stable tag: 3.11.
    77Requires PHP: 7.4
    88License: GPL3
     
    108108== Changelog ==
    109109
     110
     111
     112
    110113= 3.11.6 =
    111114* added compatibility with Beaver Builder Lite
  • phoenix-media-rename/trunk/classes/class-media-rename.php

    r3013478 r3072502  
    591591            //avoid the file renaming process
    592592            return 1;
    593             } else {
     593            }
     594        else {
    594595            //renaming is enabled
    595596
     
    658659
    659660                //updates posts content
    660                 self::update_posts($post_types, $searches, $replaces);
     661                self::update_posts($post_types, $searches, $replaces);
    661662
    662663                if ($options->option_update_revisions) {
    663664                    //update revisions, if option to update revisions is active
    664665                    $post_types['revision'] = array('post_type' => $post_types);
    665                     self::update_posts($post_types, $searches, $replaces);
     666                    self::update_posts($post_types, $searches, $replaces);
    666667                }
    667668
     
    812813     * @param array $searches strings to search for
    813814     * @param array $replaces values to replace
    814      * @return void
    815      */
    816     private static function update_posts($post_types, $searches, $replaces){
     815     * @param array $old_filename old file name
     816     * @return void
     817     */
     818    private static function update_posts($post_types, $searches, $replaces, $old_filename){
    817819        $i=0;
    818820
    819         while ($posts = get_posts(array('post_type' => $post_types, 'post_status' => 'any', 'numberposts' => 100, 'offset' => $i * 100))) {
     821        while ($posts = get_posts(array('post_type' => $post_types, 'post_status' => 'any', 'numberposts' => 100, 'offset' => $i * 100))) {
    820822            foreach ($posts as $post) {
    821823                // Updating post content if necessary
  • phoenix-media-rename/trunk/readme.txt

    r3071324 r3072502  
    44Requires at least: 5.0
    55Tested up to: 6.5
    6 Stable tag: 3.11.6
     6Stable tag: 3.11.
    77Requires PHP: 7.4
    88License: GPL3
     
    108108== Changelog ==
    109109
     110
     111
     112
    110113= 3.11.6 =
    111114* added compatibility with Beaver Builder Lite
Note: See TracChangeset for help on using the changeset viewer.