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.
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
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
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
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')?
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: ruclips.net/video/bn0VgekHXJo/видео.html
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
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?
Great tutorial. Are you going to make any theme development from scratch tutorials? Would be great! Most of the content regarding theme development on RUclips 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!
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?
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
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".
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?
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 watching! Don't forget to subscribe and follow me on Twitter
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
Never have I seen a coding tutorial explained so simply and to the point! This was very helpful!
Thank you so much! I’m glad you found it useful.
Best RUclips channel for WordPress advanced tutorials .. thank you very much
finally I understand action hooks!!!
no questions, you answered them all. best video on youtube for add_action()
Great tutorial. Best I have seen.
I love this kind of coding video and subscribed the channel. Keep up the good work bro🥰
Thanks for making this tutorial about hooks. I have seen them in functions.php and did not understand them until now. Thanks very much.
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!
Very good explanations, I think I understood but will have to practice on my own examples.
Very good job, I subscribe!
Thank you bro, you made it simple and clear to understand 😘😘
Excellent video and explanations, this is very useful and helpful !!!!. thanks for sharing.
Great job! Subscribed
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.
where have you gone kind sir!?!? would love you to continue on developing and teaching wordpress development!!
Great explanation.Thank you
You are welcome!
thank you, it's clear, neat, very comprehensible
Very good and detailed explanation. Wish good luck with your channel.
thank you man.keep going.nice and clean tutorials.
You’re very welcome!
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
Thank's for tutorials. Could you do lessons about development classifieds dashboard from scratch with own custom plugins and themes
Thanks a lot!
In addition, do_action() function can also get more than 2 arguments.
Good. I learn new thing today
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
thanks really helpful. Need to learn more about these concepts
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
i got confuse there. there shouldn't be ! Not sign but still that worked. anybody know why?
I just posted the same question and found you two's questions. I guess we are three now :)
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')?
Can you do this some where else beside Function.php? What is your dev environment setup? What tool do you used to develop, is that VSCode?
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: ruclips.net/video/bn0VgekHXJo/видео.html
Pretty nice, clear and practical.
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
@@eddyroybalummel9869 Thank you for taking the time to explain this.
Beautiful!
Great tutorial
Awesome!
For some reason I can see super secret page even if I am logged out!
perfect, thanks
Hi, thank you so much.
But, how are you able to get the Wordpress intelligence in Visual Studio Code? It's Visual Studio Code, isn't it???
Thx.
Hi great video, can we make section on page or in theme panel section for display post by category and post type like elemntor advance query control
Great video. Please keep doing what you're doing :)
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?
which wordpress autocomplete extension are you using for vscode?
Great tutorial. Are you going to make any theme development from scratch tutorials? Would be great! Most of the content regarding theme development on RUclips 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!
WPCasts oh, please do..pretty please
@@WPCasts When should we expect?
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?
I’m using Visual Studio Code with the WordPress Snippets plug-in installed.
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
Can somebody tell me, the $hook_name after add_action have to be a specific name or can be set arbitrary.
Nice Tutorial! Which IDE do you use?
So where did the $post_id variable come from?
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".
The save_post action hook is fired up whenever I click ‘Add New’ to add a new post instead of actually saving a post for some reason.
hi there! if i want to sent email of order invoice automatic then how can i achieve these things using woocommerce hooks?
Thank a lot..
merci beaucoup, thx very much, but the part (if (!(wp_is_post_revision( $post_id )) || wp_is_post_autosave( $post_id ) ){return; } doesn't work for me
Nice thank you!
Learn something new from every video ... even though working with WP for a while ... this is like CRACK for a WP Brain ... :-)
Thanks! I'm glad you've found it helpful :)
Awasome explanation .... But the pic in website at the start of vedio is distracting
What about do_action_ref_array() please tell about thia
Do i need to learn PHP to understand this concept better????
Yes, PHP is a pre-requisite
The playlist you created is in the wrong order.
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?
*come from reddit , Thanks*
A
W
E
S
O
M
E
Thanks, you the bomb!👍👍😆😆
Thx for the comment on reddit :)
Hey, nice vid - what code editor are you using?
I’m using Visual Studio Code :)
@@WPCasts Thanks! I've been using Atom but not in love with it. I'll try VS Code
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
thank you =)
Thx
Hey there, nice explanation. I want some help from you please..
what editor is that?
VSCode
what's this code editor?
Visual Studio Code
sir kindly provide source code for this