Brayne
Forum Replies Created
-
Cheers!
Awesome, Thank you for you quick response! Perhaps checking for a fan, then storing the info for the session? Still testing so I don’t use it for every page load.
I found this on a blog that I thought I’d share as well. Thoughts?
$request = $_REQUEST["signed_request"]; list($encoded_sig, $load) = explode('.', $request, 2); $fbData = json_decode(base64_decode(strtr($load, '-_', '+/')), true); if (!empty($fbData["page"]["liked"])) { ?> You are a fan - insert html here <?php } else { ?> You are not a fan - insert html here <?php }sfc_is_fan() doesn’t seem to work with the latest version. Can you point me in the right direction to detect if a WP user is a Fan of a Page, not an App?
Thanks in advance!
Forum: Developing with WordPress
In reply to: WordPress limits on search? I have over 280k posts…Thanks for the reply @TheTux. Did you do an xml site map and have google index your site? I’m thinking that’s really the only way they can know what’s going on with the content… curious.
Forum: Developing with WordPress
In reply to: WordPress limits on search? I have over 280k posts…So I see that the forums here are showing well over 1 million posts. I’m assuming that the forums are using wordpress code but I see that the search function being used is from google. Is this the recommended search utility for wordpress?
Forum: Plugins
In reply to: Possible to extend WP_User_Query?See the code Gonçalo posted on the above link. perfect…resolved.
Forum: Networking WordPress
In reply to: Using User Search@gonçalo Thanks for the code.
Forum: Plugins
In reply to: [WP Geocode Filter] [Plugin: WP Geocode Filter] Not even close to my locationThe version that is saved in the plugin repository doesn’t work on 3.1 nor 3.2. The options don’t save and the short codes don’t read properly.
Forum: Plugins
In reply to: [WP Geocode Filter] Very Broken but nice ideaIncomplete plugin. Options don’t save.
Forum: Plugins
In reply to: theme_mods_ are overwriting my nav_menu_locationsI was saving theme options to theme_mods_mytheme and every time I would save, I would end up overwriting the Menu locations “nav_menu_locations”.
I just used a different option name for my theme options to avoid conflict.
Instead of
$settings = ‘theme_mods_’.get_current_theme();
I’m using
$settings = ‘theme_options_’.get_current_theme();
Nice tutorial on options here….
http://wpengineer.com/968/wordpress-working-with-options/
(not my site.)Forum: Hacks
In reply to: Problem with wp_insert_post for custom post type – category is not associated@wrk – word! Thanks for posting.
Forum: Hacks
In reply to: Need help with a hookDetective work complete.
My objective was to do a query_posts using meta_key and meta_value_num based on the most recent comment. So I’m storing a timestamp in the postmeta. Here is the code I can up with and it’s working great.
function recent_comment_timestamp() { global $comment_post_ID; $meta_key = 'recent_comment_timestamp'; $meta_value = time(); update_post_meta($comment_post_ID, $meta_key, $meta_value); } add_action( 'wp_insert_comment', 'recent_comment_timestamp' );Forum: Fixing WordPress
In reply to: wp_update_user is deleting user_meta ?Forum: Plugins
In reply to: Does wp_update_user delete user_meta?If any comes across this scenario, I’ve got the fix.
A user fills out a registration form and becomes the default role, mine is set at subscriber. After they’ve registered for the site and consequently become a subscriber, I am directing them to pay for a membership, (In My case using paypal). I’m updating their status to “Paid Member” in user_meta AND elevating their role to a custom role I’ve created called “Member”
You must set their role using set_role in the WP_User class. If you change their role via wp_update_user, you will lose any “CUSTOM” user_meta information you may have collected in a CUSTOM registration form.
I needed to update this new user’s role so I used the following…
$new_role = ‘Whatever’;
$user = new WP_User($user_id);
$user->set_role($new_role);This updated my newly paid Member’s role without disturbing any of my CUSTOM user_meta information I have collected.
Forum: Fixing WordPress
In reply to: wp_update_user is deleting user_meta ?I’m moving this to hacks as it’s not really a trouble shooting question.