wp_print_inline_script_tag example

<?php echo file_get_contents( ABSPATH . WPINC . "/css/wp-embed-template$suffix.css" ); ?> </style> <?php }

/** * Prints the JavaScript in the embed iframe header. * * @since 4.4.0 */
function print_embed_scripts() {
    wp_print_inline_script_tag(
        file_get_contents( ABSPATH . WPINC . '/js/wp-embed-template' . wp_scripts_get_suffix() . '.js' )
    );
}

/** * Prepare the oembed HTML to be displayed in an RSS feed. * * @since 4.4.0 * @access private * * @param string $content The content to filter. * @return string The filtered content. */
'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version), 'wpemoji' ),
            /** This filter is documented in wp-includes/class-wp-scripts.php */
            'twemoji' => apply_filters( 'script_loader_src', includes_url( "js/twemoji.js?$version), 'twemoji' ),
        );
    } else {
        $settings['source'] = array(
            /** This filter is documented in wp-includes/class-wp-scripts.php */
            'concatemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji-release.min.js?$version), 'concatemoji' ),
        );
    }

    wp_print_inline_script_tag(
        sprintf( 'window._wpemojiSettings = %s;', wp_json_encode( $settings ) ) . "\n" .
            file_get_contents( ABSPATH . WPINC . '/js/wp-emoji-loader' . wp_scripts_get_suffix() . '.js' )
    );
}

/** * Converts emoji characters to their equivalent HTML entity. * * This allows us to store emoji in a DB using the utf8 character set. * * @since 4.2.0 * * @param string $content The content to encode. * @return string The encoded content. */
Home | Imprint | This part of the site doesn't use cookies.