Priority File Manager

📁 public_html
Base Directory:
/home/toolrmtm/crazyespresso.com/wp-includes/blocks
NameTypeSizeActions
📁 .. Folder -
📁 accordion Folder -
📁 accordion-heading Folder -
📁 accordion-item Folder -
📄 accordion-item.php File 2411
Edit Download
📁 accordion-panel Folder -
📄 accordion.php File 1147
Edit Download
📁 archives Folder -
📄 archives.php File 4415
Edit Download
📁 audio Folder -
📁 avatar Folder -
📄 avatar.php File 5745
Edit Download
📁 block Folder -
📄 block.php File 4186
Edit Download
📄 blocks-json.php File 218576
Edit Download
📁 button Folder -
📄 button.php File 1752
Edit Download
📁 buttons Folder -
📁 calendar Folder -
📄 calendar.php File 6075
Edit Download
📁 categories Folder -
📄 categories.php File 4650
Edit Download
📁 code Folder -
📁 column Folder -
📁 columns Folder -
📁 comment-author-name Folder -
📄 comment-author-name.php File 2133
Edit Download
📁 comment-content Folder -
📄 comment-content.php File 2459
Edit Download
📁 comment-date Folder -
📄 comment-date.php File 1863
Edit Download
📁 comment-edit-link Folder -
📄 comment-edit-link.php File 1713
Edit Download
📁 comment-reply-link Folder -
📄 comment-reply-link.php File 2075
Edit Download
📁 comment-template Folder -
📄 comment-template.php File 4494
Edit Download
📁 comments Folder -
📁 comments-pagination Folder -
📁 comments-pagination-next Folder -
📄 comments-pagination-next.php File 1924
Edit Download
📁 comments-pagination-numbers Folder -
📄 comments-pagination-numbers.php File 1632
Edit Download
📁 comments-pagination-previous Folder -
📄 comments-pagination-previous.php File 1790
Edit Download
📄 comments-pagination.php File 1261
Edit Download
📁 comments-title Folder -
📄 comments-title.php File 2772
Edit Download
📄 comments.php File 6784
Edit Download
📁 cover Folder -
📄 cover.php File 3175
Edit Download
📁 details Folder -
📁 embed Folder -
📁 file Folder -
📄 file.php File 1879
Edit Download
📁 footnotes Folder -
📄 footnotes.php File 3771
Edit Download
📁 freeform Folder -
📁 gallery Folder -
📄 gallery.php File 6439
Edit Download
📁 group Folder -
📁 heading Folder -
📄 heading.php File 1301
Edit Download
📁 home-link Folder -
📄 home-link.php File 5438
Edit Download
📁 html Folder -
📁 image Folder -
📄 image.php File 13824
Edit Download
📄 index.php File 5111
Edit Download
📁 latest-comments Folder -
📄 latest-comments.php File 5030
Edit Download
📁 latest-posts Folder -
📄 latest-posts.php File 8734
Edit Download
📁 legacy-widget Folder -
📄 legacy-widget.php File 4011
Edit Download
📁 list Folder -
📁 list-item Folder -
📄 list.php File 1273
Edit Download
📁 loginout Folder -
📄 loginout.php File 1664
Edit Download
📁 math Folder -
📁 media-text Folder -
📄 media-text.php File 4383
Edit Download
📁 missing Folder -
📁 more Folder -
📁 navigation Folder -
📁 navigation-link Folder -
📄 navigation-link.php File 13961
Edit Download
📁 navigation-submenu Folder -
📄 navigation-submenu.php File 9976
Edit Download
📄 navigation.php File 49550
Edit Download
📁 nextpage Folder -
📁 page-list Folder -
📁 page-list-item Folder -
📄 page-list-item.php File 361
Edit Download
📄 page-list.php File 13611
Edit Download
📁 paragraph Folder -
📁 pattern Folder -
📄 pattern.php File 1788
Edit Download
📁 post-author Folder -
📁 post-author-biography Folder -
📄 post-author-biography.php File 1524
Edit Download
📁 post-author-name Folder -
📄 post-author-name.php File 1951
Edit Download
📄 post-author.php File 2734
Edit Download
📁 post-comments-count Folder -
📄 post-comments-count.php File 1275
Edit Download
📁 post-comments-form Folder -
📄 post-comments-form.php File 2805
Edit Download
📁 post-comments-link Folder -
📄 post-comments-link.php File 2237
Edit Download
📁 post-content Folder -
📄 post-content.php File 2347
Edit Download
📁 post-date Folder -
📄 post-date.php File 3632
Edit Download
📁 post-excerpt Folder -
📄 post-excerpt.php File 3612
Edit Download
📁 post-featured-image Folder -
📄 post-featured-image.php File 9363
Edit Download
📁 post-navigation-link Folder -
📄 post-navigation-link.php File 4837
Edit Download
📁 post-template Folder -
📄 post-template.php File 5749
Edit Download
📁 post-terms Folder -
📄 post-terms.php File 3640
Edit Download
📁 post-time-to-read Folder -
📄 post-time-to-read.php File 6493
Edit Download
📁 post-title Folder -
📄 post-title.php File 2138
Edit Download
📁 preformatted Folder -
📁 pullquote Folder -
📁 query Folder -
📁 query-no-results Folder -
📄 query-no-results.php File 1847
Edit Download
📁 query-pagination Folder -
📁 query-pagination-next Folder -
📄 query-pagination-next.php File 3781
Edit Download
📁 query-pagination-numbers Folder -
📄 query-pagination-numbers.php File 4770
Edit Download
📁 query-pagination-previous Folder -
📄 query-pagination-previous.php File 3578
Edit Download
📄 query-pagination.php File 1176
Edit Download
📁 query-title Folder -
📄 query-title.php File 2943
Edit Download
📁 query-total Folder -
📄 query-total.php File 2535
Edit Download
📄 query.php File 5690
Edit Download
📁 quote Folder -
📁 read-more Folder -
📄 read-more.php File 1830
Edit Download
📄 require-dynamic-blocks.php File 4700
Edit Download
📄 require-static-blocks.php File 558
Edit Download
📁 rss Folder -
📄 rss.php File 4609
Edit Download
📁 search Folder -
📄 search.php File 23817
Edit Download
📁 separator Folder -
📁 shortcode Folder -
📄 shortcode.php File 735
Edit Download
📁 site-logo Folder -
📄 site-logo.php File 6334
Edit Download
📁 site-tagline Folder -
📄 site-tagline.php File 1203
Edit Download
📁 site-title Folder -
📄 site-title.php File 1864
Edit Download
📁 social-link Folder -
📄 social-link.php File 67735
Edit Download
📁 social-links Folder -
📁 spacer Folder -
📁 table Folder -
📁 tag-cloud Folder -
📄 tag-cloud.php File 1590
Edit Download
📁 template-part Folder -
📄 template-part.php File 10154
Edit Download
📁 term-count Folder -
📄 term-count.php File 1843
Edit Download
📁 term-description Folder -
📄 term-description.php File 1770
Edit Download
📁 term-name Folder -
📄 term-name.php File 2069
Edit Download
📁 term-template Folder -
📄 term-template.php File 4468
Edit Download
📁 terms-query Folder -
📁 text-columns Folder -
📁 verse Folder -
📁 video Folder -
📄 video.php File 2733
Edit Download
📁 widget-group Folder -
📄 widget-group.php File 2438
Edit Download
set_bookmark( 'here' ); $opener = $this->bookmarks['here']; // Allow comments within the definition of “empty.” while ( $this->next_token() && '#comment' === $this->get_token_name() ) { continue; } if ( 'FIGCAPTION' !== $this->get_tag() || ! $this->is_tag_closer() ) { return false; } $this->set_bookmark( 'here' ); $closer = $this->bookmarks['here']; return new WP_HTML_Span( $opener->start, $closer->start + $closer->length - $opener->start ); } }; if ( ! $processor->next_tag( 'img' ) || ! $processor->get_attribute( 'src' ) ) { return ''; } $has_id_binding = isset( $attributes['metadata']['bindings']['id'] ) && isset( $attributes['id'] ); // Ensure the `wp-image-id` classname on the image block supports block bindings. if ( $has_id_binding ) { // If there's a mismatch with the 'wp-image-' class and the actual id, the id was // probably overridden by block bindings. Update it to the correct value. // See https://github.com/WordPress/gutenberg/issues/62886 for why this is needed. $id = $attributes['id']; $image_classnames = $processor->get_attribute( 'class' ); $class_with_binding_value = "wp-image-$id"; if ( is_string( $image_classnames ) && ! str_contains( $image_classnames, $class_with_binding_value ) ) { $image_classnames = preg_replace( '/wp-image-(\d+)/', $class_with_binding_value, $image_classnames ); $processor->set_attribute( 'class', $image_classnames ); } } // For backwards compatibility, the data-id html attribute is only set for // image blocks nested in a gallery. Detect if the image is in a gallery by // checking the data-id attribute. // See the `block_core_gallery_data_id_backcompatibility` function. if ( isset( $attributes['data-id'] ) ) { // If there's a binding for the `id`, the `id` attribute is used for the // value, since `data-id` does not support block bindings. // Else the `data-id` is used for backwards compatibility, since // third parties may be filtering its value. $data_id = $has_id_binding ? $attributes['id'] : $attributes['data-id']; $processor->set_attribute( 'data-id', $data_id ); } /* * If the `caption` attribute is empty and we encounter a `
` element, * we take note of its span so we can remove it later. */ if ( $processor->next_tag( 'FIGCAPTION' ) && empty( $attributes['caption'] ) ) { $figcaption_span = $processor->block_core_image_extract_empty_figcaption_element(); } $link_destination = isset( $attributes['linkDestination'] ) ? $attributes['linkDestination'] : 'none'; $lightbox_settings = block_core_image_get_lightbox_settings( $block->parsed_block ); /* * If the lightbox is enabled and the image is not linked, adds the filter and * the JavaScript view file. */ if ( isset( $lightbox_settings ) && 'none' === $link_destination && isset( $lightbox_settings['enabled'] ) && true === $lightbox_settings['enabled'] ) { wp_enqueue_script_module( '@wordpress/block-library/image/view' ); /* * This render needs to happen in a filter with priority 15 to ensure that * it runs after the duotone filter and that duotone styles are applied to * the image in the lightbox. Lightbox has to work with any plugins that * might use filters as well. Removing this can be considered in the future * if the way the blocks are rendered changes, or if a new kind of filter is * introduced. */ add_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15, 2 ); } else { /* * Remove the filter if previously added by other Image blocks. */ remove_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15 ); } $output = $processor->get_updated_html(); if ( ! empty( $figcaption_span ) ) { return substr( $output, 0, $figcaption_span->start ) . substr( $output, $figcaption_span->start + $figcaption_span->length ); } return $output; } /** * Adds the lightboxEnabled flag to the block data. * * This is used to determine whether the lightbox should be rendered or not. * * @since 6.4.0 * * @param array $block Block data. * * @return array|null Filtered block data. */ function block_core_image_get_lightbox_settings( $block ) { // Gets the lightbox setting from the block attributes. if ( isset( $block['attrs']['lightbox'] ) ) { $lightbox_settings = $block['attrs']['lightbox']; } if ( ! isset( $lightbox_settings ) ) { $lightbox_settings = wp_get_global_settings( array( 'lightbox' ), array( 'block_name' => 'core/image' ) ); // If not present in global settings, check the top-level global settings. // // NOTE: If no block-level settings are found, the previous call to // `wp_get_global_settings` will return the whole `theme.json` structure in // which case we can check if the "lightbox" key is present at the top-level // of the global settings and use its value. if ( isset( $lightbox_settings['lightbox'] ) ) { $lightbox_settings = wp_get_global_settings( array( 'lightbox' ) ); } } return $lightbox_settings ?? null; } /** * Adds the directives and layout needed for the lightbox behavior. * * @since 6.4.0 * * @param string $block_content Rendered block content. * @param array $block Block object. * * @return string Filtered block content. */ function block_core_image_render_lightbox( $block_content, $block ) { /* * If there's no IMG tag in the block then return the given block content * as-is. There's nothing that this code can knowingly modify to add the * lightbox behavior. */ $processor = new WP_HTML_Tag_Processor( $block_content ); if ( $processor->next_tag( 'figure' ) ) { $processor->set_bookmark( 'figure' ); } if ( ! $processor->next_tag( 'img' ) ) { return $block_content; } $alt = $processor->get_attribute( 'alt' ); $img_uploaded_src = $processor->get_attribute( 'src' ); $img_class_names = $processor->get_attribute( 'class' ); $img_styles = $processor->get_attribute( 'style' ); $img_width = 'none'; $img_height = 'none'; $aria_label = __( 'Enlarge' ); $dialog_aria_label = __( 'Enlarged image' ); if ( isset( $block['attrs']['id'] ) ) { $img_uploaded_src = wp_get_attachment_url( $block['attrs']['id'] ); $img_metadata = wp_get_attachment_metadata( $block['attrs']['id'] ); $img_width = $img_metadata['width'] ?? 'none'; $img_height = $img_metadata['height'] ?? 'none'; } // Figure. $processor->seek( 'figure' ); $figure_class_names = $processor->get_attribute( 'class' ); $figure_styles = $processor->get_attribute( 'style' ); // Create unique id and set the image metadata in the state. $unique_image_id = uniqid(); wp_interactivity_state( 'core/image', array( 'metadata' => array( $unique_image_id => array( 'uploadedSrc' => $img_uploaded_src, 'figureClassNames' => $figure_class_names, 'figureStyles' => $figure_styles, 'imgClassNames' => $img_class_names, 'imgStyles' => $img_styles, 'targetWidth' => $img_width, 'targetHeight' => $img_height, 'scaleAttr' => $block['attrs']['scale'] ?? false, 'ariaLabel' => $dialog_aria_label, 'alt' => $alt, ), ), ) ); $processor->add_class( 'wp-lightbox-container' ); $processor->set_attribute( 'data-wp-interactive', 'core/image' ); $processor->set_attribute( 'data-wp-context', wp_json_encode( array( 'imageId' => $unique_image_id, ), JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP ) ); $processor->set_attribute( 'data-wp-key', $unique_image_id ); // Image. $processor->next_tag( 'img' ); $processor->set_attribute( 'data-wp-init', 'callbacks.setButtonStyles' ); $processor->set_attribute( 'data-wp-on--load', 'callbacks.setButtonStyles' ); $processor->set_attribute( 'data-wp-on-window--resize', 'callbacks.setButtonStyles' ); // Sets an event callback on the `img` because the `figure` element can also // contain a caption, and we don't want to trigger the lightbox when the // caption is clicked. $processor->set_attribute( 'data-wp-on--click', 'actions.showLightbox' ); $processor->set_attribute( 'data-wp-class--hide', 'state.isContentHidden' ); $processor->set_attribute( 'data-wp-class--show', 'state.isContentVisible' ); $body_content = $processor->get_updated_html(); // Adds a button alongside image in the body content. $img = null; preg_match( '/]+>/', $body_content, $img ); $button = $img[0] . ''; $body_content = preg_replace( '/]+>/', $button, $body_content ); add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' ); return $body_content; } /** * @since 6.5.0 */ function block_core_image_print_lightbox_overlay() { $close_button_label = esc_attr__( 'Close' ); // If the current theme does NOT have a `theme.json`, or the colors are not // defined, it needs to set the background color & close button color to some // default values because it can't get them from the Global Styles. $background_color = '#fff'; $close_button_color = '#000'; if ( wp_theme_has_theme_json() ) { $global_styles_color = wp_get_global_styles( array( 'color' ) ); if ( ! empty( $global_styles_color['background'] ) ) { $background_color = esc_attr( $global_styles_color['background'] ); } if ( ! empty( $global_styles_color['text'] ) ) { $close_button_color = esc_attr( $global_styles_color['text'] ); } } echo <<
HTML; } /** * Registers the `core/image` block on server. * * @since 5.9.0 */ function register_block_core_image() { register_block_type_from_metadata( __DIR__ . '/image', array( 'render_callback' => 'render_block_core_image', ) ); } add_action( 'init', 'register_block_core_image' );