Changeset 10484
- Timestamp:
- 12/02/2020 06:20:32 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wp-themes.com/public_html/wp-content/mu-plugins/pub/disallow-db-writes.php
r10483 r10484 12 12 // Borrowed from HyperDB, only SELECT queries are considered non-write 13 13 if ( ! preg_match( '/^\s*(?:SELECT|SHOW|DESCRIBE|DESC|EXPLAIN)\s/i', $query ) ) { 14 if ( ! is_admin() || ! is_user_logged_in() ) { 14 if ( 15 ! is_admin() || 16 ! function_exists( 'is_user_logged_in' ) || 17 ! is_user_logged_in() 18 ) { 15 19 $query = ''; 16 20 } … … 22 26 // Disable update_option() directly. 23 27 add_filter( 'pre_update_option', function( $value, $option, $old_value ) { 24 if ( ! is_admin() || ! is_user_logged_in() ) { 28 if ( 29 ! is_admin() || 30 ! function_exists( 'is_user_logged_in' ) || 31 ! is_user_logged_in() 32 ) { 25 33 $value = $old_value; 26 34 }
Note: See TracChangeset
for help on using the changeset viewer.