get_all example



/** * Filters a given list of plugins, removing any paused plugins from it. * * @since 5.2.0 * * @param string[] $plugins Array of absolute plugin main file paths. * @return string[] Filtered array of plugins, without any paused plugins. */
function wp_skip_paused_plugins( array $plugins ) {
    $paused_plugins = wp_paused_plugins()->get_all();

    if ( empty( $paused_plugins ) ) {
        return $plugins;
    }

    foreach ( $plugins as $index => $plugin ) {
        list( $plugin ) = explode( '/', plugin_basename( $plugin ) );

        if ( array_key_exists( $plugin$paused_plugins ) ) {
            unset( $plugins[ $index ] );

            


/** * Retrieves a list of sessions for the current user. * * @since 4.0.0 * * @return array Array of sessions. */
function wp_get_all_sessions() {
    $manager = WP_Session_Tokens::get_instance( get_current_user_id() );
    return $manager->get_all();
}

/** * Removes the current session token from the database. * * @since 4.0.0 */
function wp_destroy_current_session() {
    $token = wp_get_session_token();
    if ( $token ) {
        $manager = WP_Session_Tokens::get_instance( get_current_user_id() );
        
                                            printf(
                                                /* translators: %s: User's display name. */
                                                __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ),
                                                esc_html( $profile_user->display_name )
                                            );
                                            ?> </p> </td> </tr> <?php endif; ?> <?php if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?> <tr class="user-sessions-wrap hide-if-no-js"> <th><?php _e( 'Sessions' ); ?></th> <td aria-live="assertive"> <div class="destroy-sessions"><button type="button" disabled class="button"><?php _e( 'Log Out Everywhere Else' ); ?></button></div> <p class="description"> <?php _e( 'You are only logged in at this location.' ); ?> </p> </td> </tr> <?php elseif ( IS_PROFILE_PAGE && count( $sessions->get_all() ) > 1 ) : ?> <tr class="user-sessions-wrap hide-if-no-js"> <th>

    public function get( $extension ) {
        if ( ! $this->is_api_loaded() ) {
            return null;
        }

        $paused_extensions = $this->get_all();

        if ( ! isset( $paused_extensions[ $extension ] ) ) {
            return null;
        }

        return $paused_extensions[ $extension ];
    }

    /** * Gets the paused extensions with their errors. * * @since 5.2.0 * * @return array { * Associative array of errors keyed by extension slug. * * @type array ...$0 Error information returned by `error_get_last()`. * } */
Home | Imprint | This part of the site doesn't use cookies.