PluginProbe ʕ •ᴥ•ʔ
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets / 4.1.3
Widget Options – Advanced Conditional Visibility for Gutenberg Blocks & Classic Widgets v4.1.3
4.2.5 4.2.4 trunk 3.7.10 3.7.11 3.7.12 3.7.13 3.7.14 3.7.2 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8 3.8.1 3.8.10 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 3.8.9 3.8.9.1 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.5.1 4.0.6 4.0.6.1 4.0.7 4.0.8 4.0.9 4.1.0 4.1.1 4.1.2 4.1.3 4.2.0 4.2.1 4.2.2 4.2.3
widget-options / includes / transient.php
widget-options / includes Last commit date
admin 8 months ago pagebuilders 8 months ago widgets 8 months ago ajax-functions.php 8 months ago extras.php 8 months ago install.php 2 years ago scripts.php 8 months ago transient.php 2 years ago
transient.php
50 lines
1 <?php
2 /**
3 * Shortcodes Handler
4 *
5 * @copyright Copyright (c) 2016, Jeffrey Carandang
6 * @since 4.0
7 */
8
9 // Exit if accessed directly
10 if ( ! defined( 'ABSPATH' ) ) exit;
11
12 //remove widgetopts_pages transient when new page created
13 if( !function_exists( 'widgetopts_delete_transient_pages' ) ){
14 add_action( 'transition_post_status', 'widgetopts_delete_transient_pages', 10, 3 );
15 function widgetopts_delete_transient_pages( $new_status, $old_status, $post ){
16 global $widgetopts_types;
17
18 if ( 'page' == $post->post_type ){
19 delete_option( 'widgetopts_global_all_pages' );
20 }
21
22 if( 'publish' == $new_status && 'publish' != $old_status ){
23 if( is_array( $widgetopts_types ) && !empty( $widgetopts_types ) && !in_array( $post->post_type, $widgetopts_types ) ){
24 delete_option( 'widgetopts_global_types' );
25 }
26 }
27 }
28 }
29
30 //remove widgetopts_categories transient when new category created
31 if( !function_exists( 'widgetopts_delete_transient_terms' ) ){
32 add_action( 'create_term', 'widgetopts_delete_transient_terms', 10, 3 );
33 add_action( 'edit_term', 'widgetopts_delete_transient_terms', 10, 3 );
34 add_action( 'delete_term', 'widgetopts_delete_transient_terms', 10, 3 );
35 function widgetopts_delete_transient_terms( $term_id, $tt_id, $taxonomy ){
36 global $widgetopts_taxonomies;
37
38 delete_transient( 'widgetopts_taxonomy_' . $taxonomy );
39
40 if( is_array( $widgetopts_taxonomies ) && !empty( $widgetopts_taxonomies ) && !in_array( $taxonomy, $widgetopts_taxonomies ) ){
41 delete_option( 'widgetopts_global_taxonomies' );
42 }
43
44 if( $taxonomy == 'category' ){
45 delete_option( 'widgetopts_global_categories' );
46 }
47 }
48 }
49 ?>
50