Plugin Directory

Changeset 3084338


Ignore:
Timestamp:
05/10/2024 06:31:47 AM (23 months ago)
Author:
ishitaka
Message:

Update to version 1.15.2 from GitHub

Location:
xo-featured-image-tools
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • xo-featured-image-tools/tags/1.15.2/admin.php

    r3071380 r3084338  
    220220        }
    221221
     222        $home_url = get_home_url();
     223
    222224        $matches = array();
    223225        preg_match_all( '/<img .*?src\s*=\s*[\"|\'](.*?)[\"|\'].*?>/i', $content, $matches );
     
    255257            $class_matches = array();
    256258            if ( preg_match( '/class\s*=\s*[\"|\'].*?wp-image-([0-9]*).*?[\"|\']/i', $img, $class_matches ) ) {
    257                 $id = (int) $class_matches[1];
    258                 if ( ! empty( wp_get_attachment_image_url( $id ) ) ) {
    259                     $attachment_id = $id;
     259                if ( 0 === strpos( $url, $home_url ) ) {
     260                    $id = (int) $class_matches[1];
     261                    if ( ! empty( wp_get_attachment_image_url( $id ) ) ) {
     262                        $attachment_id = $id;
     263                    }
    260264                }
    261265            }
     
    268272            // Get ID from GUID URL.
    269273            if ( ! $attachment_id ) {
    270                 $attachment_id = $this->get_attachment_id_by_guid( $url );
     274                if ( 0 === strpos( $url, $home_url ) ) {
     275                    $attachment_id = $this->get_attachment_id_by_guid( $url );
     276                }
    271277            }
    272278
  • xo-featured-image-tools/tags/1.15.2/readme.txt

    r3071380 r3084338  
    55Tested up to: 6.5
    66Requires PHP: 5.6
    7 Stable tag: 1.15.1
     7Stable tag: 1.15.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535== Changelog ==
    3636
     37= 1.15.2 =
     38* Fixed a bug that an incorrect featured image may be selected in a site migration environment with a URL change.
     39
    3740= 1.15.1 =
    3841* Fixed a bug where an error message might be displayed.
  • xo-featured-image-tools/tags/1.15.2/xo-featured-image-tools.php

    r3071380 r3084338  
    1616 * Requires at least: 4.9
    1717 * Requires PHP:      5.6
    18  * Version:           1.15.1
     18 * Version:           1.15.2
    1919 * Text Domain:       xo-featured-image-tools
    2020 * Domain Path:       /languages
     
    2525}
    2626
    27 define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15.1' );
     27define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15.2' );
    2828
    2929require_once __DIR__ . '/admin.php';
  • xo-featured-image-tools/trunk/admin.php

    r3071380 r3084338  
    220220        }
    221221
     222        $home_url = get_home_url();
     223
    222224        $matches = array();
    223225        preg_match_all( '/<img .*?src\s*=\s*[\"|\'](.*?)[\"|\'].*?>/i', $content, $matches );
     
    255257            $class_matches = array();
    256258            if ( preg_match( '/class\s*=\s*[\"|\'].*?wp-image-([0-9]*).*?[\"|\']/i', $img, $class_matches ) ) {
    257                 $id = (int) $class_matches[1];
    258                 if ( ! empty( wp_get_attachment_image_url( $id ) ) ) {
    259                     $attachment_id = $id;
     259                if ( 0 === strpos( $url, $home_url ) ) {
     260                    $id = (int) $class_matches[1];
     261                    if ( ! empty( wp_get_attachment_image_url( $id ) ) ) {
     262                        $attachment_id = $id;
     263                    }
    260264                }
    261265            }
     
    268272            // Get ID from GUID URL.
    269273            if ( ! $attachment_id ) {
    270                 $attachment_id = $this->get_attachment_id_by_guid( $url );
     274                if ( 0 === strpos( $url, $home_url ) ) {
     275                    $attachment_id = $this->get_attachment_id_by_guid( $url );
     276                }
    271277            }
    272278
  • xo-featured-image-tools/trunk/readme.txt

    r3071380 r3084338  
    55Tested up to: 6.5
    66Requires PHP: 5.6
    7 Stable tag: 1.15.1
     7Stable tag: 1.15.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535== Changelog ==
    3636
     37= 1.15.2 =
     38* Fixed a bug that an incorrect featured image may be selected in a site migration environment with a URL change.
     39
    3740= 1.15.1 =
    3841* Fixed a bug where an error message might be displayed.
  • xo-featured-image-tools/trunk/xo-featured-image-tools.php

    r3071380 r3084338  
    1616 * Requires at least: 4.9
    1717 * Requires PHP:      5.6
    18  * Version:           1.15.1
     18 * Version:           1.15.2
    1919 * Text Domain:       xo-featured-image-tools
    2020 * Domain Path:       /languages
     
    2525}
    2626
    27 define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15.1' );
     27define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15.2' );
    2828
    2929require_once __DIR__ . '/admin.php';
Note: See TracChangeset for help on using the changeset viewer.