Rewrite permalink with PHP processing

Based on your example there are 4 fundamental steps to take. I’ve tried to use examples below, and they may not work as is, but they demonstrate the fundamental principles needed: 1. Add a query var shorty This whitelists shorty and gives the 2c from /shorty/2c somewhere to be stored function shorty_query_vars( array $qvars ) … Read more

Block a specific url request

Like you suggested, use WP_HTTP_BLOCK_EXTERNAL to stop all external URL requests. And then use WP_ACCESSIBLE_HOSTS to set allowed URLs. From the WP Codex, found on this page. wp-config.php define( ‘WP_HTTP_BLOCK_EXTERNAL’, true ); define( ‘WP_ACCESSIBLE_HOSTS’, ‘api.wordpress.org,*.github.com’ ); Block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL as true and this will only allow localhost and your blog to … Read more

How do you disable the verification process of user email changes?

As mentioned in the ticket #16470 this confirmation feature: prevents accidental or erroneous email address changes from potentially locking users out of their account. so it’s good to keep that in mind before removing this feature. Here’s a little proof of concept for (single site) test installs. We still want to run send_confirmation_on_profile_email() because it … Read more

What is the first action or filter executed by wordpress?

Here is nicely described what and when is loading and why. I recommend also this awesome plugin Query Monitor that helped me also to fix performance issues. in short: muplugins_loaded registered_taxonomy registered_post_type plugins_loaded sanitize_comment_cookies setup_theme unload_textdomain load_textdomain after_setup_theme auth_cookie_malformed auth_cookie_valid set_current_user init widgets_init register_sidebar wp_register_sidebar_widget wp_loaded parse_request send_headers parse_tax_query parse_query pre_get_posts posts_selection wp template_redirect wp_default_scripts … Read more

Custom search by several options send on form not works

put value of keys and check results.(use get_users function to query users) $args=array( ‘relation’=>’AND’ ); if(isset($_GET[“nome_of_city”])){ $arg[]=array( ‘key’ => ‘your_key_name_1’, ‘value’ => $_GET[“nome_of_city”] ); } if(isset($_GET[‘name_of_neighborhood’])){ $arg[]=array( ‘key’ => ‘your_key_name_2’, ‘value’=>$_GET[‘name_of_neighborhood’], ‘compare’=>’IN’ ); } if(isset($_GET[‘name_of_course’])){ $arg[]=array( ‘key’ => ‘your_key_name_3’, ‘value’=> $_GET[‘name_of_course’], ‘compare’=>’IN’ ); } $users=get_users($args); foreach ($users as $user) { echo ‘<li>’ . $user->user_email . … Read more

Test for post type in request filter?

$request[‘post_type’] should contain the requested post type for any custom type. The default post type will have a name, but no post_type. Pages will have pagename and no post_type. EDIT- determining custom post type based on taxonomy set in request: function cpt_request_filters( $request ){ if( ! is_admin() ){ global $wp_taxonomies; foreach( $request as $tax_key => … Read more