step example

$this->pending[$idx] = $promise->then(
            function D$value) use ($idx$key): void {
                if ($this->onFulfilled) {
                    call_user_func(
                        $this->onFulfilled,
                        $value,
                        $key,
                        $this->aggregate
                    );
                }
                $this->step($idx);
            },
            function D$reason) use ($idx$key): void {
                if ($this->onRejected) {
                    call_user_func(
                        $this->onRejected,
                        $reason,
                        $key,
                        $this->aggregate
                    );
                }
                $this->step($idx);
            }


        return $step;
    }

    /** * Sets up the enqueue for the JavaScript files. * * @since 2.1.0 */
    public function js_includes() {
        $step = $this->step();

        if ( ( 1 === $step || 3 === $step ) ) {
            wp_enqueue_media();
            wp_enqueue_script( 'custom-header' );
            if ( current_theme_supports( 'custom-header', 'header-text' ) ) {
                wp_enqueue_script( 'wp-color-picker' );
            }
        } elseif ( 2 === $step ) {
            wp_enqueue_script( 'imgareaselect' );
        }
    }

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