Example #1
0
	/**
	 * Register a version of a class.
	 *
	 * @access private This method is only for internal use by the library.
	 *
	 * @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'.
	 * @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'.
	 * @param string $version Version number, e.g. '1.2'.
	 */
	public static function addVersion($generalClass, $versionedClass, $version) {
		if ( !isset(self::$classVersions[$generalClass]) ) {
			self::$classVersions[$generalClass] = array();
		}
		self::$classVersions[$generalClass][$version] = $versionedClass;
		self::$sorted = false;
	}
		),
		'option_defaults'	=> array(
		),
		'form_add_actions'	=> array(
		),
		'has_cache'			=> false,
		'option_page_text'	=> '',
		'backlinkware_text' => '',
		'plugin_file'		=> __FILE__,
		'has_activation_notice'	=> false,
		'activation_notice' => '',
		'form_method'		=> 'post'
 	)
);
if(is_admin()){
	//config section        
	if(!defined('JU_BASE')){
		define( 'JU_BASE', 'https://www.joomunited.com/' );
	}
	
	$remote_updateinfo =   JU_BASE.'juupdater_files/wp-latest-posts-addon.json';
	 //end config
	
	require 'juupdater/juupdater.php';
	$UpdateChecker = Jufactory::buildUpdateChecker(
		   $remote_updateinfo,
			__FILE__
	);

}
?>