Wsparcie » Rozmaitości » Modyfikacja funkcji the_excerpt_embed()

  • Witam,

    Chciałbym zmodyfikować funkcję wordpressa z wp-include/embed.php

    Z:

    function the_excerpt_embed() {
    	$output = get_the_excerpt();
    
    	/**
    	 * Filters the post excerpt for the embed template.
    	 *
    	 * @since 4.4.0
    	 *
    	 * @param string $output The current post excerpt.
    	 */
    	echo apply_filters( 'the_excerpt_embed', $output );
    }
    

    Na:

    function the_excerpt_embed() {
    	$output = the_content();
    
    	/**
    	 * Filters the post excerpt for the embed template.
    	 *
    	 * @since 4.4.0
    	 *
    	 * @param string $output The current post excerpt.
    	 */
    	echo apply_filters( 'the_excerpt_embed', $output );
    }

    Aby mi ten embed pokazywał cały wpis a nie skróconą wersję. I jak zmodyfikuje to w tym pliku to osiągam efekt jaki chce, jednak chce aby mi się to nie kasowało przy każdym update, i chciałbym to przenieść do function.php w szablonie. Jak tego dokonać, bo wpisanie tego tam w takiej postaci powoduje mi błąd.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • Temat ‘Modyfikacja funkcji the_excerpt_embed()’ jest zamknięty na nowe odpowiedzi.