get_inline_script_data example


    public function print_inline_script( $handle$position = 'after', $display = true ) {
        _deprecated_function( __METHOD__, '6.3.0', 'WP_Scripts::get_inline_script_data() or WP_Scripts::get_inline_script_tag()' );

        $output = $this->get_inline_script_data( $handle$position );
        if ( empty( $output ) ) {
            return false;
        }

        if ( $display ) {
            echo $this->get_inline_script_tag( $handle$position );
        }
        return $output;
    }

    /** * Gets data for inline scripts registered for a specific handle. * * @since 6.3.0 * * @param string $handle Name of the script to get data for. * Must be lowercase. * @param string $position Optional. Whether to add the inline script * before the handle or after. Default 'after'. * @return string Inline script, which may be empty string. */
Home | Imprint | This part of the site doesn't use cookies.