The id of the attachment. * @param string $attachment_src The attachment src. */ $image_size = \apply_filters( 'wpseo_structured_data_blocks_image_size', $image_size, $attachment_id, $src_matches[1] ); $image_html = \wp_get_attachment_image( $attachment_id, $image_size, false, $image_style ); if ( empty( $image_html ) ) { return $matches[0]; } return $image_html; }, $content ); if ( ! $this->registered_shutdown_function ) { \register_shutdown_function( [ $this, 'maybe_save_used_caches' ] ); $this->registered_shutdown_function = true; } return $content; } /** * If the caches of structured data block images have been changed, saves them. * * @return void */ public function maybe_save_used_caches() { foreach ( $this->used_caches as $post_id => $used_cache ) { if ( isset( $this->caches[ $post_id ] ) && $used_cache === $this->caches[ $post_id ] ) { continue; } \update_post_meta( $post_id, 'yoast-structured-data-blocks-images-cache', $used_cache ); } } /** * Converts an attachment src to an attachment ID. * * @param string $src The attachment src. * * @return int The attachment ID. 0 if none was found. */ private function attachment_src_to_id( $src ) { global $post; if ( isset( $this->used_caches[ $post->ID ][ $src ] ) ) { return $this->used_caches[ $post->ID ][ $src ]; } $cache = $this->get_cache_for_post( $post->ID ); if ( isset( $cache[ $src ] ) ) { $this->used_caches[ $post->ID ][ $src ] = $cache[ $src ]; return $cache[ $src ]; } $this->used_caches[ $post->ID ][ $src ] = $this->image_helper->get_attachment_by_url( $src ); return $this->used_caches[ $post->ID ][ $src ]; } /** * Returns the cache from postmeta for a given post. * * @param int $post_id The post ID. * * @return array The images cache. */ private function get_cache_for_post( $post_id ) { if ( isset( $this->caches[ $post_id ] ) ) { return $this->caches[ $post_id ]; } $cache = \get_post_meta( $post_id, 'yoast-structured-data-blocks-images-cache', true ); if ( ! $cache ) { $cache = []; } $this->caches[ $post_id ] = $cache; return $cache; } /** * Adds any images that have their ID in the block attributes to the cache. * * @param int $post_id The post ID. * @param array $elements The elements. * @param string $key The key in the elements we should loop over. * * @return void */ private function add_images_from_attributes_to_used_cache( $post_id, $elements, $key ) { // First grab all image IDs from the attributes. $images = []; foreach ( $elements as $element ) { if ( ! isset( $element[ $key ] ) ) { continue; } if ( isset( $element[ $key ] ) && \is_array( $element[ $key ] ) ) { foreach ( $element[ $key ] as $part ) { if ( ! \is_array( $part ) || ! isset( $part['type'] ) || $part['type'] !== 'img' ) { continue; } if ( ! isset( $part['key'] ) || ! isset( $part['props']['src'] ) ) { continue; } $images[ $part['props']['src'] ] = (int) $part['key']; } } } if ( isset( $this->used_caches[ $post_id ] ) ) { $this->used_caches[ $post_id ] = \array_merge( $this->used_caches[ $post_id ], $images ); } else { $this->used_caches[ $post_id ] = $images; } } /* DEPRECATED METHODS */ /** * Enqueue Gutenberg block assets for backend editor. * * @deprecated 22.7 * @codeCoverageIgnore * * @return void */ public function enqueue_block_editor_assets() { \_deprecated_function( __METHOD__, 'Yoast SEO 22.7' ); } } Activiteiten - Alles voor Elkaar
Menu Sluiten

Activiteiten

1 2 3

Uitgelichte activiteiten

Geen activiteiten
ma
di
wo
do
vr
za
zo
m
d
w
d
v
z
z
2
3
5
6
7
9
10
12
13
14
16
17
19
20
21
23
24
26
27
28
30
31
1
2
3
4
01 jul
ma 1 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
04 jul
do 4 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
08 jul
ma 8 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
11 jul
do 11 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
15 jul
ma 15 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
18 jul
do 18 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
22 jul
ma 22 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
25 jul
do 25 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
29 jul
ma 29 jul 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
01 aug
do 1 aug 2024    
09:00 - 12:00
Heeft u een lekke band of zoekt u een fiets voor een voordelig tarief? Dan bent u bij ons welkom. We  repareren ook rollators en [...]
Events on ma 1 jul 2024
01 jul
1 jul 24
#_TOWN
Events on do 4 jul 2024
04 jul
4 jul 24
#_TOWN
Events on ma 8 jul 2024
08 jul
8 jul 24
#_TOWN
Events on do 11 jul 2024
11 jul
11 jul 24
#_TOWN
Events on ma 15 jul 2024
15 jul
15 jul 24
#_TOWN
Events on do 18 jul 2024
18 jul
18 jul 24
#_TOWN
Events on ma 22 jul 2024
22 jul
22 jul 24
#_TOWN
Events on do 25 jul 2024
25 jul
25 jul 24
#_TOWN
Events on ma 29 jul 2024
29 jul
29 jul 24
#_TOWN
Events on do 1 aug 2024
01 aug
1 aug 24
#_TOWN