e` parameter. * * @param string $template_type The current template type. * @param string[] $template_hierarchy The current template hierarchy, ordered by priority. * @param string $fallback_template A PHP fallback template to use if no matching block template is found. * @return WP_Block_Template|null template A template object, or null if none could be found. */ function resolve_block_template( $template_type, $template_hierarchy, $fallback_template ) { if ( ! $template_type ) { return null; } if ( empty( $template_hierarchy ) ) { $template_hierarchy = array( $template_type ); } $slugs = array_map( '_strip_template_file_suffix', $template_hierarchy ); // Find all potential templates 'wp_template' post matching the hierarchy. $query = array( 'theme' => get_stylesheet(), 'slug__in' => $slugs, ); $templates = get_block_templates( $query ); // Order these templates per slug priority. // Build map of template slugs to their priority in the current hierarchy. $slug_priorities = array_flip( $slugs ); usort( $templates, static function ( $template_a, $template_b ) use ( $slug_priorities ) { return $slug_priorities[ $template_a->slug ] - $slug_priorities[ $template_b->slug ]; } ); $theme_base_path = get_stylesheet_directory() . DIRECTORY_SEPARATOR; $parent_theme_base_path = get_template_directory() . DIRECTORY_SEPARATOR; // Is the active theme a child theme, and is the PHP fallback template part of it? if ( strpos( $fallback_template, $theme_base_path ) === 0 && strpos( $fallback_template, $parent_theme_base_path ) === false ) { $fallback_template_slug = substr( $fallback_template, // Starting position of slug. strpos( $fallback_template, $theme_base_path ) + strlen( $theme_base_path ), // Remove '.php' suffix. -4 ); // Is our candidate block template's slug identical to our PHP fallback template's? if ( count( $templates ) && $fallback_template_slug === $templates[0]->slug && 'theme' === $templates[0]->source ) { // Unfortunately, we cannot trust $templates[0]->theme, since it will always // be set to the active theme's slug by _build_block_template_result_from_file(), // even if the block template is really coming from the active theme's parent. // (The reason for this is that we want it to be associated with the active theme // -- not its parent -- once we edit it and store it to the DB as a wp_template CPT.) // Instead, we use _get_block_template_file() to locate the block template file. $template_file = _get_block_template_file( 'wp_template', $fallback_template_slug ); if ( $template_file && get_template() === $template_file['theme'] ) { // The block template is part of the parent theme, so we // have to give precedence to the child theme's PHP template. array_shift( $templates ); } } } return count( $templates ) ? $templates[0] : null; } /** * Displays title tag with content, regardless of whether theme has title-tag support. * * @access private * @since 5.8.0 * * @see _wp_render_title_tag() */ function _block_template_render_title_tag() { echo '' . wp_get_document_title() . '' . "\n"; } /** * Returns the markup for the current template. * * @access private * @since 5.8.0 * * @global string $_wp_current_template_content * @global WP_Embed $wp_embed * * @return string Block template markup. */ function get_the_block_template_html() { global $_wp_current_template_content; global $wp_embed; if ( ! $_wp_current_template_content ) { if ( is_user_logged_in() ) { return '

' . esc_html__( 'No matching template found' ) . '

'; } return; } $content = $wp_embed->run_shortcode( $_wp_current_template_content ); $content = $wp_embed->autoembed( $content ); $content = shortcode_unautop( $content ); $content = do_shortcode( $content ); $content = do_blocks( $content ); $content = wptexturize( $content ); $content = convert_smilies( $content ); $content = wp_filter_content_tags( $content, 'template' ); $content = str_replace( ']]>', ']]>', $content ); // Wrap block template in .wp-site-blocks to allow for specific descendant styles // (e.g. `.wp-site-blocks > *`). return '
' . $content . '
'; } /** * Renders a 'viewport' meta tag. * * This is hooked into {@see 'wp_head'} to decouple its output from the default template canvas. * * @access private * @since 5.8.0 */ function _block_template_viewport_meta_tag() { echo '' . "\n"; } /** * Strips .php or .html suffix from template file names. * * @access private * @since 5.8.0 * * @param string $template_file Template file name. * @return string Template file name without extension. */ function _strip_template_file_suffix( $template_file ) { return preg_replace( '/\.(php|html)$/', '', $template_file ); } /** * Removes post details from block context when rendering a block template. * * @access private * @since 5.8.0 * * @param array $context Default context. * * @return array Filtered context. */ function _block_template_render_without_post_block_context( $context ) { /* * When loading a template directly and not through a page that resolves it, * the top-level post ID and type context get set to that of the template. * Templates are just the structure of a site, and they should not be available * as post context because blocks like Post Content would recurse infinitely. */ if ( isset( $context['postType'] ) && 'wp_template' === $context['postType'] ) { unset( $context['postId'] ); unset( $context['postType'] ); } return $context; } /** * Sets the current WP_Query to return auto-draft posts. * * The auto-draft status indicates a new post, so allow the the WP_Query instance to * return an auto-draft post for template resolution when editing a new post. * * @access private * @since 5.9.0 * * @param WP_Query $wp_query Current WP_Query instance, passed by reference. */ function _resolve_template_for_new_post( $wp_query ) { if ( ! $wp_query->is_main_query() ) { return; } remove_filter( 'pre_get_posts', '_resolve_template_for_new_post' ); // Pages. $page_id = isset( $wp_query->query['page_id'] ) ? $wp_query->query['page_id'] : null; // Posts, including custom post types. $p = isset( $wp_query->query['p'] ) ? $wp_query->query['p'] : null; $post_id = $page_id ? $page_id : $p; $post = get_post( $post_id ); if ( $post && 'auto-draft' === $post->post_status && current_user_can( 'edit_post', $post->ID ) ) { $wp_query->set( 'post_status', 'auto-draft' ); } }
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_add_template_loader_filters' not found or invalid function name in /var/www/html/dotwork.com.br/web/jornal/wp-includes/class-wp-hook.php on line 308

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_block_template_render_without_post_block_context' not found or invalid function name in /var/www/html/dotwork.com.br/web/jornal/wp-includes/class-wp-hook.php on line 310

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_block_template_render_without_post_block_context' not found or invalid function name in /var/www/html/dotwork.com.br/web/jornal/wp-includes/class-wp-hook.php on line 310

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_block_template_render_without_post_block_context' not found or invalid function name in /var/www/html/dotwork.com.br/web/jornal/wp-includes/class-wp-hook.php on line 310

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_block_template_render_without_post_block_context' not found or invalid function name in /var/www/html/dotwork.com.br/web/jornal/wp-includes/class-wp-hook.php on line 310

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '_block_template_render_without_post_block_context' not found or invalid function name in /var/www/html/dotwork.com.br/web/jornal/wp-includes/class-wp-hook.php on line 310

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dotwork.com.br/web/jornal/wp-includes/block-template.php:1) in /var/www/html/dotwork.com.br/web/jornal/wp-includes/rest-api/class-wp-rest-server.php on line 1768
{"id":3055,"date":"2023-09-21T16:29:15","date_gmt":"2023-09-21T19:29:15","guid":{"rendered":"http:\/\/dotwork.com.br\/jornal\/2023\/09\/padre-osorio-citora-afonso-e-o-novo-bispo-auxiliar-de-maputo-em-mocambique\/"},"modified":"2023-09-21T16:29:15","modified_gmt":"2023-09-21T19:29:15","slug":"padre-osorio-citora-afonso-e-o-novo-bispo-auxiliar-de-maputo-em-mocambique","status":"publish","type":"post","link":"http:\/\/dotwork.com.br\/jornal\/2023\/09\/padre-osorio-citora-afonso-e-o-novo-bispo-auxiliar-de-maputo-em-mocambique\/","title":{"rendered":"Padre Os\u00f3rio Citora Afonso \u00e9 o novo Bispo Auxiliar de Maputo, em Mo\u00e7ambique"},"content":{"rendered":"
\n

O Papa Francisco nomeou como Bispo Auxiliar da Arquidiocese de Maputo (Mo\u00e7ambique) o Rev.do Padre Os\u00f3rio Citora Afonso, I.M.C., at\u00e9 agora Oficial do Dicast\u00e9rio para a Evangeliza\u00e7\u00e3o, Sec\u00e7\u00e3o para a primeira evangeliza\u00e7\u00e3o e as novas Igrejas particulares, atribuindo-lhe a Sede titular de Puzia da Num\u00eddia.<\/p>\n

Leia tudo<\/a><\/p>\n

\u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

O Papa Francisco nomeou como Bispo Auxiliar da Arquidiocese de Maputo (Mo\u00e7ambique) o Rev.do Padre Os\u00f3rio Citora Afonso, I.M.C., at\u00e9<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":""},"categories":[7],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"colormag-highlighted-post":false,"colormag-featured-post-medium":false,"colormag-featured-post-small":false,"colormag-featured-image":false},"uagb_author_info":{"display_name":"Redator","author_link":"http:\/\/dotwork.com.br\/jornal\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"O Papa Francisco nomeou como Bispo Auxiliar da Arquidiocese de Maputo (Mo\u00e7ambique) o Rev.do Padre Os\u00f3rio Citora Afonso, I.M.C., at\u00e9","_links":{"self":[{"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/posts\/3055"}],"collection":[{"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/comments?post=3055"}],"version-history":[{"count":0,"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/posts\/3055\/revisions"}],"wp:attachment":[{"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/media?parent=3055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/categories?post=3055"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dotwork.com.br\/jornal\/wp-json\/wp\/v2\/tags?post=3055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}