ID ); $kicker = $cats ? (string) $cats[0]->name : ''; $cards .= '' . (string) wp_get_attachment_image( $pic, 'large', false, array( 'class' => 'aieo-journal__image', 'alt' => '', 'sizes' => '(max-width: 47.999rem) 78vw, (max-width: 63.999rem) 46vw, 33vw', 'loading' => 'lazy', 'decoding' => 'async', ) ) . '' . ( '' !== $kicker ? '' . esc_html( $kicker ) . '' : '' ) . '' . esc_html( (string) get_the_title( $post ) ) . '' . ''; } if ( '' === $cards ) { return ''; } self::enqueue_style(); $heading = trim( (string) ( $args['heading'] ?? '' ) ); $all_text = trim( (string) ( $args['all_text'] ?? '' ) ); $all_text = '' !== $all_text ? $all_text : __( 'All stories', 'ai-eshop-optimizer' ); $all_href = trim( (string) ( $args['all_href'] ?? '' ) ); if ( '' === $all_href ) { $blog = (int) get_option( 'page_for_posts' ); $all_href = $blog > 0 ? (string) get_permalink( $blog ) : ''; } $show_all = ( ! isset( $args['show_all'] ) || (bool) $args['show_all'] ) && '' !== $all_href; $head_id = wp_unique_id( 'aieo-journal-' ); $all = $show_all ? '' . esc_html( $all_text ) . '' : ''; $extra = (array) ( $args['wrapper'] ?? array() ) + ( '' !== $heading ? array( 'aria-labelledby' => $head_id ) : array() ); if ( isset( $args['block'] ) && false === $args['block'] ) { $wrapper = ''; foreach ( $extra as $name => $value ) { $wrapper .= ' ' . sanitize_key( (string) $name ) . '="' . esc_attr( (string) $value ) . '"'; } $wrapper = ltrim( $wrapper ); } else { $wrapper = get_block_wrapper_attributes( $extra ); } return '' . ( '' !== $heading || '' !== $all ? '' . ( '' !== $heading ? '' . esc_html( $heading ) . '' : '' ) . $all . '' : '' ) . '' . $cards . '' . ( $show_all ? '' . esc_html( $all_text ) . '' : '' ) . ''; } } endif;
' . esc_html( $all_text ) . '