Hot answers tagged

1

If you create them programmatically, you could set it up so that all of the usernames are one type of email address (business or personal) and the WP email address field contains the other type. It's not clear if this would fit your particular use case, but one other login possibility is to integrate single sign-on. That way they could log in with their ...


1

try this code. Paste in to function.php add_action('admin_menu', 'custom_page'); function custom_page() { add_submenu_page( 'woocommerce', 'Name of page', 'Name of item', 'manage_options', 'custom-slug', 'custom_page_content' ); } function custom_page_content() { echo 'Page content'; }


1

You get the exact unchanged value with: $event_id = filter_input( INPUT_GET, 'event_post_id', FILTER_VALIDATE_INT ); Here I added the validation filter directly, but you can even move that to separate code for more complex cases. WordPress’ query variable handling is for cases in which you want to allow changes to the values before they reach your code. &...


1

The pre_option_{$option} hook is used to filter the value of the option before it's retrieved. You need to hook after the value is retrieved so you can manipulate it. In this case, you can use the option_{$option} hook. So your code will look like this: add_filter('option_percify_api_key', array( __CLASS__, 'decrypt_api_key') ); For more info - take a look ...


Only top voted, non community-wiki answers of a minimum length are eligible