laiconsulting
Forum Replies Created
-
I’d love to have this feature too
Forum: Fixing WordPress
In reply to: Replace WordPress logo in top left of full screen block editorI did this
add_action('admin_head', 'remove_wplogo'); function remove_wplogo() { .edit-post-fullscreen-mode-close.has-icon { display: none !important; } }
but it doesn’t seem to work.
Am I doing something wrong?- This reply was modified 4 years, 10 months ago by laiconsulting.
Forum: Plugins
In reply to: [Geolocation IP Detection] Unified configuration in multisite setupPerhaps meanwhile I can wrap the API calls with switch_to_blog() & restore_current_blog()
Forum: Plugins
In reply to: [Geolocation IP Detection] Unified configuration in multisite setup@benjamin4
Thanks for your response.I can only speak for experience from another plugin. I am also using white label plugin with exact same requirement. For that plugin, they wrapped get_option in their own function, then within their plugin, they just call their get_option function. For me to add this inheriting behavior, I just had to change 1 line, then things worked the way I’d like them to.
function white_label_get_option( $option, $section, $default = '' ) { $options = get_blog_option( get_main_site_id(), $section ); if ( isset( $options[ $option ] ) ) { return $options[ $option ]; } return $default; }
I am willing to believe get_blog_option(get_current_blog_id(), ) would behave the same as get_option( )
@morganhvidt
Thanks for writing the plugin so well.
Global setting can be achieved by modifying the get_option line in the definition of white_label_get_option.function white_label_get_option( $option, $section, $default = '' ) { $options = get_blog_option( get_main_site_id(), $section ); if ( isset( $options[ $option ] ) ) { return $options[ $option ]; } return $default; }
Is there a way to have a setting that is inherited by every subsite in the network setup?
Forum: Plugins
In reply to: [HyperDB] is hyperdb compatible with W3 Total Cache?From personal experience, yes. They work together. However, the pro version of W3TC has its own DB sharding code that’s pretty much forked from HyperDB. So you are guaranteed a way to have HyperDB functionality if not directly from HyperDB.
Forum: Plugins
In reply to: [W3 Total Cache] Subsites not accesibleHi Marko,
thanks for the suggestion.
Unfortunately, removing the blogs.php didn’t help.
Do you have another suggestion?Forum: Plugins
In reply to: [W3 Total Cache] Subsites not accesibleCould you elaborate a bit. What file should I delete?
Will it be regenerated afterwards?Forum: Plugins
In reply to: [W3 Total Cache] Subsites not accesibleHi Marko,
I am still getting this error in Util_Environment every couple seconds.
Could you give a hint on how to debug it?[11-Mar-2020 11:06:12 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/wordpress/wp-content/plugins/w3-total-cache/Util_Environment.php on line 187 [11-Mar-2020 11:06:15 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/wordpress/wp-content/plugins/w3-total-cache/Util_Environment.php on line 187 [11-Mar-2020 11:06:22 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/wordpress/wp-content/plugins/w3-total-cache/Util_Environment.php on line 187 [11-Mar-2020 11:06:25 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/wordpress/wp-content/plugins/w3-total-cache/Util_Environment.php on line 187 [11-Mar-2020 11:06:32 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/wordpress/wp-content/plugins/w3-total-cache/Util_Environment.php on line 187 [11-Mar-2020 11:06:35 UTC] PHP Notice: Trying to access array offset on value of type null in /var/www/wordpress/wp-content/plugins/w3-total-cache/Util_Environment.php on line 187
Forum: Plugins
In reply to: [W3 Total Cache] Subsites not accesibleI found the root cause. The problem comes from hyperDB, which is not directly w3tc related, but w3tc should shall take cautious since w3tc’s cluster db borrows code from db.php of hyperDB.
My DB is MySQL5.7
The default WP charset is utf8mb4. DB_COLLATE is empty as per default wp-config.
In db.php of hyperdb, if the collate isn’t set, it defaults to utf8mb4-general-ui, which isn’t available in the utf8mb4 charset of my database, hence table creations errored out, and all the bad consequences following it.The solution in my case was to specify utf8mb4-unicode-ui in wp-config
define( ‘DB_COLLATE’, ‘utf8mb4_unicode_ci’ );I hope this problem won’t come back to me if I upgrade to MySQL8
Forum: Plugins
In reply to: [W3 Total Cache] Subsites not accesibleHello Marko,
thanks for the reply.
Before I try your suggestion, I made the observation that none of the subsite tables wp_x_blah where successfully created, wp_site also isn’t showing any subsites. Perhaps this is not a W3TC issue.
What’s your opinion?
What could be the root cause from your experience?- This reply was modified 4 years, 11 months ago by laiconsulting.