codexpower Posted January 26, 2015 Share Posted January 26, 2015 I am new here I dont know if I am breaching any policy by posting questions. Are there any Tutorials that can give me input for wordpress basics such as listed here - http://codex.wordpress.org/Plugin_API http://codex.wordpress.org/Class_Reference I would be indebted if you can help me with that. Looking Forward. Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/ Share on other sites More sharing options...
maxxd Posted January 26, 2015 Share Posted January 26, 2015 There's many, many tutorials on writing WP plugins. https://www.google.com/#q=creating+wordpress+plugins http://codex.wordpress.org/Writing_a_Plugin There's also more than a few books on the topic - this one is not bad for beginners. Check out some of the links, give a few things a try, and ask any questions you may have - good luck and enjoy the trip! Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504233 Share on other sites More sharing options...
codexpower Posted January 27, 2015 Author Share Posted January 27, 2015 (edited) Actually Buddy I visited those WordPress Codex links, but the problem is it not easy for a beginner to learn directly from wordpress codex. If some video exists explaining those things that may help. I was willing to go with lynda.com, but there is no money back. what If I do not find what I am looking for. Your help is appreciated and will be further appreciated. Edited January 27, 2015 by codexpower Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504314 Share on other sites More sharing options...
Sanjib Sinha Posted January 27, 2015 Share Posted January 27, 2015 Tons of Basic WordPress video tutorials are there in you tube. For the beginners I think, video tutorials make lasting impacts primarily. Please try it before you go down writing your own themes and plugins. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504316 Share on other sites More sharing options...
codexpower Posted January 27, 2015 Author Share Posted January 27, 2015 @Sanjib Sinha I used some videos on you tube, but none are very informative. Can you give me few videos that has intensive focus on hooks in wordpress. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504317 Share on other sites More sharing options...
QuickOldCar Posted January 30, 2015 Share Posted January 30, 2015 Take the steps to first learn php, then the wordpress codex would make more sense to you. Wordpress is an ever changing complicated mess of their own renamed functions. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504338 Share on other sites More sharing options...
maxxd Posted January 30, 2015 Share Posted January 30, 2015 Wordpress is an ever changing complicated mess of their own renamed functions. Yes, yes it is... @codexpower - the biggest thing is that WordPress is huge, and asking for tutorials on how to <airquotes>program for it</airquotes> really isn't the way to go. If you've got a specific issue with a theme or plugin you're currently using that you want to fix or improve upon, start by working on just that issue. Basically, give yourself a project and set yourself a goal, then use PHP.net, the WP codex, and the many tutorials on the web to work towards that goal. When you get stuck, then ask a specific question here. We're all more than willing to help, but we need to know what we're helping with, you know? Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504353 Share on other sites More sharing options...
codexpower Posted January 30, 2015 Author Share Posted January 30, 2015 Yes, yes it is... @codexpower - the biggest thing is that WordPress is huge, and asking for tutorials on how to <airquotes>program for it</airquotes> really isn't the way to go. If you've got a specific issue with a theme or plugin you're currently using that you want to fix or improve upon, start by working on just that issue. Basically, give yourself a project and set yourself a goal, then use PHP.net, the WP codex, and the many tutorials on the web to work towards that goal. When you get stuck, then ask a specific question here. We're all more than willing to help, but we need to know what we're helping with, you know? Lets say this is a small function - <?php add_action( 'after_switch_theme', 'after_switch_theme_example' ); function after_switch_theme_example() { flush_rewrite_rules(); } ?> Please help me to under these functions more clearly. In think this is not a function - add_action( 'after_switch_theme', 'after_switch_theme_example' ); The two things in blue are some kind of parameters. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504368 Share on other sites More sharing options...
CroNiX Posted January 30, 2015 Share Posted January 30, 2015 Looking the wordpress function up in the wordpress docs might be helpful. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504372 Share on other sites More sharing options...
codexpower Posted January 30, 2015 Author Share Posted January 30, 2015 Looking the wordpress function up in the wordpress docs might be helpful. I have learned some PHP in college. i think before jumping into wordpress I must master functions and array. I know basic, Can you recommend some books where functions and arrays are discussed in details at advanced level. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504378 Share on other sites More sharing options...
maxxd Posted January 30, 2015 Share Posted January 30, 2015 First and foremost, add_action() and add_filter() are WordPress hook functions - they're specialized global functions that allow the developer to inject a custom function into the core functionality at specific points. So, in your case, at the point that the WordPress core calls after_switch_themes, it will call the user-defined function after_switch_theme_example(). This, by the way, a simplified explanation... Keep in mind as you're learning: WordPress - from a modern programming point of view - it's really not very well written. The reliance on global variables and functions, and some of the ways in which what classes there are are used is just backwards and old-fashioned. From an end-user point of view, it's great - it allows you to do a lot of things for very little effort. However, it can become rather frustrating quickly as you develop for it. And as far as PHP books and tutorials go, there's a literal ton of them out there but you need to be a little careful because a lot of them are old and PHP has changed a lot in the last several years. If you see a lot of $_REQUEST variables, the keyword global, or any kind of hashing using md5, just assume it's out of date and won't be of much practical help to you. I don't know of any good beginner tutorials or books right off the top of my head, but hopefully someone can kick in with an example or two for you. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504383 Share on other sites More sharing options...
codexpower Posted January 31, 2015 Author Share Posted January 31, 2015 First and foremost, add_action() and add_filter() are WordPress hook functions - they're specialized global functions that allow the developer to inject a custom function into the core functionality at specific points. So, in your case, at the point that the WordPress core calls after_switch_themes, it will call the user-defined function after_switch_theme_example(). This, by the way, a simplified explanation... Keep in mind as you're learning: WordPress - from a modern programming point of view - it's really not very well written. The reliance on global variables and functions, and some of the ways in which what classes there are are used is just backwards and old-fashioned. From an end-user point of view, it's great - it allows you to do a lot of things for very little effort. However, it can become rather frustrating quickly as you develop for it. And as far as PHP books and tutorials go, there's a literal ton of them out there but you need to be a little careful because a lot of them are old and PHP has changed a lot in the last several years. If you see a lot of $_REQUEST variables, the keyword global, or any kind of hashing using md5, just assume it's out of date and won't be of much practical help to you. I don't know of any good beginner tutorials or books right off the top of my head, but hopefully someone can kick in with an example or two for you. @maxxd, Thanks Boss that was awesome and very helpful to me. Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504432 Share on other sites More sharing options...
codexpower Posted February 3, 2015 Author Share Posted February 3, 2015 I found a very beautiful tutorials on tuts - http://code.tutsplus.com/tutorials/creating-your-own-widgets-using-various-wordpress-apis-introduction--cms-22460 <?php class TutsPlusText_Widget extends WP_Widget { // widget constructor public function __construct(){ } public function widget( $args, $instance ) { // outputs the content of the widget } public function form( $instance ) { // creates the back-end form } // Updating widget replacing old instances with new public function update( $new_instance, $old_instance ) { // processes widget options on save } } But they have not clarified that where will this go. I mean in which file. I believe it should be themes functions.php. Can some one comment Please? Quote Link to comment https://forums.phpfreaks.com/topic/294233-wordpress-and-php/#findComment-1504716 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.