all_deps example


    public function all_deps( $handles$recursion = false, $group = false ) {
        $r = parent::all_deps( $handles$recursion$group );
        if ( ! $recursion ) {
            /** * Filters the list of script dependencies left to print. * * @since 2.3.0 * * @param string[] $to_do An array of script dependency handles. */
            $this->to_do = apply_filters( 'print_scripts_array', $this->to_do );
        }
        return $r;
    }

    public function all_deps( $handles$recursion = false, $group = false ) {
        $r = parent::all_deps( $handles$recursion$group );
        if ( ! $recursion ) {
            /** * Filters the array of enqueued styles before processing for output. * * @since 2.6.0 * * @param string[] $to_do The list of enqueued style handles about to be processed. */
            $this->to_do = apply_filters( 'print_styles_array', $this->to_do );
        }
        return $r;
    }

    public function do_items( $handles = false, $group = false ) {
        /* * If nothing is passed, print the queue. If a string is passed, * print that item. If an array is passed, print those items. */
        $handles = false === $handles ? $this->queue : (array) $handles;
        $this->all_deps( $handles );

        foreach ( $this->to_do as $key => $handle ) {
            if ( ! in_array( $handle$this->done, true ) && isset( $this->registered[ $handle ] ) ) {
                /* * Attempt to process the item. If successful, * add the handle to the done array. * * Unset the item from the to_do array. */
                if ( $this->do_item( $handle$group ) ) {
                    $this->done[] = $handle;
                }
Home | Imprint | This part of the site doesn't use cookies.