Allowing Yoast SEO plugin to track me

For reference the file that handles the tracking and usage statistics for Yoast SEO is located at, path/to/wp-content/plugins/wordpress-seo/admin/class-tracking.php I have linked to the GitHub repository file in question for further inspection upon which you can see somewhat, relatively, harmless collection of data. However what you determine as “harmless” is case dependent because the opposite could … Read more

WP_query parameters for date range

Copied from StackOverflow: WP_Query offers a date_query parameter, allowing you to set a range with before and after. https://developer.wordpress.org/reference/classes/wp_query/#date-parameters $args = array( ‘date_query’ => array( array( ‘after’ => ‘January 1st, 2015’, ‘before’ => ‘December 31st, 2015’, ‘inclusive’ => true, ), ), ); $query = new WP_Query( $args ); See the linked documentation for more details. … Read more

How to stop wordpress from changing default .htaccess permissions to 444

Your site has likely been hacked. My site had the Darkleech infection, which injected some malicious code into wp-includes/nav-menu.php, causing .htaccess to reset to 444 on any page load. I’d recommend you install the Sucuri plugin and let it restore any files that have been corrupted. Assuming your site was hacked, use their Post-Hack tab … Read more

How to delete the Hello Dolly plugin automatically?

While I appreciate the idea, isn’t this just replacing one plugin with another? Rarst’s link already has the answer — it just needs to be reworked a bit to check for the plugin periodically, like so: function goodbye_dolly() { if (file_exists(WP_PLUGIN_DIR.’/hello.php’)) { require_once(ABSPATH.’wp-admin/includes/plugin.php’); require_once(ABSPATH.’wp-admin/includes/file.php’); delete_plugins(array(‘hello.php’)); } } add_action(‘admin_init’,’goodbye_dolly’); Slap that into your functions.php file (in … Read more

Open Source plugin and requires licence

If a plugin is GPL, you have the right to modify, tweak, rebuild, and otherwise hack the plugin at your leisure. You also, under the GPL, have the right to redistribute your modified version and, ultimately, the unmodified version as well. The Gravity Forms license key is for support and updates. If you don’t have … Read more

Changing wp login url without .htaccess

I wrote a post about it a few weeks ago WordPress Easy Login URL without htaccess, but if you don’t want to read that, then here is the code in plugin form: <?php /* Plugin Name: Nice Login URL Plugin URI: http://en.bainternet.info Description: Simple plugin to redirect login/register to a nice url Version: 1.0 Author: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)