rebase on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:23:21 -04:00
parent d37566ffb6
commit d096058d7d
4789 changed files with 254611 additions and 307223 deletions

View File

@@ -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 );