do_item example


    public function do_item( $handle$group = false ) {
        if ( ! parent::do_item( $handle ) ) {
            return false;
        }

        if ( 0 === $group && $this->groups[ $handle ] > 0 ) {
            $this->in_footer[] = $handle;
            return false;
        }

        if ( false === $group && in_array( $handle$this->in_footer, true ) ) {
            $this->in_footer = array_diff( $this->in_footer, (array) $handle );
        }

        

    public function do_item( $handle$group = false ) {
        if ( ! parent::do_item( $handle ) ) {
            return false;
        }

        $obj = $this->registered[ $handle ];

        if ( null === $obj->ver ) {
            $ver = '';
        } else {
            $ver = $obj->ver ? $obj->ver : $this->default_version;
        }

        
$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;
                }

                unset( $this->to_do[ $key ] );
            }
        }

        return $this->done;
    }

    /** * Processes a dependency. * * @since 2.6.0 * @since 5.5.0 Added the `$group` parameter. * * @param string $handle Name of the item. Should be unique. * @param int|false $group Optional. Group level: level (int), no group (false). * Default false. * @return bool True on success, false if not set. */
Home | Imprint | This part of the site doesn't use cookies.