Change reset password URL returned by wp_lostpassword_url() via plugin

With a plugin how would you change the URL returned by wp_lostpassword_url()? The function wp_lostpassword_url() returns the URL where users can reset their password. Function Reference/wp lostpassword url 1 Answer 1 Just check the source: 515 /** 516 * Filter the Lost Password URL. 517 * 518 * @since 2.8.0 519 * 520 * @param … Read more

Override comments.php template with plugin

How can I override default theme/WP Core comments.php template with my own in the plugin? I searched for different solutions, but they don’t work for me. Or how to hook to the end of any post (even custom post type) to display my custom comments? 1 Answer 1 The comments_template hook: add_filter( ‘comments_template’, function ( … Read more

Find source of notice / warning / errors efficiently

While debugging plugins or themes I will often come across a notice / warning / error which doesn’t really provide useful debugging info. Notice: get_current_site_name is deprecated since version 3.9.0! Use get_current_site() instead. in /wp-includes/functions.php on line 3835 I understand there is a reference to get_current_site_name somewhere that needs to be changed, but there are … Read more

PHP 7 – Class Method Compatibility Issue

Can anyone help me to determine what function/statement in this file causes the fatal error after upgrading to php 7.0? On php 5.6 everything works fine. Error: “Declaration of theme_navigation::update() should be compatible with WP_Widget::update($new_instance, $old_instance)” on line 0 Code: class theme_navigation extends WP_Widget { public function __construct() { parent::__construct( ‘theme_navigation’, // Base ID ‘Child … Read more

OOP Plugin Development. Including external object

I am developing a plugin by using classes and object oriented programming. Within my plugin I have included another object as I need to use the functionality of this other object. I am instantiating the included object within my plugin’s constructor. require_once (‘path/to/my/IncludedObject’); class MyPlugin { private $IncludedObject; public function __construct() { $this->IncludedObject = new … Read more