ew 6a1237012415c3aa8d3c3de5c1e0e524;a:2:{i}HD 1af6d36e723bf2b308493dc07d0197b2ft HAG4 c78ebf0f66a0c14991119ff3edc813d4ed";s:1{' 8b2bd3cfc853e854b3865a82b4045e62:"opa3 3a68a8539273363f2563bc2c87c6eed9s:0:"";9wj c81ee568ef29b121ac0913c189b9c477"sho5} 239af794a939e7f49a39451bb94b17d9_emp2 208d02cb229ea1efec9194ea288919930:"";s:t@3 17f0627c658d763ec50d111f055607b5"";s­ݺ d94049e138288ab062296ab446838f15";s:7:"b!CY faff1b131ab5d31c67ee53121cd614b4ffixܶ 0c5ddf9a65572cf817a2ea6b5934cf923[ d25a27ab10d2c4a812b1e4cdcafb3c05!Überschrift H4 Textschattenfarbe| fd6399bed923a77c37a18611dd2983af7Gvr b412840fd510f53fb0bf33afd8d7b14d>[ : aa49aa439dbc5056cc2126b89a7216e5{)U 0317b7dfa4715c4a62439129e0a0bac4}V&ٓ 9031b6f4b793cdc40328fb703ef924d9? fa7308f7bb8c4db01060e5db670a2951ʿk6 e6876aea3abf4aa8a20b8a9d0204d86a{ăwK af5fe89f6a94cee267ba3184cf91e7e95( 1b9569a00c9a301addbbdcdb37b307fe=x*ꝫ cd7a4e7b8ffa5eeba8f1af2e951a8236JJr@ 82d1e757899303a49694e6f64c85ccddq]| 22f1085c9e62744af35b7902517018f8ȣ[ edf812daafd8ec90b6f38c23ff749582R b527d04a7e6b5f15b03ce09812f03317jk 51145c618f728f0b2437fe9aecfb162cc 5abaa1c482890472889388070a6f9472t׾ 81577d037bdaf83899b703fa09aefafd|@ߎ dc8f3ca0f557e09da7117a06dc49a9efЩFݼ/ 8a291c33e13225a070c8b3a47abf46a4c,] 150675d369db62454f769eb942ff2529#`ɡ!header_4_text_shadow_color_tablet'gg f58101363ef4feffc4d12cb67f119aafRr header_4_text_shadow_color_phoneR> 2c9393970a82f8923364d40ea9a69385) )O&header_4_text_shadow_color_last_editedP1)ys f0322321178098e71fd8e48c48d43efbO8 "%t7bc5c6ef57e253fb97b053d0c516efdeg${ 343fbeea9b50f62d42e2b4ae3fbb0c8b99 d6e0956edfa4575d456776e9bd99f306dᔮnT ed41427b83871797c7d5b0920e9e42b5W+r[ c3cbffb338b75ede7739b616870d35efESyCv e403c6227a819b99d3550a6850bf89e6\x dfa3cea88ef7b05ecd87113a6bb10f6ennߧ 783e35921d0f64b0e7c7e7e7ca228c31V@ 9019486a5ccc65eb539e6201afdeef17 i f116f8358ea1e3180ec8b0e1ddd880396~; 293e335728490373c67daebb4d4bf7feG b47911aee8a103f4e792ee3ae1906b1e(A 77eb235c0d457f08a3c5f5db2e1aa6aaz 0e6ca80f3afe394dec6860c9045ac2ed] 5642d2b1050ceec610989d5e725f0aabkK= 9b30b4f29dcd4e1b46c9940fe46420e7"u"^' 7551dea70c6ae6c57ecc6425ceb2b87dfT 820b681c79daa6db39e766c3651d4472ٝ&header_5_text_shadow_horizontal_length~`} 560b35c436efcab3402847d5d0a3d824Iv'$header_5_text_shadow_vertical_length%f dbf61a438b7b93133543d3c98bbb91c1-V4o"header_5_text_shadow_blur_strengthn 22ab251e6ef64c4e31bc694b30b16e74ed posts that we stored. * * @since 5.0.2 * * @return array[ WP_Post ] Posts that we hijacked earlier. */ public function get_hijacked_posts() { return $this->hijacked_posts; } /** * Sets the hijacked posts for later restoring. * * @since 5.0.2 * * @param array[WP_Post] $posts Which posts to be set as the one hijacked. * * @return void No return when setting hijacked posts. */ public function set_hijacked_posts( array $posts ) { $this->hijacked_posts = $posts; } /** * Prevents the Edit link to ever be displayed on any well designed theme. * Ideally this method is here to return an empty string for the Mock Page. * * @since 4.9.2 * * @param string $url Old URL for editing the post * @param string|int $post_id Post ID in question * * @return string Modify the link to return nothing for when we hijacked the page. */ public function filter_prevent_edit_link( $url, $post_id ) { $query = tribe_get_global_query_object(); if ( ! $query instanceof WP_Query ) { return $url; } // Bail in case of any other page template. if ( ! $this->should_hijack_page_template( $query ) ) { return $url; } $mock_page = $this->get_mocked_page(); // If passed ID is not the Mock page one bail. if ( (int) $post_id !== (int) $mock_page->ID ) { return $url; } // Return empty edit link. return ''; } /** * Inject a Ghost Post into `the_post` * * @since 4.9.2 * * @return void Action hook with no return. */ public function hijack_the_post() { remove_filter( 'the_post', [ $this, 'hijack_the_post' ], 25 ); $GLOBALS['post'] = $this->get_mocked_page(); } /** * Depending on params from Default templating for events we will Hijack the main query for events to mimic a * ghost page element so the theme can properly run `the_content` so we can hijack the content of that page as * well as `the_title`. * * @since 4.9.2 * * @return boolean Whether we hijacked the main query or not. */ public function maybe_hijack_main_query() { $wp_query = tribe_get_global_query_object(); if ( ! $wp_query instanceof WP_Query ) { return false; } if ( ! $this->should_hijack_page_template( $wp_query ) ) { return false; } // Store old posts. $this->set_hijacked_posts( $wp_query->posts ); $mocked_post = $this->get_mocked_page(); // Replace the Mocked post in a couple of places. $GLOBALS['post'] = $mocked_post; $wp_query->posts = [ $mocked_post ]; $wp_query->post_count = count( $wp_query->posts ); // re-do counting. $wp_query->rewind_posts(); $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'] = $wp_query; add_action( 'loop_start', [ $this, 'hijack_on_loop_start' ], 1000 ); return true; } /** * Restored the Hijacked posts from the main query so that we can run * the template method properly with a fully populated WP_Query object. * * @global WP_Query $wp_query Global WP query we are dealing with. * * @since 4.9.2 * * @return void Action hook with no return. */ public function restore_main_query() { // If the query doesnt have hijacked posts. if ( ! $this->has_hijacked_posts() ) { return; } $wp_query = tribe_get_global_query_object(); if ( ! $wp_query instanceof WP_Query ) { return; } $wp_query->posts = $this->get_hijacked_posts(); $wp_query->post_count = count( $wp_query->posts ); // If we have other posts besides the spoof, rewind and reset. if ( $wp_query->post_count > 0 ) { $wp_query->post = reset( $wp_query->posts ); $wp_query->rewind_posts(); wp_reset_postdata(); } // If there are no other posts, unset the $post property. elseif ( 0 === $wp_query->post_count ) { $wp_query->current_post = -1; $wp_query->post = null; } $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'] = $wp_query; } /** * Prevents Looping multiple pages when including Page templates by modifying the global WP_Query object by * pretending there are no posts to loop * * @since 4.9.2 * * @return void Action hook with no return. */ protected function prevent_page_looping() { $wp_query = tribe_get_global_query_object(); if ( ! $wp_query instanceof WP_Query ) { return; } $wp_query->current_post = -1; $wp_query->post_count = 0; $GLOBALS['wp_query'] = $GLOBALS['wp_the_query'] = $wp_query; } /** * Include our own Page template into `the_content` of their Page template * * @todo Integrate with Template + Context classes * * @since 4.9.2 * @since 5.11.0 Now running do_shortcode() on content returned, since we are inserting our output in lieu of the_content results. * @since 6.15.12 Added filter for adding the main landmark wrapper around the TEC view output. * * @param string $content Default content of the page we hijacked * * @return string HTML for the view when using Page Template. */ public function filter_hijack_page_content( $content = '' ) { remove_filter( 'the_content', [ $this, 'filter_hijack_page_content' ], 25 ); $this->restore_main_query(); $html = tribe( Template_Bootstrap::class )->get_view_html(); $this->prevent_page_looping(); return do_shortcode( $html ); } /** * When using Page template we need to specifically hijack the WordPress templating * system at a specific point after `loop_start`. * * @since 4.9.2 * * @param WP_Query $query WordPress query executed to get here. * * @return boolean Should we hijack to use page template. */ public function should_hijack_page_template( WP_Query $query ) { $should_hijack = true; if ( ! $query instanceof WP_Query ) { $should_hijack = false; } else { // don't hijack a feed. if ( is_feed() ) { $should_hijack = false; } // don't hijack a password protected page. if ( is_single() && post_password_required() ) { $should_hijack = false; } // Don't hijack event based. if ( 'event' === tribe( Template_Bootstrap::class )->get_template_setting() ) { $should_hijack = false; } // We don't want the main Query. if ( ! $query->is_main_query() ) { $should_hijack = false; } // We wont hijack in case we are not dealing with a Post Type query. if ( empty( $query->tribe_is_event_query ) ) { $should_hijack = false; } } /** * Allows third-party to influence when we will hijack the page template. * * @since 4.9.2 * * @param boolean $should_hijack Will we hijack and include our page template. * @param WP_Query $query WordPress query executed to get here. */ return apply_filters( 'tribe_events_views_v2_should_hijack_page_template', $should_hijack, $query ); } /** * Object to allow the Bootstrap to manipulate page Requests and avoid 404s when * no events are available by default. * * @since 4.9.2 * * @return object A Mocked stdClass that mimics a WP_Post. */ protected function get_mocked_page() { $date_string = Dates::build_date_object( 'today' )->format( Dates::DBDATETIMEFORMAT ); $page = [ 'ID' => 0, 'post_status' => 'publish', 'post_author' => 0, 'post_parent' => 0, 'post_type' => 'page', 'post_date' => $date_string, 'post_date_gmt' => $date_string, 'post_modified' => $date_string, 'post_modified_gmt' => $date_string, 'post_content' => '', 'post_title' => '', 'post_excerpt' => '', 'post_content_filtered' => '', 'post_mime_type' => '', 'post_password' => '', 'post_name' => '', 'guid' => '', 'menu_order' => 0, 'pinged' => '', 'to_ping' => '', 'ping_status' => '', 'comment_status' => 'closed', 'comment_count' => 0, ]; return (object) $page; } }