WordPress plugin: Create a plugin just for your site

WordPress CMS add-ons (from the content management system), or otherwise plugins, offer you additional functions, or , depending on the plugin you are using on your wordpress site.

Below we will see a plugin made only for WordPress of iGuRu.gr. Of course, as long as I publish it, you are free to modify it and use it on your own website, and for your own needs. WordPress

Below we will see him and I will try to explain each functionality. You can add or remove pieces according to your needs. At the end of the publication there is also the folder with the php file that you should upload and activate in the dir that contains your plugins.

WordPress iGuRu Plugin Explanations:

1. hAtom: is a template of microformats.org. Helps in SEO. Using the template below is not visible on the site, but adds hAtom tags to your page.
2. Custom Search: Genesis Themes only. The code below presupposes the creation of a custom search engine on google, and creating a special page (iguru-google-search) that will contain the code of the custom search engine you created.
3. Comments: The following code concerns the comments of the Genesis Framework. If you want to convert it to your own non-Genesis theme, change the parameters of genesis_title_comments and genesis_after_comments to those used by your theme.
4. devicepx: Get rid of devicepx (only if you use Jetpack), it slows down your site.
5. Avatar: use a custom avatar for everyone. Choose her and upload it to dir images named gravatar.png
6. Query Strings: remove all; from the URLs of your script.
7. Admin footer text Add your own text at the bottom of the admin panel.
8. Autoptimize cache: automatically delete the cached files of autoptimize as soon as their size exceeds 512MB.

Let's look at the code

'. $ label. '

'. $ content.''? } return $content; } add_filter( 'the_content', 'hatom_mod_post_content'); //*Add Hatom Giorgos function add_hatom_data($content) { $t = get_the_modified_time('F j, Y, g:i a'); $ = get_the_author(); $title = get_the_title(); if (is_singular()) { $content .= ''; } return $ content; } add_filter ('the_content', 'add_hatom_data'); if (! isset ($ content_width)) $ content_width = 800; add_filter ('genesis_title_comments', 'iguru_genesis_title_comments'); function iguru_genesis_title_comments () title $ title = '

Comments

How :

IGuRu.gr does not publish the comments immediately. Malicious comments, comments that contain ads, or comments that are offensive are deleted without notice.

We do not adopt the opinions expressed by our readers.
', genesis_attr (' comment-meta ')); printf (''; // Return false so that the parent function does not also output the comment date and time return false; } // * iguru remove devicepx Only if you use Jetpack function remove_devicepx () {wp_dequeue_script ('devicepx'); } add_action ('wp_enqueue_scripts', 'remove_devicepx'); add_action ('admin_enqueue_scripts', 'remove_devicepx'); // * iguru Avatar defaults add your image to /images/gravatar.png add_filter ('avatar_defaults', 'giorgos_custom_gravatar'); function giorgos_custom_gravatar ($ avatar) {$ custom_avatar = get_stylesheet_directory_uri (). '/images/gravatar.png'; $ avatar [$ custom_avatar] = "Custom Gravatar"; return $ avatar; } // * remove query strings Giorgos function _remove_script_version ($ src) {$ parts = explode ('?', $ src); return $ parts [0]; } add_filter ('script_loader_src', '_remove_script_version', 15, 1); add_filter ('style_loader_src', '_remove_script_version', 15, 1); remove_action ('genesis_before_loop', 'genesis_do_breadcrumbs'); add_action ('genesis_before_entry', 'genesis_do_breadcrumbs'); function iguru_tweaks_change_admin_footer_text ($ text) {return sprintf (__ ('Powered by WordPress | Optimized by WPress.gr',' wpo-tweaks'), 'https://WPress.gr'); } add_filter ('admin_footer_text', 'iguru_tweaks_change_admin_footer_text'); // * Clear autoptimize cache beyond 512MB Giorgos if (class_exists ('autoptimizeCache')) {$ myMaxSize = 512000; $ statArr = autoptimizeCache :: stats (); $ cacheSize = round ($ statArr [1] / 1024); if ($ cacheSize> $ myMaxSize) {autoptimizeCache :: clearall (); header ("Refresh: 0"); }

Those of you who want the plugin ready for repairs, you can download it from the following link

iguru-plugin.zip


Add Parallax scrolling effects to your website without plugins

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.100 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).