New Blog Templates Update is throwing errors

I just updated the Blogs Template plugin and now I am getting this error.

  • Ash

    Hello @Missterbig

    I hope you are well today and thanks for asking the question.

    Yeah I saw the same thing. Please go to multi/wp-content/plugins/blogtemplates/blogtemplates.php on line 60 and

    change
    include_once( NBT_PLUGIN_DIR . '/blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php' );
    to
    //include_once( NBT_PLUGIN_DIR . '/blogtemplatesfiles/dash-notice/wpmudev-dash-notification.php' );

    Please let me know if it is helpful and feel free to ask more question if you have.

    Cheers
    Ash

  • Brashell

    @Marko You forgot to include this in the directory! For my friends who might be reading this, please create the directory dash-notice inside blogtemplates/blogtemplatesfiles then open the directory and add a file called wpmudev-dash-notification.php and add the following lines of code to it:

    <?php
    ///////////////////////////////////////////////////////////////////////////
    /* -------------------- WPMU DEV Dashboard Notice -------------------- */
    if ( !class_exists('WPMUDEV_Dashboard_Notice') ) {
    	class WPMUDEV_Dashboard_Notice {
    
    		var $version = '2.0';
    
    		function WPMUDEV_Dashboard_Notice() {
    			add_action( 'plugins_loaded', array( &$this, 'init' ) );
    		}
    
    		function init() {
    			if ( !class_exists( 'WPMUDEV_Update_Notifications' ) && current_user_can( 'install_plugins' ) && is_admin() ) {
    				remove_action( 'admin_notices', 'wdp_un_check', 5 );
    				remove_action( 'network_admin_notices', 'wdp_un_check', 5 );
    				if ( file_exists(WP_PLUGIN_DIR . '/wpmudev-updates/update-notifications.php') ) {
    					add_action( 'all_admin_notices', array( &$this, 'activate_notice' ), 5 );
    				} else {
    					add_action( 'all_admin_notices', array( &$this, 'install_notice' ), 5 );
    					add_filter( 'plugins_api', array( &$this, 'filter_plugin_info' ), 10, 3 );
    				}
    			}
    		}
    
    		function filter_plugin_info($res, $action, $args) {
    			global $wp_version;
    			$cur_wp_version = preg_replace('/-.*$/', '', $wp_version);
    
    			if ( $action == 'plugin_information' && strpos($args->slug, 'install_wpmudev_dash') !== false ) {
    				$res = new stdClass;
    				$res->name = 'WPMU DEV Dashboard';
    				$res->slug = 'wpmu-dev-dashboard';
    				$res->version = '';
    				$res->rating = 100;
    				$res->homepage = 'https://premium.wpmudev.org/project/wpmu-dev-dashboard/';
    				$res->download_link = "https://premium.wpmudev.org/wdp-un.php?action=install_wpmudev_dash";
    				$res->tested = $cur_wp_version;
    
    				return $res;
    			}
    
    			return false;
    		}
    
    		function auto_install_url() {
    			$function = is_multisite() ? 'network_admin_url' : 'admin_url';
    			return wp_nonce_url($function("update.php?action=install-plugin&plugin=install_wpmudev_dash"), "install-plugin_install_wpmudev_dash");
    		}
    
    		function activate_url() {
    			$function = is_multisite() ? 'network_admin_url' : 'admin_url';
    			return wp_nonce_url($function('plugins.php?action=activate&plugin=wpmudev-updates%2Fupdate-notifications.php'), 'activate-plugin_wpmudev-updates/update-notifications.php');
    		}
    
    		function install_notice() {
    			echo '<div class="error fade"><p>' . sprintf(__('Easily get updates, support, and one-click WPMU DEV plugin/theme installations right from in your dashboard - <strong><a href="%s" title="Install Now »">install the free WPMU DEV Dashboard plugin</a></strong>.    <small><a href="https://premium.wpmudev.org/wpmu-dev/update-notifications-plugin-information/">(find out more)</a></small>', 'wpmudev'), $this->auto_install_url()) . '</p></div>';
    		}
    
    		function activate_notice() {
    			echo '<div class="updated fade"><p>' . sprintf(__('Updates, Support, Premium Plugins, Community - <strong><a href="%s" title="Activate Now »">activate the WPMU DEV Dashboard plugin now</a></strong>.', 'wpmudev'), $this->activate_url()) . '</p></div>';
    		}
    
    	}
    	new WPMUDEV_Dashboard_Notice();
    }
    ?>

    This will resolve the problem without commenting out the line as provided above by ashok. If you don't know how to do what I wrote or are unsure, either ask me or do what ashok said. Both ways are good, but this is technically what it was intended to be what I wrote. Cheers :slight_smile: