CMS Mastering Development Wordpress

Calling a function of a plugin from wordpress theme header file


namespace um\core;
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 um\core\Permalinks;

The error :
Fatal error: Uncaught Error: Class ‘um\core\Permalinks’ not found in /home/xyzz/public_html/xyz/wp-content/themes/university/header-frontpage.php:5 Stack trace: #0

Leave a Reply

Your email address will not be published. Required fields are marked *