Changeset 10483
- Timestamp:
- 12/02/2020 06:08:20 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
r10482 r10483 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 ( ! is_admin() || ! is_user_logged_in() ) { 15 15 $query = ''; 16 16 } … … 22 22 // Disable update_option() directly. 23 23 add_filter( 'pre_update_option', function( $value, $option, $old_value ) { 24 if ( ! is_ user_logged_in() && ! is_admin() ) {24 if ( ! is_admin() || ! is_user_logged_in() ) { 25 25 $value = $old_value; 26 26 }
Note: See TracChangeset
for help on using the changeset viewer.