You’re overcomplicating it a bit. ?um_action=edit
is a query string, and its values are available in the $_GET
superglobal. To check if it exists, and has a specific value, you just need to do this:
function leweb_add_body_class_um_edit_profile( $classes ) {
if ( isset( $_GET['um_action'] ) && 'edit' === $_GET['um_action'] ) {
$classes[] = 'leweb-um-profile-edit';
}
return $classes;
}
add_filter( 'body_class','leweb_add_body_class_um_edit_profile' );
Related Posts:
- wp_remote_get() and javascript/noscript situation
- Order & Orderby Parameters
- Post title as link parameter
- How to change window ratio in teachpress “tplist”
- Why “?v=hash” is added to my URLs? [closed]
- How to create a shortcode with 1 parameter (atts)
- Trying to use add_action and do_action with parameters
- use query string in URL to display content on the page
- Add post class to the TinyMCE iframe?
- Open WordPress ‘Add New Post’ admin page with parameters set via $_GET
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- Why does WordPress automatically redirect URLs with the parameter “name=” to a different page?
- Adding a body class with ACF
- get_the_title($postID) OR get_the_title()?
- CPT archive 404ing when using a custom taxonomy name as a variable
- Remove and add class with body_class() function
- Display posts from an author using search parameters (not author template/query_posts)
- Any way to use a custom Parameter for youtube embed without using an iframe?
- How to assign a class to a page with a custom template?
- Detecting $_GET parameters from any page + Cookie
- Making extra parameters optional
- Adding body class to login page?
- Why does rewrite rule work for page not for custom post type post?
- Add attribute to existing Shortcode
- oEmbed vimeo with add_query_arg parameters not inserted to HTML
- Any way to use a custom Parameter for vimeo embed without using an iframe?
- Add class to woocommerce checkout body based on filter [closed]
- Passing a parameter to a permalink
- Determine WP_Query parameters from URL
- Why isn’t is_page_template() adding a body class?
- How do I know what variables are passed in a filter/action and what their meaning is?
- Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?
- body_class filter – Is there a better way to write this code?
- Wp Login redirect strips parameters from url
- I am adding a new class to my body tag if the logged in user is subscriber, need help
- append url parameters to all links
- WordPress ajax function parameter value not being passed
- REST API parameters not working with nginx
- Load custom template for specific GET parameter
- Returning a value from a PHP page
- How to get variables from fucntion.php to my plugin files
- Create URL with parameter for JQuery toggle status
- De-bloating the page classes
- How do I pass arguments for multiple functions hooked to a single action?
- category hierarchy level as a body class – parent cat =1, child cat=2, grandchild=3
- Add category to body class
- WordPress php filter admin_body_class not working
- Query string parameters from custom fields, inconsistent results
- wp_parse_args & category parameter
- Add custom parameter to REST API request of a custom post type?
- How to Use Parameters with a Do_Action Function Within PHP Tags
- Changing WP_Query params with url Query Var
- Handling Body class based on Template
- Pass GET params to URL from a main menu item
- Get URL Param Plugin and Inserting Result in Widget Code
- Dynamically change page title from URL param
- create a page which displays a list of categories title+ short description?
- How to add parameter to wp_enqueue_script?
- Pass additional parameter in the URL
- Using several add_action with parameters inside a class
- How do I retain url parameters the entire time a user browses my site?
- Remove Body Classes
- How to add seperate classes to no-search-result and found-search-result pages on wordrpess search – is_search()
- Get value from shortcode to do something
- Rewrite custom post type URL parameters
- Adding parameters to password reset key
- 404 error when passing “cat” parameter to URL
- Assign category to new post via URL
- Is there a link parameter that will show me all my published pages?
- Add content as soon starts
- Append class to posts page
- body_class not working anymore?
- body_class REST field in WP-API
- Making extra parameters optional
- Using different parameters for different queries with pre get posts in functions.php
- How to add URL-Parameter for Javascript Widgets?
- Add a unique class to HTML tag/element
- how to remove all body classes in wordpress
- Website Warning: call_user_func_array() expects parameter 1 to be a valid callback, class ‘Wppr_Public’ does not have a method ‘amp_support’
- How to add same body class in multiple pages using their page id?
- post_parent array doesn’t work
- Passing parameters to a static front page
- How to return hook data when multiple parameters are present?
- Add a searchbox to the body of a page
- Need to put a script above tag in header.php – WP 5.7.1
- Add term of current custom post type to admin body class using admin_body_class
- HTTP 403 Error when passing parameters to URL
- WordPress get parameter ‘unapproved’ and ‘moderation-hash’
- Cannot set property ‘className’ of null at setThemeFromCookie
- array_filter warning – wp-includes/post.php line 3148
- How do I add Category Body Classes to Admin?
- Does anyone know all parameters of get_comments()
- missing argument 2 when passing arguments to add_action
- How to parse a custom url (within WP site) and obtain params passed to that URL
- why do I have to use required parametres?
- Where is this function’s callback getting its arguments from?
- Passing values through url for checkbox fields with same name to get?
- How to add order status class to the body tag?
- Can I pass parameters to the add_shortcode() function?
- Add class to website based on post taxonomy