Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

actions

Gutenberg – Dispatch action or setAttributes() on Post Save/Update action instead of onChange listener

You can still use the onChange listener and do setAttributes only when value passed in onChange is different from the one in attributes.customColors. This is one if and should not penalize performance much.

Categories actions Tags actions, block-editor

Code run fast on a cronjob but slow with a do_action or ajax call

In cPanel run hosting environments you might have one PHP version used for your web applications but another one used for WP-CLI. Checking the PHP version, used by WP-CLI is done by running wp –info. You can check your PHP version in WordPress by going to the Health Check status page. It should be warning … Read more

Categories ajax Tags actions, ajax, bulk, wp-cron

How to hook a custom user function to a wordpress core ajax action?

How to hook a custom user function to a wordpress core ajax action?

Categories plugin-development Tags actions, plugin-development, theme-development

Adding rewrite rule dynamically

The issue with your updated code is that because you are using add_rewrite_rule() inside the filter, it can’t properly add it to the top of the list. You can see this if you dump out the $rules array. Because it gets added to the end of the $rules list, WP steps in beforehand to match … Read more

Categories plugin-development Tags actions, filters, plugin-development, rewrite-rules, url-rewriting

Plugin with action ‘save_post’ needs to press publish twice on order to publish

Plugin with action ‘save_post’ needs to press publish twice on order to publish

Categories plugin-development Tags actions, plugin-development, post-meta, save-post

add_action and do_action: multiple calls to same callback?

add_action and do_action: multiple calls to same callback?

Categories actions Tags actions

add element with add_action to posts from a specific category ID

I just try to add some content at the bottom of each posts from a specific category but the content is added in all posts. Are you sure your “Hello World!” text is added in all posts? Because is_single() && is_category() would never be true because a query can’t be for a single post and … Read more

Categories PHP Tags actions, php

adding multiple custom columns to users.php

Correct to use echo not return. This is action, not the filter. And you can delete return $value; from your callback.

Categories customization Tags actions, customization

From what hook on is it possible to conditionally add actions?

I found this on the codex You can only use conditional query tags on or after the init action hook in WordPress. For themes, this means the conditional tag will never work properly if you are using it in the body of functions.php, i.e. outside of a function. update you don’t need to hook the … Read more

Categories sidebar Tags actions, hooks, sidebar

How to get all of the activate_plugin action parameters?

The activate_plugin() function accepts three parameters, but it emits the activate_plugin action with only one parameter. This can be confusing, but hooks sometimes use the same name as the function they come from, without passing the same parameters. One way to get the difference between a network activation and a regular activation is to monitor … Read more

Categories plugins Tags actions, hooks, plugin-development, plugins
Older posts
Newer posts
← Previous Page1 … Page86 Page87 Page88 … Page147 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress