rebase on oct-10-2023
This commit is contained in:
@@ -297,8 +297,8 @@ class Image_Helper {
|
||||
/**
|
||||
* Find an attachment ID for a given URL.
|
||||
*
|
||||
* @param string $url The URL to find the attachment for.
|
||||
* @param bool $use_link_table Whether the SEO Links table will be used to retrieve the id.
|
||||
* @param string $url The URL to find the attachment for.
|
||||
* @param bool $use_link_table Whether the SEO Links table will be used to retrieve the id.
|
||||
*
|
||||
* @return int The found attachment ID, or 0 if none was found.
|
||||
*/
|
||||
@@ -308,7 +308,8 @@ class Image_Helper {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( ! $this->options_helper->get( 'disable-attachment' ) ) {
|
||||
/** The `wpseo_force_creating_and_using_attachment_indexables` filter is documented in indexable-link-builder.php */
|
||||
if ( ! $this->options_helper->get( 'disable-attachment' ) || \apply_filters( 'wpseo_force_creating_and_using_attachment_indexables', false ) ) {
|
||||
// Strip out the size part of an image URL.
|
||||
$url = \preg_replace( '/(.*)-\d+x\d+\.(jpeg|jpg|png|gif)$/', '$1.$2', $url );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user