Example #1
0
				'is_multiple_field_value' => array(),				
				'multiple_value' => array(),
				'fields_delimiter' => array(),				

				'is_update_acf' => 1,
				'update_acf_logic' => 'full_update',						
				'acf_list' => array(),
				'acf_only_list' => array(),
				'acf_except_list' => array()
			);
		}
	}

	PMAI_Plugin::getInstance();

	// retrieve our license key from the DB
	$wpai_acf_addon_options = get_option('PMXI_Plugin_Options');
	
	if (!empty($wpai_acf_addon_options['info_api_url'])){
		// setup the updater
		$updater = new PMAI_Updater( $wpai_acf_addon_options['info_api_url'], __FILE__, array( 
				'version' 	=> PMAI_VERSION,		// current version number
				'license' 	=> false, // license key (used get_option above to retrieve from DB)
				'item_name' => PMAI_Plugin::getEddName(), 	// name of this plugin
				'author' 	=> 'Soflyy'  // author of this plugin
			)
		);
	}
}

Example #2
0
            return $this->options;
        }
        /**
         * Plugin activation logic
         */
        public function __activation()
        {
            // uncaught exception doesn't prevent plugin from being activated, therefore replace it with fatal error so it does
            set_exception_handler(create_function('$e', 'trigger_error($e->getMessage(), E_USER_ERROR);'));
            // create plugin options
            $option_name = get_class($this) . '_Options';
            $options_default = PMAI_Config::createFromFile(self::ROOT_DIR . '/config/options.php')->toArray();
            update_option($option_name, $options_default);
        }
        /**
         * Method returns default import options, main utility of the method is to avoid warnings when new
         * option is introduced but already registered imports don't have it
         */
        public static function get_default_import_options()
        {
            return array('acf' => array(), 'fields' => array(), 'is_multiple_field_value' => array(), 'multiple_value' => array(), 'fields_delimiter' => array(), 'is_update_acf' => 1, 'update_acf_logic' => 'full_update', 'acf_list' => array(), 'acf_only_list' => array(), 'acf_except_list' => array());
        }
    }
    PMAI_Plugin::getInstance();
    // retrieve our license key from the DB
    $wpai_acf_addon_options = get_option('PMXI_Plugin_Options');
    if (!empty($wpai_acf_addon_options['info_api_url'])) {
        // setup the updater
        $updater = new PMAI_Updater($wpai_acf_addon_options['info_api_url'], __FILE__, array('version' => PMAI_VERSION, 'license' => false, 'item_name' => PMAI_Plugin::getEddName(), 'author' => 'Soflyy'));
    }
}