-
Created ticket #54871 on Core Trac:
Specify which params are required in add_shortcode callback -
Posted a reply to PHP Deprecated notice when updating to PHP 8, on the site WordPress.org Forums:
@fromthe80s If you look at same issue/pull request, the first commit (Warning for required params… -
Posted a reply to PHP Deprecated notice when updating to PHP 8, on the site WordPress.org Forums:
This is a reported bug in PHP 8. You can read more here: https://bugs.php.net/bug.php?id=53399 also… -
Posted a reply to Ajax call not being able to return sent data, on the site WordPress.org Forums:
I think you forgot to localize the script or pass the ajax_url to it. ajax_url… -
Posted a reply to Preg_match the_content() to pull out images?, on the site WordPress.org Forums:
@huanhuanhuan You're welcome. I'm glad that it worked. -
Posted a reply to Preg_match the_content() to pull out images?, on the site WordPress.org Forums:
If you are planning to have both thumbnail and slider image, let's create $slider and… -
Posted a reply to Preg_match the_content() to pull out images?, on the site WordPress.org Forums:
@huanhuanhuan You can use conditional tags inside the_content hook to run your function on a… -
Posted a reply to Can you send query params on posts?, on the site WordPress.org Forums:
You can whitelist your query params with this hook https://developer.wordpress.org/reference/hooks/query_vars/ -
Posted a reply to Admin_post_nonpriv not being triggered, on the site WordPress.org Forums:
You have a typo in your second hook, it should be nopriv instead of nonpriv.… -
Posted a reply to Retrieve Post ID when using publish_post hook, on the site WordPress.org Forums:
publish_post hook accepts two arguments, $post_id and $post object. You can find some examples here… -
Posted a reply to Using PHP inside Tailwind?, on the site WordPress.org Forums:
Since Tailwind's arbitrary properties uses relative path, I suggest to create a custom function that… -
Posted a reply to Critical error, on the site WordPress.org Forums:
Please check requirements of Woody code snippets - Insert Header Footer Code, AdSense Ads -… -
Posted a reply to Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax, on the site WordPress.org Forums:
The plugins you mentioned can't create their tables on activation. I would double check the… -
Posted a reply to wp_set_object_terms in loop is not work in taxonomy & CPT, on the site WordPress.org Forums:
Taxonomies are not populated in your function. If you take a look at https://developer.wordpress.org/reference/functions/wp_set_object_terms/#source, it… -
Posted a reply to add line break in the output of esc_html__, on the site WordPress.org Forums:
@tugbucket I 100% agree with you, str_replace is much faster than sprintf performance wise but… -
Posted a reply to Relate automatically a default post with a custom post type “post”, on the site WordPress.org Forums:
I completely agree with @bcworkz. However, to add on his suggestions and specifically to decrease… -
Posted a reply to add line break in the output of esc_html__, on the site WordPress.org Forums:
I would use sprintf() instead. See example below: echo sprintf( '<p>%1$s<br>%2$s</p>', esc_html( 'We have just… -
Posted a reply to Allow Editors to Post iFrame embeds, on the site WordPress.org Forums:
This seems to be a change in security policies of Gutenberg and I'm 100% sure… -
Posted a reply to Allow Editors to Post iFrame embeds, on the site WordPress.org Forums:
Use map_meta_cap() function to add caps to a specific role in multisite. Example: function editor_unfiltered_html_cap(… -
Posted a reply to escape problem, on the site WordPress.org Forums:
It's always a good practice to validate inputs and sanitize outputs specially when you are… -
Posted a reply to Run command on client OS with javascript, on the site WordPress.org Forums:
I've used this package a while ago. It parses User Agents, detects devices, clients and… -
Posted a reply to Different Menus for multiple Pages, on the site WordPress.org Forums:
I think a better approach would be creating different page templates and headers. It keeps… -
Posted a reply to $wpdb->update, on the site WordPress.org Forums:
This is correct. The var_dump should return string type. If you take a look at… -
Posted a reply to Gutenberg Dynamic Blocks: get parent block attributes inside render_callback, on the site WordPress.org Forums:
Hi Sascha, As you mentioned earlier no Javascript, but I think this is a lot… -
Posted a reply to Setting alt-text when attaching image, on the site WordPress.org Forums:
Hi there, I've done something similar a while ago. The correct approach would be having… -
Posted a reply to Gutenberg Dynamic Blocks: get parent block attributes inside render_callback, on the site WordPress.org Forums:
Hi there, You can get parent's ID from child element and access the attributes via… -
Posted a reply to Preg_match the_content() to pull out images?, on the site WordPress.org Forums:
I like what Stefan has suggested but I think it's way too slow. Instead I… -
Posted a reply to Using Wp_query to make json array, on the site WordPress.org Forums:
You need to use array_push to push into $dataArray. Right now you are assigning value… -
Posted a reply to Lazy Loading iFrames, on the site WordPress.org Forums:
Hi there, Where is the actual iframe located? This function only checks post content, if… -
Posted a reply to custom post type information missing when creating new post programmatically, on the site WordPress.org Forums:
Hi there, I've had a similar issue in the past. What I ended up doing… -
Posted a reply to Gutenberg Block constantly re-renders on state change in inner component, on the site WordPress.org Forums:
The re-running of edit() is completely normal. I think you missed the documentation that clearly… -
Posted a reply to Gutenberg Block constantly re-renders on state change in inner component, on the site WordPress.org Forums:
Hi there, I think when your onChange event fires, the callback calls setState with the… -
Posted a reply to Help with Image in Menu?, on the site WordPress.org Forums:
Hi there, I think it's better to keep the logo separate from navigation since logo… -
Posted a reply to new WP_Query( $args ) and is_single() Not Working, on the site WordPress.org Forums:
Hi there, You could read more about conditional tags here. Remember to hook the wrapper… -
Posted a reply to For each loop does not always do all iterations, on the site WordPress.org Forums:
I think you misunderstood the point. He is using an API in his application and… -
Posted a reply to For each loop does not always do all iterations, on the site WordPress.org Forums:
@corrinarusso I don't see much difference between SMTPeter and Mailchimp? Both are third party APIs.… -
Posted a reply to For each loop does not always do all iterations, on the site WordPress.org Forums:
I agree with Bcworkz and Corrina there are lots of downsides sending emails this way.… -
Posted a reply to How comes the second mysql query is executed before the first one ?, on the site WordPress.org Forums:
I think you need to adjust your variable types. Once you set $user_has_already_voted to a… -
Posted a reply to Changing Permalinks Across The Whole Site After a Reverse Proxy, on the site WordPress.org Forums:
Hi there- All hyperlinks and inline-images in the post content needs to be manually updated… -
Posted a reply to Conditional meta box logic, on the site WordPress.org Forums:
There are many different approaches you could take. I suggest you create an empty state… -
Posted a reply to How to filter taxonomy terms properly o admin?, on the site WordPress.org Forums:
Hi there- I like your third approach it seems easier to implement and what you… -
Posted a reply to nested JS Scripts are not included on wordpress page (using wp_enqueue_scripts), on the site WordPress.org Forums:
@flaschenzug22 Here is a good article that shows how WP core loads and adjust the… -
Posted a reply to nested JS Scripts are not included on wordpress page (using wp_enqueue_scripts), on the site WordPress.org Forums:
@flaschenzug22 Remember "wp_enqueue_scripts" action is being hooked to "wp_head". I'm not sure if in "wp_head"… -
Posted a reply to nested JS Scripts are not included on wordpress page (using wp_enqueue_scripts), on the site WordPress.org Forums:
Hi there, @flaschenzug22 The second version of your script works fine. The only issue I… -
Posted a reply to strange error in add post page, Uncaught SyntaxError: Invalid regular expression, on the site WordPress.org Forums:
@mmakenzi Have you run tests on different browsers? -
Posted a reply to Set a different logo (site identity) in a different page, on the site WordPress.org Forums:
Since your logo is an image, the easiest solution would be creating a new header.php…