Most tutorials are telling me how to use hooks but not telling me what they are and the difference between actions and hooks. This was the first sentence in this tutorial. Thank you for explaining this concept simply
Thank you so much for making this. I hope more will come, you have a great talent on explaining. I sincerely thank your contribution and lessons, from the top of my heart!
Keep up the good work dude. Those 3K subscribers will be 300K in a year. Awesome WP content is very rare these days. Great presentation and tempo, you're like the Wordpress Kyle Simpson without the extra 100 pounds.
At 5:08. Why is there an exclamation point after the if statement? If it is NOT a revision or an autosave we DO want it to do something. Yet the function returns. Thanks
thank you it was very helpful, here is some points that i would love to see; 1. metadata? (user, post and etc) 2. creation of a page inside the admin to persist data
2:23 So if I get it right, you're actually adding a function to some action? The command would be better described with: add_(function_to)_action ('to which action' , 'name of function to add')?
Awesome video! Juts one quick question, I'm confused by your use of the negation in your php statement at 4:41. if(! (wp_is_post_revision( $post_id )) || wp_is_post_autosave($post_id) ) {return;} This means to me : if it is NOT a revision or if it IS an autosave then return. Could you please quickly explain this point of logic? Thank you.
"...the term "revision" in WordPress is a little confusing. It's not the updated, or revised, post... but the older version. The most updated version is the "parent." So, if you're calling the function wp_is_revision_post() on the current version of the post, it will always return false (and wp_get_post_parent_id() will return NULL) since the current post is not considered a "revision." You will need to call it on an actual revision, (which would have a different ID from the current version of the post)." wordpress.stackexchange.com/questions/188267/why-is-wp-is-post-revision-always-false
Great tutorial. Are you going to make any theme development from scratch tutorials? Would be great! Most of the content regarding theme development on RU-vid is very outdated, or incomprehensible. Your explanations are very succinct, and concise. Some theme & plugin tutorials would be good. 👍
I totally agree. Theme development has evolved quite a bit over the years. I feel like I would be a good fit for making a theme/plugin development series. Quite the undertaking, considering how large of a topic it is...but I'll consider it!
Why would I use do_action if you could've just call your new function directly? Example in the video you did do_action('user_redirected', date()) isn't that the same as just: user_redirected(date())? I mean, in the end it just call the function you just created, so whats the reason to not call it directly?
Thank you for the tutorial. I want to set the character limit to post title and description, do I need to create a hook for that to happen in WordPress? Do you know how to solve this problem? Thanks
hi there dear mate - thx for this. We would be excited about new vids that cover future development - WP 5.9 and topics like FSE and Query loop The community would celebrate this - and give you tons of clicks
Hey Alex, thanks for the helpful description of Actions (and Part 2: Filters too!). What code editor are you using that has Wordpress-specific popup help and hints?
You can put in a few places besides functions.php, but most likely a plugin file or functions.php. I have a video showing this off the tools i use here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-bn0VgekHXJo.html
My VS Code does not recognize the built-in WordPress functions. And when activating my plugin, the site crashes because of the same issue. The Docker Container log of WordPress says "Php error: unknown function bla bla".
Please make a video how to solve Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'OceanWP_Header_Customizer' does not have a method 'header_image_css' in /home/owais123/public_html/wp-includes/class-wp-hook.php on line 288 error Thank you
Thanks for your great tips. I have a question. If there's no action hooks on the function of plugin or theme, how can I edit function without direct editing the file? I would like to edit function of Ajax login plugin, but there's no action hooks. Is there any best practice on this case? :)
Shoot. That is tough. Plugins should have SOME actions that you can tap into. Have you browsed their source code to see if they are there? Do they have any documentation?