Changeset 3084338
- Timestamp:
- 05/10/2024 06:31:47 AM (23 months ago)
- Location:
- xo-featured-image-tools
- Files:
-
- 6 edited
- 1 copied
-
tags/1.15.2 (copied) (copied from xo-featured-image-tools/trunk)
-
tags/1.15.2/admin.php (modified) (3 diffs)
-
tags/1.15.2/readme.txt (modified) (2 diffs)
-
tags/1.15.2/xo-featured-image-tools.php (modified) (2 diffs)
-
trunk/admin.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/xo-featured-image-tools.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
xo-featured-image-tools/tags/1.15.2/admin.php
r3071380 r3084338 220 220 } 221 221 222 $home_url = get_home_url(); 223 222 224 $matches = array(); 223 225 preg_match_all( '/<img .*?src\s*=\s*[\"|\'](.*?)[\"|\'].*?>/i', $content, $matches ); … … 255 257 $class_matches = array(); 256 258 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 } 260 264 } 261 265 } … … 268 272 // Get ID from GUID URL. 269 273 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 } 271 277 } 272 278 -
xo-featured-image-tools/tags/1.15.2/readme.txt
r3071380 r3084338 5 5 Tested up to: 6.5 6 6 Requires PHP: 5.6 7 Stable tag: 1.15. 17 Stable tag: 1.15.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 == Changelog == 36 36 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 37 40 = 1.15.1 = 38 41 * 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 16 16 * Requires at least: 4.9 17 17 * Requires PHP: 5.6 18 * Version: 1.15. 118 * Version: 1.15.2 19 19 * Text Domain: xo-featured-image-tools 20 20 * Domain Path: /languages … … 25 25 } 26 26 27 define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15. 1' );27 define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15.2' ); 28 28 29 29 require_once __DIR__ . '/admin.php'; -
xo-featured-image-tools/trunk/admin.php
r3071380 r3084338 220 220 } 221 221 222 $home_url = get_home_url(); 223 222 224 $matches = array(); 223 225 preg_match_all( '/<img .*?src\s*=\s*[\"|\'](.*?)[\"|\'].*?>/i', $content, $matches ); … … 255 257 $class_matches = array(); 256 258 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 } 260 264 } 261 265 } … … 268 272 // Get ID from GUID URL. 269 273 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 } 271 277 } 272 278 -
xo-featured-image-tools/trunk/readme.txt
r3071380 r3084338 5 5 Tested up to: 6.5 6 6 Requires PHP: 5.6 7 Stable tag: 1.15. 17 Stable tag: 1.15.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 == Changelog == 36 36 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 37 40 = 1.15.1 = 38 41 * Fixed a bug where an error message might be displayed. -
xo-featured-image-tools/trunk/xo-featured-image-tools.php
r3071380 r3084338 16 16 * Requires at least: 4.9 17 17 * Requires PHP: 5.6 18 * Version: 1.15. 118 * Version: 1.15.2 19 19 * Text Domain: xo-featured-image-tools 20 20 * Domain Path: /languages … … 25 25 } 26 26 27 define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15. 1' );27 define( 'XO_FEATURED_IMAGE_TOOLS_VERSION', '1.15.2' ); 28 28 29 29 require_once __DIR__ . '/admin.php';
Note: See TracChangeset
for help on using the changeset viewer.