https://millionclues.com/wordpress-tips/functions-hooked-to-wordpress-action-filter/
https://millionclues.com/wordpress-tips/functions-hooked-to-wordpress-action-filter/
https://millionclues.com/wordpress-tips/functions-hooked-to-wordpress-action-filter/
When readers comment on your blog, WordPress uses the Gravatar platform to display a picture of the commenter next to his or her comment. If a commenter doesn’t have a Gravatar, or their email address isn’t associated with one, then WordPress displays the Mystery Man Gravatar as the default avatar in comments. WordPress also offers…
By OutsourcedContent — on April 19, 2018 Using the get_file_data() function. More efficient than using get_plugin_data() function. $plugin_data = get_file_data( WP_PLUGIN_DIR . ‘/plugin-folder-name-in-wp-content-plugins-folder/plugin-main-file.php’, array( ‘Version’ => ‘Version’ ) ); $plugin_data[‘Version’] will have the version. To read version from within the same plugin: $plugin_data = get_file_data( __FILE__, array( ‘Version’ => ‘Version’ ) ); Refer: https://wordpress.stackexchange.com/a/285644/90061 Pro…
By OutsourcedContent — on June 3, 2021 For quick reference. Remember to change my_subdir and example.com <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteCond %{REQUEST_URI} !^/my_subdir/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /my_subdir/$1 RewriteCond %{HTTP_HOST} ^(www.)?example.com$ RewriteRule ^(/)?$ my_subdir/index.php [L] </IfModule> Reference: Giving WordPress Its Own Directory
When developing a WordPress theme or plugin, it may be very useful to be able to output all WP Query variables. Here is a simple code snippet to do it easily. Paste the code below on any files, where you’d like to display the WP Query variables. <?php // display all wp query variables global…
By OutsourcedContent — on October 13, 2017 Add this to footer.php before the closing </body>. <script language=”javascript” type=”text/javascript”> document.getElementsByName(‘es_txt_email’)[0].placeholder=”[email protected]”; </script> Where es_txt_email is the name if the <input>. The above script was used to change the placeholder in the Email Subscribers & Newsletters plugin.
By OutsourcedContent — on December 10, 2017 This was a case on a project where a custom listing post type had post meta that specified if it was as platinum sponsor, or a gold sponsor or a verified profile. The job was to list the platinum sponsors at the top on the archive page, then…