bulk_header example

add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_theme' ), 10, 4 );

        $this->skin->header();

        // Connect to the filesystem first.         $res = $this->fs_connect( array( WP_CONTENT_DIR ) );
        if ( ! $res ) {
            $this->skin->footer();
            return false;
        }

        $this->skin->bulk_header();

        /* * Only start maintenance mode if: * - running Multisite and there are one or more themes specified, OR * - a theme with an update available is currently in use. * @todo For multisite, maintenance mode should only kick in for individual sites if at all possible. */
        $maintenance = ( is_multisite() && ! empty( $themes ) );
        foreach ( $themes as $theme ) {
            $maintenance = $maintenance || get_stylesheet() === $theme || get_template() === $theme;
        }
        
add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 );

        $this->skin->header();

        // Connect to the filesystem first.         $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) );
        if ( ! $res ) {
            $this->skin->footer();
            return false;
        }

        $this->skin->bulk_header();

        /* * Only start maintenance mode if: * - running Multisite and there are one or more plugins specified, OR * - a plugin with an update available is currently active. * @todo For multisite, maintenance mode should only kick in for individual sites if at all possible. */
        $maintenance = ( is_multisite() && ! empty( $plugins ) );
        foreach ( $plugins as $plugin ) {
            $maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin ] ) );
        }
        
Home | Imprint | This part of the site doesn't use cookies.