', \esc_attr( isset( $_REQUEST['event_type'] ) ? \sanitize_text_field( \wp_unslash( $_REQUEST['event_type'] ) ) : '' ) ); if ( in_array( $name, Transients_Helper::WP_CORE_TRANSIENTS ) ) { ?>

', '', '' ); } ?>
', \esc_attr( $next_run_date_local ), \esc_attr( $next_run_time_local ) ); ?>
O:8:"stdClass":100:{s:11:"commerce";...', 'a:2:{s:7:"version";s:3:"1.2";...', 'a:0:{}' ); ?>


', \esc_attr( isset( $_REQUEST['event_type'] ) ? \sanitize_text_field( \wp_unslash( $_REQUEST['event_type'] ) ) : '' ) ); ?>
', \esc_attr( $next_run_date_local ), \esc_attr( $next_run_time_local ) ); ?>

prepare_items(); ?>

' . \esc_html__( 'Add New Transient', '0-day-analytics' ) . ''; ?>

' . esc_html( $backend_label ) . '', '' . esc_html( number_format_i18n( $redis_count ) ) . '' ); ?>

' . esc_html( $backend_label ) . '' ); ?>

views(); ?>
', \esc_attr( $page ) ); printf( '', \esc_attr( $paged ) ); $transients->search_box( __( 'Search', '0-day-analytics' ), strtolower( $transients::get_table_name() ) . '-find' ); $transients->display(); ?>

' . \__( 'This screen allows you to see all the transients on your WordPress site.', '0-day-analytics' ) . '

'; $help_text .= '

' . \__( 'By default, transients stored in the database are displayed. If a Redis persistent object cache is active, transients stored in Redis are also included automatically.', '0-day-analytics' ) . '

'; $help_text .= '

' . \__( 'For other object cache backends (Memcached, APCu), only database-stored transients can be shown — a notice will inform you if some transients may be missing.', '0-day-analytics' ) . '

'; $help_text .= '

' . \__( 'You can specify how many transients to be shown, which columns to see or filter and search for given transient(s).', '0-day-analytics' ) . '

'; $help_text .= '

' . \__( 'You can delete or edit transients - keep in mind that you may end up editing transient that is no longer available (if the time passes).', '0-day-analytics' ) . '

'; $help_text .= '

' . \__( 'Bulk operations are supported and you can even add new transient directly from here.', '0-day-analytics' ) . '

'; return $help_text; } /** * Collects all the data from the form and updates the transient. * * @return void * * @since 1.8.5 */ public static function update_transient() { // Capability guard to ensure only authorized users can update transients. if ( ! \current_user_can( 'manage_options' ) ) { \wp_die( \esc_html__( 'You do not have permission to update transients.', '0-day-analytics' ) ); } // Bail if malformed Transient request. if ( empty( $_REQUEST['transient'] ) ) { return; } // Bail if nonce fails. if ( empty( $_REQUEST['_wpnonce'] ) || ! WP_Helper::verify_admin_nonce( Transients_List::NONCE_NAME ) ) { return; } // Sanitize transient. $transient = \sanitize_key( $_REQUEST['transient'] ); // Site wide. $site_wide = ! empty( $_REQUEST['name'] ) && Transients_Helper::is_site_wide( \sanitize_text_field( \wp_unslash( $_REQUEST['name'] ) ) ); Transients_Helper::update_transient( $transient, $site_wide ); \wp_safe_redirect( \remove_query_arg( array( 'deleted' ), \add_query_arg( array( 'page' => Transients_List::TRANSIENTS_MENU_SLUG, Transients_List::SEARCH_INPUT => Transients_List::escaped_search_input(), 'updated' => true, 'event_type' => ( isset( $_REQUEST['event_type'] ) ? \sanitize_text_field( \wp_unslash( $_REQUEST['event_type'] ) ) : '' ), ), \admin_url( 'admin.php' ) ) ) ); exit; } /** * Collects all the data from the form and creates new transient. * * @return void * * @since 1.9.2 */ public static function new_transient() { // Capability guard to ensure only authorized users can create transients. if ( ! \current_user_can( 'manage_options' ) ) { \wp_die( \esc_html__( 'You do not have permission to create transients.', '0-day-analytics' ) ); } // Bail if nonce fails. if ( empty( $_REQUEST['_wpnonce'] ) || ! WP_Helper::verify_admin_nonce( Transients_List::NONCE_NAME ) ) { return; } // Sanitize transient. $transient = ( isset( $_REQUEST['name'] ) ) ? \sanitize_key( $_REQUEST['name'] ) : null; // Site wide. $site_wide = ! empty( $_REQUEST['side-wide'] ) ? filter_var( \wp_unslash( $_REQUEST['side-wide'] ), FILTER_VALIDATE_BOOLEAN ) : false; Transients_Helper::create_transient( $transient, $site_wide ); \wp_safe_redirect( \remove_query_arg( array( 'deleted' ), \add_query_arg( array( 'page' => Transients_List::TRANSIENTS_MENU_SLUG, Transients_List::SEARCH_INPUT => Transients_List::escaped_search_input(), 'updated' => true, ), \admin_url( 'admin.php' ) ) ) ); exit; } /** * Removes unnecessary arguments if present and reloads. * * @return void * * @since 2.3.0 */ public static function page_load() { if ( ! empty( $_GET['_wp_http_referer'] ) ) { $redirect_url = ''; if ( isset( $_SERVER['REQUEST_URI'] ) ) { $redirect_url = \remove_query_arg( array( '_wp_http_referer', 'bulk_action' ), \wp_unslash( $_SERVER['REQUEST_URI'] ) ); } if ( ! empty( $redirect_url ) ) { \wp_safe_redirect( $redirect_url ); exit; } } } } }