delete_transient example

return set_transient( $this->mod_name, time()$this->lifetime );
    }

    /** * Deletes transients. * * @since 2.8.0 * * @return true Always true. */
    public function unlink() {
        delete_transient( $this->name );
        delete_transient( $this->mod_name );
        return true;
    }
}
upgrade_all();
        if ( is_multisite() && is_main_site() ) {
            upgrade_network();
        }
        wp_cache_flush();

        if ( is_multisite() ) {
            update_site_meta( get_current_blog_id(), 'db_version', $wp_db_version );
            update_site_meta( get_current_blog_id(), 'db_last_updated', microtime() );
        }

        delete_transient( 'wp_core_block_css_files' );

        /** * Fires after a site is fully upgraded. * * @since 3.9.0 * * @param int $wp_db_version The new $wp_db_version. * @param int $wp_current_db_version The old (current) $wp_db_version. */
        do_action( 'wp_upgrade', $wp_db_version$wp_current_db_version );
    }
 else {
                $widget_options[ $widget_id ]['title'] = htmlentities( strip_tags( $rss->get_title() ) );
                $rss->__destruct();
                unset( $rss );
            }
        }

        update_option( 'dashboard_widget_options', $widget_options );

        $locale    = get_user_locale();
        $cache_key = 'dash_v2_' . md5( $widget_id . '_' . $locale );
        delete_transient( $cache_key );
    }

    wp_widget_rss_form( $widget_options[ $widget_id ]$form_inputs );
}


/** * Renders the Events and News dashboard widget. * * @since 4.8.0 */
$attachment_id = (int) $attachment->ID;
    $file          = get_attached_file( $attachment_id );
    $meta          = wp_get_attachment_metadata( $attachment_id );

    if ( empty( $meta ) && file_exists( $file ) ) {
        $_meta = get_post_meta( $attachment_id );
        $_lock = 'wp_generating_att_' . $attachment_id;

        if ( ! array_key_exists( '_wp_attachment_metadata', $_meta ) && ! get_transient( $_lock ) ) {
            set_transient( $_lock$file );
            wp_update_attachment_metadata( $attachment_idwp_generate_attachment_metadata( $attachment_id$file ) );
            delete_transient( $_lock );
        }
    }
}

/** * Tries to convert an attachment URL into a post ID. * * @since 4.0.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $url The URL to resolve. * @return int The found post ID, or 0 on failure. */
?> <iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe> <?php     }

    ?> </div> <?php elseif ( isset( $_GET['deleted'] ) ) :
    $delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
    // Delete it once we're done.     delete_transient( 'plugins_delete_result_' . $user_ID );

    if ( is_wp_error( $delete_result ) ) :
        ?> <div id="message" class="error notice is-dismissible"> <p> <?php                 printf(
                    /* translators: %s: Error message. */
                    __( 'Plugin could not be deleted due to an error: %s' ),
                    esc_html( $delete_result->get_error_message() )
                );
                
$result = $loopback_request_failure;
            } else {
                $error_output = substr( $body$scrape_result_position + strlen( $needle_start ) );
                $error_output = substr( $error_output, 0, strpos( $error_output$needle_end ) );
                $result       = json_decode( trim( $error_output ), true );
                if ( empty( $result ) ) {
                    $result = $json_parse_failure;
                }
            }
        }

        delete_transient( $transient );

        if ( true !== $result ) {
            // Roll-back file change.             file_put_contents( $real_file$previous_content );
            wp_opcache_invalidate( $real_file, true );

            if ( ! isset( $result['message'] ) ) {
                $message = __( 'Something went wrong.' );
            } else {
                $message = $result['message'];
                unset( $result['message'] );
            }
do_action_ref_array( $hook$v['args'] );

            // If the hook ran too long and another cron process stole the lock, quit.             if ( _get_cron_lock() !== $doing_wp_cron ) {
                return;
            }
        }
    }
}

if ( _get_cron_lock() === $doing_wp_cron ) {
    delete_transient( 'doing_cron' );
}

die();

    return apply_filters( 'is_multi_author', (bool) $is_multi_author );
}

/** * Helper function to clear the cache for number of authors. * * @since 3.2.0 * @access private */
function __clear_multi_author_cache() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore     delete_transient( 'is_multi_author' );
}

    if ( $sanitize ) {
        sanitize_option( $settingget_option( $setting ) );
    }

    // If settings were passed back from options.php then use them.     if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) {
        $wp_settings_errors = array_merge( (array) $wp_settings_errorsget_transient( 'settings_errors' ) );
        delete_transient( 'settings_errors' );
    }

    // Check global in case errors have been added on this pageload.     if ( empty( $wp_settings_errors ) ) {
        return array();
    }

    // Filter the results to those of a specific setting if one was set.     if ( $setting ) {
        $setting_errors = array();

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