How to Override Page Template if URL matches query?

I have 4 Page Templates that my theme uses for all the pages – Default Template, Template One, Template Two and Template Three.

When the relevant Page Template is selected, it loads an Advanced Custom Fields Group which enables the user to build/design a specific page – i.e. Template Two is for an F.A.Q page, Template Three is for a photo gallery.

I have added 4 new links in the Admin Sidebar which directs the user to the "Add New Page" URL – "post-new.php?post_type=page". For each link, it appends the name of the template at the end of the URL i.e. "post-new.php?post_type=page&template=three".

I would like to have the Edit Page load the correct Page Template depending on the template dictated in the URL – "template=three" would load "Template Three".

I am able to do a check with the URL and form an if statement with the below code —

list($  uri, $  templateURL) = explode('&', $  _SERVER['REQUEST_URI']);     if ( $  templateURL == "template=services" ) {    ... 

I am struggling with how to hook this into functions.php. I have tried editing the below ( ) but it isn’t working:

function wpse196289_default_page_template() {   global $  post;   list($  uri, $  templateURL) = explode('&', $  _SERVER['REQUEST_URI']);     if ( 'page' == $  post->post_type )     && ( $  templateURL == "template=services" )     {       $  post->page_template = "page-mytemplate.php";     } } add_action('add_meta_boxes', 'wpse196289_default_page_template', 1);  

Does the optional Overrun rule override the creature size requirements?

The standard moving through creatures spaces rules state that in order to do this, a creature must be two sizes larger than the one they want to pass through.

The optional overrun rules in the DMG (chapter 9) now require a roll, but does it remove the size differential as well and completely replace the rules around moving through other creatures?

Override the core function locate_template

I would like to override the WordPress core function locate_template().
I want the function to also search an additinal plugin directory for a template file.
I don’t see any filters inside the function, and also no check if the functions exists.
Maybe someone has a better solution for this.

What I’m trying to create is a grandchild theme as a plugin, and I have it worked for regular theme files but not for overriding get_template_part() and locate_template() functions.

For future clearance my website wil look inside the child theme folder for the file if it is not there it will look at the plugin folder and if it is not there it will look inside the parent theme and then the original WordPress file.
So I build in an extra layer.

Does the Grave Cleric’s “Path to the Grave” feature override an immunity of a creature?

Let’s say a creature (like a devil) is normally immune to fire damage. The unfortunate devil is within 30ft of a Grave Cleric and their Sorcerer friend.

The Grave Cleric uses their Path to the grave feature:

As an action, you choose one creature you can see within 30ft of you, cursing it until the end of your next turn. The next time you or an ally of yours hits the cursed creature with an attack, the creature has vulnerability to all of that attack’s damage, and then the curse ends.

Is the devil still immune? Or are they instead vulnerable to the damage?

To put it another way, does the Path to the Grave replace the immunity with a vulnerability? Or does it add a vulnerability on top of the immunity?

Are these applications of an immovable rod too much? Would they override strength checks too much? [closed]

I have two uses that I want to have handy with my immovable rod. Using it as an anchor for a pulley system, and using it as a fulcrum for a lever.

Regarding the use of making it a fulcrum I had this thought: magic items are basically unbreakable in 5e, you could use a 9 ft quarterstaff and easily do things like bending bars at 1/7th of the effort(strength) required. Your lever isn’t going to break because it is a +1 magic item, if a simple magic item would arguably break then that legendary sword you got surely wouldn’t, that could probably reduce the effort by 1/3rd; and your immovable rod is going to need a lot of force exerted on it to be pushed out of its position.

Regarding a pulley system this could easily be carried in a bag of holding, can endure a lot of stress if you are using a rope of climbing, and would make a lot of sense for an artificer, who might have expertise in both tinkerer’s tools and smith’s tools.

Would this undermine the strength stat of the fighter/barbarian too much?

Override WP Class Private Function

I’m new to community, I think you experts can help me in this. I have plugin installed and i want to its overwrite one function which is in class

    <?php    class wf_fedex_woocommerce_shipping_admin{  private function wf_user_permission($  auto_generate=null){  $  current_minute=(integer)date('i');         if(!empty($  auto_generate) && ($  auto_generate==md5($  current_minute) || $  auto_generate==md5($  current_minute+1) ))         {             return true;         }         $  current_user = wp_get_current_user();         $  user_ok = false;         $  wf_roles = apply_filters( 'wf_user_permission_roles', array('administrator', 'shop_manager') );          if ($  current_user instanceof WP_User) {             $  role_ok = array_intersect($  wf_roles, $  current_user->roles);             if( !empty( $  role_ok ) ){                 $  user_ok = true;             }         }         return $  user_ok; } } ?> 

I want to rewrite if so WP will use my custom instead of plugin I need a single change in new function ( I mean i just need pass ‘subscriber’ in array )

$  wf_roles = apply_filters( 'wf_user_permission_roles', array('administrator', 'shop_manager', 'subscriber') ); 

Materialize.css – override provided style

I have an icon on my wordpress page which uses materialize css, more specifically, it uses the font-size class Tiny for mobile devices, which is tiny: 1rem.

enter image description here

<div class="row">     <div class="center-align">         <div class="col s3">          <i class="material-icons tiny icon-demo">insert_chart</i>           <p>Tiny</p>       </div>     </div> </div> 

Now I want it to use Medium on medium large devices and Large on desktop devices (large viewports).

The question is:

Can I use these classes and override them soemhow in media queries? Is this possible? If I set Tiny in my HTML code it looks like hard-coded to me.

Or do I have to implement a custom class like .myIconSize and override its implementation in different media queries, like:

// Small @media only screen (min-width: 368px){    .myIconSize{ font-size: 1rem; }  }  / Medium @media only screen (min-width: 768px){       .myIconSize{ font-size: 1rem; }  } 

Or is it better to not use these ootb styles like for font-sizes (tiny, small, etc..) ?

Does Overhand Chop override the damage bonus from wielding a two handed weapon?

I was showing a GM friend of mine a build I was making that uses the Two-Handed Fighter Archetype and we are both unsure of how it interacts with the damage bonus you get from two-handed weapons (which is 1-1/2 times your STR.) It reads:

Overhand Chop (Ex): At 3rd level, when a two-handed fighter makes a single attack (with the attack action or a charge) with a two-handed weapon, he adds double his Strength bonus on damage rolls. This ability replaces armor training 1.

So does Overhand Chop turn the 1-1/2 times multiplier from two-handed weapons into a 2 times multiplier or do the two add up? or do they interact in some other way. This assumes a Medium sized character with 20 STR and a greatsword with 3 levels. Apologies if I left anything out.

Override class inside $atts shortcode_atts in WordPress

I have a plugin and I need to tweak one function. Specifically the ‘class’ => ”.

This is the code in the plugin:

function message_to( $  atts, $  content = null, $  tag = '' ) {     $  atts = shortcode_atts( array(         'to'        => '{current-post-author}',         'subject'   => '{current-post-title}',         'text'      => __( 'Contact','front-end-pm' ),         'class'     => 'fep-button',         'fep_mr_to' => false, // Comma separated list of user ids (used in PRO version)     ), $  atts, $  tag );     if ( '{current-post-author}' == $  atts['to'] ) {         $  atts['to'] = get_the_author_meta( 'user_nicename' );     } elseif ( '{current-author}' == $  atts['to'] ) {         if ( $  nicename = fep_get_userdata( get_query_var( 'author_name' ), 'user_nicename' ) ) {             $  atts['to'] = $  nicename;         } elseif ( $  nicename = fep_get_userdata( get_query_var( 'author' ), 'user_nicename', 'id' ) ) {             $  atts['to'] = $  nicename;         }         unset( $  nicename );     } elseif ( '{um-current-author}' == $  atts['to'] && function_exists( 'um_profile_id' ) ) {         $  atts['to'] = fep_get_userdata( um_profile_id(), 'user_nicename', 'id' );     } else {         $  atts['to'] = esc_html( $  atts['to'] );     }     if ( false !== strpos( $  atts['subject'], '{current-post-title}' ) ) {         $  atts['subject'] = rawurlencode( str_replace( '{current-post-title}', get_the_title(), $  atts['subject'] ) );     } elseif ( ! empty( $  atts['subject'] ) ) {         $  atts['subject'] = rawurlencode( $  atts['subject'] );     } else {         $  atts['subject'] = false;     }     if ( empty( $  atts['to'] ) && empty( $  atts['fep_mr_to'] ) ) {         return '';     }     return '<a href="' . fep_query_url( 'newmessage', array( 'fep_to' => $  atts['to'], 'message_title' => $  atts['subject'], 'fep_mr_to' => $  atts['fep_mr_to'] ) ) . '" class="' . esc_attr( $  atts['class'] ) . '">' . esc_html( $  atts['text'] ) . '</a>'; } 

The original function specifies the class:

'class'     => 'fep-button', 

I need to change it to something else:

'class'     => 'something-else', 

Does Dim Light created by an effect override Bright Light in an area?

Two examples.

A silvery beam of pale light shines down in a 5-foot-radius, 40-foot-high cylinder centered on a point within range. Until the spell ends, dim light fills the cylinder.

Moonbeam, Player’s Handbook, pg. 261

You create up to four torch-sized lights within range, […] each light sheds dim light in a 10-foot radius.

Dancing Lights, Player’s Handbook, pg. 230

Now consider that each of these spells are cast on a bright day, obviously covered by Bright Light, as the game understands it.

  1. Do these spells change the Bright Light within the area affected by them into Dim Light?
  2. Is the behavior different between Moonbeam (“Dim Light fills the cylinder”) and Dancing Lights (“each light sheds dim light”), or do both of them behave the same?