Тёмный

Part 1: Actions - WordPress Hooks Tutorial For Beginners 2019 

WPCasts
Подписаться 30 тыс.
Просмотров 101 тыс.
50% 1

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 91   
@WPCasts
@WPCasts 4 года назад
Thanks for watching! Don't forget to subscribe and follow me on Twitter
@bensmith807
@bensmith807 5 лет назад
Never have I seen a coding tutorial explained so simply and to the point! This was very helpful!
@WPCasts
@WPCasts 5 лет назад
Thank you so much! I’m glad you found it useful.
@franciswafula3840
@franciswafula3840 2 года назад
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
@jmora7101
@jmora7101 4 месяца назад
finally I understand action hooks!!!
@bassemkhozam
@bassemkhozam 3 года назад
Best RU-vid channel for WordPress advanced tutorials .. thank you very much
@chonyou9155
@chonyou9155 5 лет назад
Thanks for making this tutorial about hooks. I have seen them in functions.php and did not understand them until now. Thanks very much.
@cmdaltctr
@cmdaltctr 3 года назад
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!
@ChristopherZ11
@ChristopherZ11 3 года назад
no questions, you answered them all. best video on youtube for add_action()
@TheMarouuu
@TheMarouuu 4 года назад
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.
@MDHASAN-mv9cd
@MDHASAN-mv9cd 3 года назад
I love this kind of coding video and subscribed the channel. Keep up the good work bro🥰
@zzpaco
@zzpaco 3 года назад
Very good explanations, I think I understood but will have to practice on my own examples. Very good job, I subscribe!
@Immanual-mug
@Immanual-mug Год назад
where have you gone kind sir!?!? would love you to continue on developing and teaching wordpress development!!
@johnnyboygomez5500
@johnnyboygomez5500 4 года назад
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
@krunalpatel2228
@krunalpatel2228 4 года назад
i got confuse there. there shouldn't be ! Not sign but still that worked. anybody know why?
@10OzGlove
@10OzGlove 4 года назад
I just posted the same question and found you two's questions. I guess we are three now :)
@andreascarpa7143
@andreascarpa7143 5 лет назад
thank you, it's clear, neat, very comprehensible
@mydentalscaler3462
@mydentalscaler3462 2 года назад
Thank you bro, you made it simple and clear to understand 😘😘
@oparrab
@oparrab 4 года назад
Excellent video and explanations, this is very useful and helpful !!!!. thanks for sharing.
@rafaelacioly3252
@rafaelacioly3252 5 лет назад
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
@AysProPlugins
@AysProPlugins 3 года назад
Thanks a lot! In addition, do_action() function can also get more than 2 arguments.
@КирилКирилл-ю2б
@КирилКирилл-ю2б 2 года назад
Thank's for tutorials. Could you do lessons about development classifieds dashboard from scratch with own custom plugins and themes
@kornelijekovac9793
@kornelijekovac9793 3 года назад
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')?
@almobin9877
@almobin9877 4 года назад
Very good and detailed explanation. Wish good luck with your channel.
@GenoFelice
@GenoFelice 3 года назад
Great tutorial. Best I have seen.
@stavroskefaleas6320
@stavroskefaleas6320 Год назад
Awesome! For some reason I can see super secret page even if I am logged out!
@rushas
@rushas 3 года назад
Great job! Subscribed
@10OzGlove
@10OzGlove 4 года назад
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.
@eddyroybalummel9869
@eddyroybalummel9869 3 года назад
"...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
@10OzGlove
@10OzGlove 3 года назад
@@eddyroybalummel9869 Thank you for taking the time to explain this.
@adante407
@adante407 5 лет назад
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. 👍
@WPCasts
@WPCasts 5 лет назад
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!
@SK-009
@SK-009 4 года назад
WPCasts oh, please do..pretty please
@nazim848
@nazim848 Год назад
@@WPCasts When should we expect?
@noeldiaz1354
@noeldiaz1354 3 года назад
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?
@ahmad-ali14
@ahmad-ali14 3 года назад
perfect, thanks
@Jingizz
@Jingizz 5 лет назад
thanks really helpful. Need to learn more about these concepts
@Aziz-Ahmed-UK
@Aziz-Ahmed-UK Год назад
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
@OscarGonzalezTheRealOne
@OscarGonzalezTheRealOne 5 лет назад
Pretty nice, clear and practical.
@alirezaseyedzade2091
@alirezaseyedzade2091 5 лет назад
thank you man.keep going.nice and clean tutorials.
@WPCasts
@WPCasts 5 лет назад
You’re very welcome!
@martinkaspar5095
@martinkaspar5095 2 года назад
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
@45xtc
@45xtc 4 года назад
Great explanation.Thank you
@WPCasts
@WPCasts 4 года назад
You are welcome!
@tschwaar
@tschwaar 5 лет назад
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?
@WPCasts
@WPCasts 5 лет назад
I’m using Visual Studio Code with the WordPress Snippets plug-in installed.
@biotropicsmensformula4811
@biotropicsmensformula4811 4 года назад
Good. I learn new thing today
@TJKhara
@TJKhara 5 лет назад
Great video. Please keep doing what you're doing :)
@tgsoon2002
@tgsoon2002 5 лет назад
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?
@WPCasts
@WPCasts 5 лет назад
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
@hyildiz6851
@hyildiz6851 Год назад
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.
@ahmedmusawir
@ahmedmusawir 5 лет назад
Learn something new from every video ... even though working with WP for a while ... this is like CRACK for a WP Brain ... :-)
@WPCasts
@WPCasts 5 лет назад
Thanks! I'm glad you've found it helpful :)
@newpattern2208
@newpattern2208 3 года назад
Awasome explanation .... But the pic in website at the start of vedio is distracting
@peterklopapier1551
@peterklopapier1551 3 года назад
Nice Tutorial! Which IDE do you use?
@aaazzz8418
@aaazzz8418 3 года назад
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".
@gauravp4468
@gauravp4468 4 года назад
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
@davidionesi9207
@davidionesi9207 3 года назад
Beautiful!
@JaehoonMe
@JaehoonMe 3 года назад
Thx
@BuntyWP
@BuntyWP 4 года назад
Great tutorial
@mosesmuchemi7221
@mosesmuchemi7221 2 года назад
So where did the $post_id variable come from?
@gpodjoe9179
@gpodjoe9179 3 года назад
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.
@ericbraidy874
@ericbraidy874 Год назад
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
@MrNestaho
@MrNestaho 2 года назад
Can somebody tell me, the $hook_name after add_action have to be a specific name or can be set arbitrary.
@ibrahimkahlil2469
@ibrahimkahlil2469 2 года назад
What about do_action_ref_array() please tell about thia
@habibulislam3386
@habibulislam3386 4 года назад
Thank a lot..
@ChuckReynolds
@ChuckReynolds 5 лет назад
which wordpress autocomplete extension are you using for vscode?
@victor_venema
@victor_venema 5 лет назад
The playlist you created is in the wrong order.
@jean-yvescyb9788
@jean-yvescyb9788 5 лет назад
Nice thank you!
@alyssayoung7341
@alyssayoung7341 5 лет назад
Thanks, you the bomb!👍👍😆😆
@priyavasant815
@priyavasant815 4 года назад
hi there! if i want to sent email of order invoice automatic then how can i achieve these things using woocommerce hooks?
@owaismirza9699
@owaismirza9699 4 года назад
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
@moktar_
@moktar_ 5 лет назад
*come from reddit , Thanks*
@이하이-b3s
@이하이-b3s 4 года назад
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? :)
@WPCasts
@WPCasts 4 года назад
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?
@MedyGames
@MedyGames 5 лет назад
Thx for the comment on reddit :)
@vitaliisyvashchenko7641
@vitaliisyvashchenko7641 4 года назад
A W E S O M E
@ritaravinsky8262
@ritaravinsky8262 4 года назад
thank you =)
@swarnalathagolconda6691
@swarnalathagolconda6691 4 года назад
Do i need to learn PHP to understand this concept better????
@WPCasts
@WPCasts 4 года назад
Yes, PHP is a pre-requisite
@the_other_nick
@the_other_nick 5 лет назад
Hey, nice vid - what code editor are you using?
@WPCasts
@WPCasts 5 лет назад
I’m using Visual Studio Code :)
@the_other_nick
@the_other_nick 5 лет назад
@@WPCasts Thanks! I've been using Atom but not in love with it. I'll try VS Code
@wasifali8129
@wasifali8129 4 года назад
Hey there, nice explanation. I want some help from you please..
@HappyEnglishPadda
@HappyEnglishPadda 2 года назад
sir kindly provide source code for this
@deepeshdhakal7476
@deepeshdhakal7476 3 года назад
what's this code editor?
@WPCasts
@WPCasts 3 года назад
Visual Studio Code
@larenlerman3981
@larenlerman3981 4 года назад
what editor is that?
@WPCasts
@WPCasts 4 года назад
VSCode