Stephane Boisvert
Forum Replies Created
-
Forum: Hacks
In reply to: get_user_meta($user_id); returns serialized values in second level arrayI guess I should also note that from my understanding, if we pass these values unserialized to apc and xcache they will come back unserialized. Of course Thinking about it, perhaps this falls under the purview of the role of the object caching plugins job?
Forum: Hacks
In reply to: get_user_meta($user_id); returns serialized values in second level arrayThank you to both for your comments. I guess what I am trying to say is why is it not already in an unserialized format by this point. I completely agree and have noticed that maybe_unserialize adds great amounts of overhead.
I guess what I am trying to say is shouldn’t wp_cache_get() return an already unserialized array so that the unserialization only happens once?Forum: Hacks
In reply to: get_user_meta($user_id); returns serialized values in second level arrayHi s_ha_dum,
Here is a shortened version of the array that shows the problem:
you’ll notice the key wp_1_capabilities
it is still serialized. Now if I were to call the function
get_metadata(‘user’,1,’wp_1_capabilities’)
instead of
get_metadata(‘user’,1)
I would get that value unserialized.I’m just wondering if I’m missing a logical reason for why this is the way it is or if it would be something that people would be open to changing the logic so that all the meta comes back unserialized all the time.
Forum: Plugins
In reply to: [W3 Total Cache] [Plugin: W3 Total Cache] Ye Olde 404 Problem Again….For us, (and your milage may vary) We had to switch from APC cache to disk cache for object caching to solve the problem. (even thought one would think this would have something to do with Disk caching).
Forum: Plugins
In reply to: [WP Minify] [Plugin: WP Minify] Force https not workingHi Kellogg, would it be possible to have this fix? Even though we use WordPress HTTPS, if you use pretty URL it still doesn’t work.
Forum: Plugins
In reply to: [W3 Total Cache] [Plugin: W3 Total Cache] Page Not found 404 after Few hoursAre you using APC object caching by any chance? we did and had this problem, we needed to disable it (switch to disk based object caching) for it to work
Just to add to this. I left the ass_digest_filter() function in place since its being used elsewhere in the code for other things.
Thanks!
I’ve not been able to find a donate button on the plugin page. Do you accept donations? if so, what is the best way to get it to you?-Steph
3.3.1
This is with WP in network mode. Happens on main site and subsites.Forum: Networking WordPress
In reply to: id and class in div tags in html view for non super adminit uses kses_remove_filters() to give admin and editors the permissions required. So its more the shotgun approach.
But good news, and for future people searching this, the way I solved it was to have a hook on init create a new list of custom_tags by defining CUSTOM_TAGS, you need to fully replicate all of $allowedposttags,$allowedtags and $allowedentitynames (start with the original list from wp-includes/kses.php ) you’ll see it only loads the built in list if CUSTOM_TAGS is not already defined. and add the parameters you want to the tags you want. You can also vary based on the user role there.Forum: Networking WordPress
In reply to: id and class in div tags in html view for non super adminThanks Ipstenu, I might modify this and enable it for my Administrators as the only people who are ever given admin roles are staff. Looking at the code this removes all of kses which is good for them, but if possible I would want to give every user role, the ability to use the id, class and style attributes.
I would suspect there is a hook for that, I thought it would be edit_allowedposttags but that either has changed or I’m just not getting it.Forum: Alpha/Beta/RC
In reply to: 3.3 Beta 3 Whitescreen?solved and unrelated to 3.3 🙂
Forum: Alpha/Beta/RC
In reply to: Screen Options in 3.3 Beta 2?add my vote to, “I had to google this because I thought it was gone and looked in the admin bar but not under help”
Forum: Plugins
In reply to: [W3 Total Cache] W3 Total Cache Switch Between Mobile Themes and Desktopwe have these functions in a file in the plugins folder of w3 total cache plugin.
what they do is make different versions of the page cache based on which browser comes to the site. (for us its IE and everyone else)
If you want to modify the code for it to do store different versions for mobile browsers only it shouldn’t be that hard. But I can’t offer more help than this.
/** * Makes different page cache keys based on user agent * */ function liberal_w3tc_pgcache_cache_key($key){ global $is_IE, $is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; liberal_w3_detect_browser(); $postfix = ""; if($is_winIE) { $postfix = "winIE"; } if($postfix) $key .= "_" . $postfix; return $key; } w3tc_add_action('w3tc_pgcache_cache_key', 'liberal_w3tc_pgcache_cache_key'); /** * Simple browser detection * This code is copied from wp-includes/vars.php because we need it for W3 total cache which is loaded before wp-includes/vars.php * * @see wp-includes/vars.php:37 */ function liberal_w3_detect_browser() { global $is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE; $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false; if ( isset($_SERVER['HTTP_USER_AGENT']) ) { if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false ) { $is_lynx = true; } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) { $is_chrome = true; } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false ) { $is_safari = true; } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false ) { $is_gecko = true; } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Win') !== false ) { $is_winIE = true; } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mac') !== false ) { $is_macIE = true; } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Opera') !== false ) { $is_opera = true; } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Nav') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla/4.') !== false ) { $is_NS4 = true; } } if ( $is_safari && stripos($_SERVER['HTTP_USER_AGENT'], 'mobile') !== false ) $is_iphone = true; $is_IE = ( $is_macIE || $is_winIE ); }in a file in mu-plugins