Calling a function of a plugin from wordpress theme header file
Question
wp-content/plugins/ultimate-member/includes/core/class-permalinks.php
namespace umcore;
class Permalinks {
function __construct() {
add_action( 'init', array( &$this, 'activate_account_via_email_link' ), 1 );
}
}
I want to call this function ‘activate_account_via_email_link’ from wordpress/theme/header.php
My code so far :
$action = new umcorePermalinks;
$action->activate_account_via_email_link();
The error :
Fatal error: Uncaught Error: Class ‘umcorePermalinks’ not found in /home/xyzz/public_html/xyz/wp-content/themes/university/header-frontpage.php:5 Stack trace: #0
0
functions, plugins
4 years
2020-03-26T00:53:08-05:00
2020-03-26T00:53:08-05:00 0 Answers
108 views
0
Leave an answer