How to Create WordPress plugin
MUST READ:
plugins literally ‘plug in’ to WordPress core. This is done using ‘hooks,’ which enable one piece of code to interact with another. As such, hooks determine when and where on your site a plugin is actually used.
add_action( 'the_content', 'my_thank_you_text' );
function my_thank_you_text ( $content ) {
return $content .= '<p>Thank you for reading!</p>';
}
==>
add_action is ADDing the new function to the another one.
LINK:
Creating A WordPress Plugin Is Easier Than You Think
function dh_modify_read_more_link() {return '<a class="more-link" href="' . get_permalink() . '">Click to Read!</a>';
}
add_filter( 'the_content_more_link', 'dh_modify_read_more_link' );
==> add_filter is telling WP to replace the old core function "the_content_more_link" by this new one "db_modify_read_more_link".
LINK:
https://www.dreamhost.com/blog/how-to-create-your-first-wordpress-plugin/
The final line in this code uses a filter to hook into a function called the_content_more_link, which represents the Read More link. The filter instructs WordPress to call our new function instead, so the standard link will be replaced with our new version.
How to Create Your First WordPress Plugin (With a Minimal Amount of Coding)
https://www.dreamhost.com/blog/how-to-create-your-first-wordpress-plugin/
https://secure.gravatar.com/avatar/339f0a85535294b0a79e47aa65d4b3f3?s=100&d=mm&r=g
…………
First plugin:
Follow this steps:
https://www.wpbeaverbuilder.com/creating-wordpress-plugin-easier-think/
/WordPress/wp-content/plugins/wautom_thankyou
Creating A WordPress Plugin Is Easier Than You Think
Until a few years ago, I hadn’t written a single WordPress plugin. I had created and customized many themes for our clients, but for some reason, I kept telling myself that creating a plugin was beyond my capabilities.
In hindsight, I couldn’t have been more wrong.
https://www.wpbeaverbuilder.com/creating-wordpress-plugin-easier-think/
Copy of the page, so saved:
https://www.wautom.com/files/Creating%20A%20WordPress%20Plugin%20Is%20Easier%20Than%20You%20Think%20%20%20Beaver%20Builder.htm
Google
Youtube