function restore_content_filters() { foreach ( $this->content_removed_filters as $filter ) { add_filter( 'the_content', $filter ); } $this->content_removed_filters = []; } /** * Process More Tag * * Respect the native WP () tag * * @access private * @since 2.0.4 * * @param $content * * @return string */ private function process_more_tag( $content ) { $post = get_post(); $content = str_replace( '<!--more-->', '', $content ); $parts = get_extended( $content ); if ( empty( $parts['extended'] ) ) { return $content; } if ( is_singular() ) { return $parts['main'] . '
' . $parts['extended']; } if ( empty( $parts['more_text'] ) ) { $parts['more_text'] = esc_html__( '(more…)', 'elementor' ); } $more_link_text = sprintf( '%2$s', sprintf( /* translators: %s: Current post name. */ __( 'Continue reading %s', 'elementor' ), the_title_attribute( [ 'echo' => false, ] ) ), $parts['more_text'] ); $more_link = sprintf( ' %s', get_permalink(), $post->ID, $more_link_text ); /** * The content "more" link. * * Filters the "more" link displayed after the content. * * This hook can be used either to change the link syntax or to change the * text inside the link. * * @since 2.0.4 * * @param string $more_link The more link. * @param string $more_link_text The text inside the more link. */ $more_link = apply_filters( 'the_content_more_link', $more_link, $more_link_text ); return force_balance_tags( $parts['main'] ) . $more_link; } private function is_optimized_css_mode() { $is_optimized_css_loading = Plugin::$instance->experiments->is_feature_active( 'e_optimized_css_loading' ); return ! Utils::is_script_debug() && $is_optimized_css_loading && ! Plugin::$instance->preview->is_preview_mode(); } }