How to Modify WP_Includes/blocks/latest_posts.php

I am a beginner in WordPress Development wanted to get some help. Iam working on a simple WordPress site. Basically the user wants the most recent post to show on the homepage. I’ve set it to show the entire Post Content and now the user does not want the title of the post to be linked to the individual post page (since the contents of the post show on the homepage).

How do I safely modify the template file to use like a something like a h2 tag instead of a href tag, which is used here in the theme. I know you can create a child theme and modify wp_content files, but I am not sure how to approach this with files in wp_include. I read something about modifying functions.php but I am not sure and would appreciate any pointers.

$  title = get_the_title($  post);         if (!$  title) {             $  title = __('(no title)');         }         $  list_items_markup .= sprintf(              '<a href="%1$  s">%2$  s</a>',             $  post_link,             $  title         );  

Filter orders by modify date

I’m trying to add a new filter that will sort orders by modification date. Below is the code I found and modified. Unfortunately, filtering doesn’t work, returns zero results.I think the problem is with $ filter_id

function get_filter_shop_order_meta( $  domain = 'woocommerce' ){     // Add below the metakey / label pairs to filter orders     return [         'last_modified' => __('Recently updated', $  domain)     ]; }   add_action( 'restrict_manage_posts', 'display_admin_shop_order_by_meta_filter' ); function display_admin_shop_order_by_meta_filter(){     global $  pagenow, $  typenow;      if( 'shop_order' === $  typenow && 'edit.php' === $  pagenow ) {         $  domain    = 'woocommerce';         $  filter_id = 'filter_shop_order_by_meta';         $  current   = isset($  _GET[$  filter_id])? $  _GET[$  filter_id] : '';          echo '<select name="'.$  filter_id.'">         <option value="">' . __('Sort by…', $  domain) . '</option>';          $  options = get_filter_shop_order_meta( $  domain );          foreach ( $  options as $  key => $  label ) {             printf( '<option value="%s"%s>%s</option>', $  key,                  $  key === $  current ? '" selected="selected"' : '', $  label );         }         echo '</select>';     } }   add_filter( 'request', 'process_admin_shop_order_marketing_by_meta', 99 ); function process_admin_shop_order_marketing_by_meta( $  vars ) {     global $  pagenow, $  typenow;          $  filter_id = 'filter_shop_order_by_meta';      if ( $  pagenow == 'edit.php' && 'shop_order' === $  typenow      && isset( $  _GET[$  filter_id] ) && ! empty($  _GET[$  filter_id]) ) {         $  vars['meta_key']   = $  _GET[$  filter_id];         $  vars['orderby']    = 'ASC';     }     return $  vars; }   add_filter( 'woocommerce_shop_order_search_fields', 'shop_order_meta_search_fields', 10, 1 ); function shop_order_meta_search_fields( $  meta_keys ){     foreach ( get_filter_shop_order_meta() as $  meta_key => $  label ) {         $  meta_keys[] = $  meta_key;     }     return $  meta_keys; } 

I will be grateful for your help.

How do you make a webhook to get elementor form entry data and use it to modify the dowload URL of a file in woocommerce?

I am a beginner so hopefully someone can help me. I want to edit the download URL of a product based on any specific field in the form entry of elementor pro.

I used the filter code below to set up the change in the URL, but I don’t know how to get any data that was filled in the form in the function ([ELEMENTOR FORM FIELD]).

function filter_function_name_3287( $  file_path, $  that, $  download_id ){     $  file_path = '/wp-content/uploads/elementor/pdf/' . '[ELEMENTOR FORM FIELD]' . '.pdf';     return $  file_path;     } 

If it’s not possible to link it to the form, could I use the current user ID or name? and how?

Short code to modify the user profile from the frontend

I am trying to pass a template that I found here to a short code to display on a page on the frontend.

Now now I have the following:

// profile action hook - catches form submission and acts accordingly add_action('init','profile_form_submission'); function profile_form_submission() {      /* Get user info. */     global $  current_user, $  wp_roles;     //get_currentuserinfo(); //deprecated since 3.1      /* Load the registration file. */     //require_once( ABSPATH . WPINC . '/registration.php' ); //deprecated since 3.1     $  error = array();         /* If profile was saved, update profile. */     if ( 'POST' == $  _SERVER['REQUEST_METHOD'] && !empty( $  _POST['action'] ) && $  _POST['action'] == 'update-user' ) {          /* Update user password. */         if ( !empty($  _POST['pass1'] ) && !empty( $  _POST['pass2'] ) ) {         if ( $  _POST['pass1'] == $  _POST['pass2'] )             wp_update_user( array( 'ID' => $  current_user->ID, 'user_pass' => esc_attr( $  _POST['pass1'] ) ) );         else             $  error[] = __('Las contraseñas no son iguales, por lo tanto, no fueron actualizadas.', 'profile');         }          /* Update user information. */         if ( !empty( $  _POST['url'] ) )         wp_update_user( array( 'ID' => $  current_user->ID, 'user_url' => esc_url( $  _POST['url'] ) ) );         if ( !empty( $  _POST['email'] ) ){         if (!is_email(esc_attr( $  _POST['email'] )))             $  error[] = __('Este email no es valido, pruebe otra vez.', 'profile');         elseif(email_exists(esc_attr( $  _POST['email'] )) != $  current_user->id )             $  error[] = __('Este email ya esta en uso por otro usuario, pruebe con otro.', 'profile');         else{             wp_update_user( array ('ID' => $  current_user->ID, 'user_email' => esc_attr( $  _POST['email'] )));         }         }           /* Redirect so the page will show updated info.*/       /*I am not Author of this Code- i dont know why but it worked for me after changing below line to if ( count($  error) == 0 ){ */         if ( count($  error) == 0 ) {         //action hook for plugins and extra fields saving         do_action('edit_user_profile_update', $  current_user->ID);         wp_redirect( get_permalink() );         exit;         }     } }  // shows login form (or a message, if user already logged in) function get_profile_customers_form($  redirect) {             if ( !is_user_logged_in() ) {         $  return = .__('Tienes que estar logueado para modificar esta pagina.', 'profile');             else {                 if ( count($  error) > 0 ) echo '<p class="error">' . implode("<br />", $  error) . '</p>';                 <form method="post" id="adduser" action="<?php the_permalink(); ?>">                     <p class="form-email">                         <label for="email"><?php _e('E-mail *', 'profile'); ?></label>                         <input class="text-input" name="email" type="text" id="email" value="<?php the_author_meta( 'user_email', $  current_user->ID ); ?>" />                     </p><!-- .form-email -->                     <p class="form-password">                         <label for="pass1"><?php _e('Contraseña *', 'profile'); ?> </label>                         <input class="text-input" name="pass1" type="password" id="pass1" />                     </p><!-- .form-password -->                     <p class="form-password">                         <label for="pass2"><?php _e('Confirmar *', 'profile'); ?></label>                         <input class="text-input" name="pass2" type="password" id="pass2" />                     </p><!-- .form-password -->                      <?php                          //action hook for plugin and extra fields                         do_action('edit_user_profile',$  current_user);                      ?>                     <p class="form-submit">                         <?php echo $  referer; ?>                         <input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Actualizar cuenta', 'profile'); ?>" />                         <?php wp_nonce_field( 'update-user' ) ?>                         <input name="action" type="hidden" id="action" value="update-user" />                     </p><!-- .form-submit -->                 </form><!-- #adduser -->    }  // adds a handy [profile_form_submission] shortcode to use in posts/pages add_shortcode('profile_form_submission','profile_form_submission_shortcode'); function vr_login_shortcode ($  atts,$  content=false) {   $  atts = shortcode_atts(array(     'redirect' => home_url()   ), $  atts);   return get_profile_customers_form($  atts['redirect']); } 

I don’t know how to do the part of the code that the form shows. It is from "// shows login form (or a message, if user already logged in)".

The original code that I am trying to adapt was the following:

    <?php if ( !is_user_logged_in() ) : ?>             <p class="warning">                 <?php _e('Tienes que estar logueado para modificar esta pagina.', 'profile'); ?>             </p><!-- .warning -->     <?php else : ?>         <?php if ( count($  error) > 0 ) echo '<p class="error">' . implode("<br />", $  error) . '</p>'; ?>         <form method="post" id="adduser" action="<?php the_permalink(); ?>">             <p class="form-email">                 <label for="email"><?php _e('E-mail *', '<br />', 'profile'); ?></label>                 <input class="text-input" name="email" type="text" id="email" value="<?php the_author_meta( 'user_email', $  current_user->ID ); ?>" />             </p><!-- .form-email -->             <p class="form-password">                 <label for="pass1"><?php _e('Contraseña *',"<br>", 'profile'); ?> </label>                 <input class="text-input" name="pass1" type="password" id="pass1" />             </p><!-- .form-password -->             <p class="form-password">                 <label for="pass2"><?php _e('Confirmar *',"<br>", 'profile'); ?></label>                 <input class="text-input" name="pass2" type="password" id="pass2" />             </p><!-- .form-password -->              <?php                  //action hook for plugin and extra fields                 do_action('edit_user_profile',$  current_user);              ?>             <p class="form-submit">                 <?php echo $  referer; ?>                 <input name="updateuser" type="submit" id="updateuser" class="submit button" value="<?php _e('Actualizar cuenta', 'profile'); ?>" />                 <?php wp_nonce_field( 'update-user' ) ?>                 <input name="action" type="hidden" id="action" value="update-user" />             </p><!-- .form-submit -->         </form><!-- #adduser --> 

How to modify the output of wp_terms_checklist when used within the built-in category metabox on edit posts?

On the Edit Screen in the WP Admin there is a meta box for WP’s built-in Category taxonomy. This meta box is built using post_categories_meta_box() (/wp-admin/includes/meta-boxes.php).

This meta box uses wp_popular_terms_checklist( $ tax_name ) and wp_terms_checklist( $ tax_name ) to output the actual categories (with checkboxes) within the meta box.

wp_terms_checklist() (wp-admin/includes/template.php) uses the Walker_Category_Checklist (/wp-admin/includes/class-walker-category.checklist) to build the categories/checkboxes.

Walker_Category_Checklist inherits from Walker (wp-includes/class-wp-walker.php) just like a number of other WP walkers (Walker_Nav_Menu, Walker_Comment, Walker_Category, etc.).

When extending the Walker_Nav_Menu we can hook into the wp_edit_nav_menu_walker filter and return our custom walker. Is there a way to do this with Walker_Category_Checklist?

===

Update 1:

I see in wp_terms_checklist() there is:

apply_filters( 'wp_terms_checklist_args', $ args, $ post_id );

I’m thinking that I can hook into this filter, change the walker argument to a custom walker and that this may do the trick?

How are abilities that modify character wealth supposed to modify character wealth by level?

There are a LOT of abilities that relate to purchase or sale of goods or services in Pathfinder. Generally, these abilities cost character resources: feats, rogue talents, traits, class features, etc.

Pathfinder also has an official WBL chart. While our games typically use that chart only for character creation, it appears (based on content on this site) that other groups generally keep their players at approximately that level of wealth, somehow preventing significant departures from the expected total.

How, in a game that does not allow “wealth pumping”, do abilities that modify character wealth, especially those that modify the minimum sale value of goods, work? Put another way, how do you maintain wealth as a function of character level rather than of time when characters have access to such abilities?


Since I’ve been told to list all things that affect character wealth besides magic item crafting feats, the following may be useful (but really, this isn’t about these examples. This is about the question above. Please address that more than this random list of examples):

  • favored son
  • foreign opportunist
  • Duskwalker Agent
  • Investments
  • Caravans(traders, particularly)
  • Kingdom Building Rules
  • Curse of Keeping
  • Profession Skills
  • Perform Skills
  • Diplomacy checks to Bargain
  • Nonmagical Item Creation Feats, like Dragoncrafting
  • Scrounger
  • Blood Money
  • Lyre of Building
  • The Fabricate spell
  • True Creation
  • The Fence 3pp archetype
  • Black Market Connections
  • a Robe of Useful Items
  • Monument Builder
  • Wretched Curator
  • Eye for Ingredients

I haven’t listed them all yet, please feel free to add more if you want.

How to “modify” MediaPlaceholder / a React component?

Pardon the slightly naive question, but I’m still working on my first block, and am new to both Gutenberg and React. For lots of reasons ([hopefully] simplicity, reusability, extensibility, etc…), I’m trying to use existing stuff wherever possible. In this particular case, I’m trying to use MediaPlaceholder, but I need to make a couple of modifications:

  • I want to specify the directory that’s used, both for "upload" and for "media library"
  • I want to change the link text for "Media Library" to something else
  • I want to add a fourth option (beyond "Upload", "Media Library", and "Insert from URL")

I don’t want to do the above everywhere that MediaPlaceholder is called; only in my new plugin’s block.

The doc’s have a hook for a filter to "replace or extend" it, but I can’t find any examples of someone doing this; and, based on similar filters in other parts of the block editor, it seems like it’s mostly for "extend", and "replace" would be a PITA. Another possibility is to set the disableMediaButtons prop, and add a child with my own buttons — but that seems like it would involve a ton of repetitive code. I also looked at React’s concept of "composition", which might be what I need, but if it is, I need a much better tutorial.

Am I thinking about this the right way? If I want a "placeholder" that lets someone upload files to a specific location, or point to a URL, or do something else (the specific something else is schedule a cron job, but I don’t think that detail matters), am I best off starting with MediaPlaceholder? And, if so, what’s the Right Way to go about modifying it to do this?

Are abilities that “Treat the results as a bull rush attempt” modified by feats and abilities that modify your standard Bull Rush?

Specifically I’m looking at the power Wind Blast from the Wind subdomain of the Air domain. The ability reads as follows:

Wind Blast (Su): As a standard action, you can unleash a blast of air in a 30-foot line. Make a combat maneuver check against each creature in the line, using your caster level as your base attack bonus and your Wisdom modifier in place of your Strength modifier. Treat the results as a bull rush attempt. You can use this ability a number of times per day equal to 3 + your Wisdom modifier.

With this and similar abilities, do any bonuses or effects from class abilities, feats, or traits such as Greater Bull Rush apply to the roll or result?