Change localization only for plugin

Use plugin_locale filter: apply_filters( ‘plugin_locale’, $locale, $domain ); Change locale like this: $my_plugin_domain = ‘my_plugin_domain_name’; $override_locale=”es-ES”; add_filter(‘plugin_locale’, function ($locale, $domain) use ($my_plugin_domain, $override_locale) { if($domain == $my_plugin_domain) { $locale = $override_locale; } return $locale; }, 10, 2);

INCOMING: Wall of code for form and $_POST, not updating custom field’s value

Turns out the second form needs its own nonce and updated the code in the header of the page to do something if only the second form is submitted. See new code: <?php $lucs_stored_meta = get_post_meta($post->ID); // salt shaker, drawing straws, randomness function lucs_random_thumbnail() { $lucs_random_image = rand(0,1); if ($lucs_random_image == 0) { $lucs_thumb_ra = … Read more

Need to change buddypress profile url by add_rewrite_rule

It’s a little tricky with Buddypress. They are not using the WordPress way for rewrites. (https://buddypress.org/support/topic/custom-permalink-and-rewrite-rules-for-buddypress/) They are processing the url in their own module. If you have members as the Buddypress members page slug and the rest of the url is not a Buddypress module it will redirect you to 404. There is a … Read more