| @@ 64-83 (lines=20) @@ | ||
| 61 | } |
|
| 62 | ||
| 63 | ||
| 64 | function lasso_editor_get_option( $option, $section, $default = '' ) { |
|
| 65 | ||
| 66 | if ( empty( $option ) ) |
|
| 67 | return; |
|
| 68 | ||
| 69 | if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
|
| 70 | ||
| 71 | $options = get_site_option( $section ); |
|
| 72 | ||
| 73 | } else { |
|
| 74 | ||
| 75 | $options = get_option( $section ); |
|
| 76 | } |
|
| 77 | ||
| 78 | if ( isset( $options[$option] ) ) { |
|
| 79 | return $options[$option]; |
|
| 80 | } |
|
| 81 | ||
| 82 | return $default; |
|
| 83 | } |
|
| 84 | ||
| 85 | register_meta('user', 'lasso_hide_tour', array( |
|
| 86 | "type" => "string", |
|
| @@ 16-37 (lines=22) @@ | ||
| 13 | * @since 1.0 |
|
| 14 | */ |
|
| 15 | if( !function_exists('lasso_editor_get_option')): |
|
| 16 | function lasso_editor_get_option( $option, $section, $default = '' ) { |
|
| 17 | ||
| 18 | if ( empty( $option ) ) |
|
| 19 | return; |
|
| 20 | ||
| 21 | if ( function_exists( 'is_multisite' ) && is_multisite() ) { |
|
| 22 | ||
| 23 | $options = get_site_option( $section ); |
|
| 24 | ||
| 25 | } else { |
|
| 26 | ||
| 27 | $options = get_option( $section ); |
|
| 28 | } |
|
| 29 | ||
| 30 | $options = apply_filters( 'editus_filter_options', $options ); |
|
| 31 | ||
| 32 | if ( isset( $options[$option] ) ) { |
|
| 33 | return $options[$option]; |
|
| 34 | } |
|
| 35 | ||
| 36 | return $default; |
|
| 37 | } |
|
| 38 | endif; |
|
| 39 | ||
| 40 | /** |
|