images ) { if ( ! current_user_can( 'edit_post', get_the_ID() ) ) { return ''; } $connection_unavailable = is_wp_error( $gallery ) && 'instagram_connection_unavailable' === $gallery->get_error_code(); $error_message = $connection_unavailable ? $gallery->get_error_message() : esc_html__( 'An error occurred in the Latest Instagram Posts block. Please try again later.', 'jetpack' ); $message = $error_message . '
' . esc_html__( '(Only administrators and the post author will see this message.)', 'jetpack' ); return Jetpack_Gutenberg::notice( $message, 'error', Blocks::classes( Blocks::get_block_feature( __DIR__ ), $attributes ) ); } if ( empty( $gallery->images ) ) { return ''; } $images = array_slice( $gallery->images, 0, $count ); Jetpack_Gutenberg::load_assets_as_required( __DIR__ ); ob_start(); ?>
<?php echo esc_attr( $image->title ? $image->title : $image->link ); ?>
3, 'count' => 9, 'isStackedOnMobile' => true, 'spacing' => 10, ); if ( array_key_exists( $attribute, $default_attributes ) ) { return $default_attributes[ $attribute ]; } }