do_items example

        $handles = false;
    }

    _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );

    if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
        if ( ! $handles ) {
            return array(); // No need to instantiate if nothing is there.         }
    }

    return wp_scripts()->do_items( $handles );
}

/** * Adds extra code to a registered script. * * Code will only be added if the script is already in the queue. * Accepts a string $data containing the Code. If two or more code blocks * are added to the same script $handle, they will be printed in the order * they were added, i.e. the latter added code can redeclare the previous. * * @since 4.5.0 * * @see WP_Scripts::add_inline_script() * * @param string $handle Name of the script to add the inline script to. * @param string $data String containing the JavaScript to be added. * @param string $position Optional. Whether to add the inline script before the handle * or after. Default 'after'. * @return bool True on success, false on failure. */

    public function print_scripts( $handles = false, $group = false ) {
        return $this->do_items( $handles$group );
    }

    /** * Prints extra scripts of a registered script. * * @since 2.1.0 * @since 2.8.0 Added the `$display` parameter. * @deprecated 3.3.0 * * @see print_extra_script() * * @param string $handle The script's registered handle. * @param bool $display Optional. Whether to print the extra script * instead of just returning it. Default true. * @return bool|string|void Void if no data exists, extra scripts if `$display` is true, * true otherwise. */

    public function do_footer_items() {
        $this->do_items( false, 1 );
        return $this->done;
    }

    /** * Resets class properties. * * @since 3.3.0 */
    public function reset() {
        $this->do_concat      = false;
        $this->concat         = '';
        
do_action( 'wp_print_styles' );
    }

    _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );

    if ( ! ( $wp_styles instanceof WP_Styles ) ) {
        if ( ! $handles ) {
            return array(); // No need to instantiate if nothing is there.         }
    }

    return wp_styles()->do_items( $handles );
}

/** * Adds extra CSS styles to a registered stylesheet. * * Styles will only be added if the stylesheet is already in the queue. * Accepts a string $data containing the CSS. If two or more CSS code blocks * are added to the same stylesheet $handle, they will be printed in the order * they were added, i.e. the latter added styles can redeclare the previous. * * @see WP_Styles::add_inline_style() * * @since 3.3.0 * * @param string $handle Name of the stylesheet to add the extra styles to. * @param string $data String containing the CSS styles to be added. * @return bool True on success, false on failure. */

function print_admin_styles() {
    global $concatenate_scripts;

    $wp_styles = wp_styles();

    script_concat_settings();
    $wp_styles->do_concat = $concatenate_scripts;
    $wp_styles->do_items( false );

    /** * Filters whether to print the admin styles. * * @since 2.8.0 * * @param bool $print Whether to print the admin styles. Default true. */
    if ( apply_filters( 'print_admin_styles', true ) ) {
        _print_styles();
    }

    
Home | Imprint | This part of the site doesn't use cookies.