本文整理汇总了PHP中C_Photocrati_Installer类的典型用法代码示例。如果您正苦于以下问题:PHP C_Photocrati_Installer类的具体用法?PHP C_Photocrati_Installer怎么用?PHP C_Photocrati_Installer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了C_Photocrati_Installer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: uninstall_action
function uninstall_action()
{
$installer = C_Photocrati_Installer::get_instance();
$installer->uninstall(NEXTGEN_GALLERY_PLUGIN_BASENAME, TRUE);
deactivate_plugins(NEXTGEN_GALLERY_PLUGIN_BASENAME);
wp_redirect(admin_url('/plugins.php'));
}
开发者ID:lcw07r,项目名称:productcampamsterdam.org,代码行数:7,代码来源:adapter.reset_form.php
示例2: reset_action
function reset_action()
{
global $wpdb;
// Flush the cache
C_Photocrati_Cache::flush('all');
// Uninstall the plugin
$settings = C_NextGen_Settings::get_instance();
if (defined('NGG_PRO_PLUGIN_VERSION') || defined('NEXTGEN_GALLERY_PRO_VERSION')) {
C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
}
C_Photocrati_Installer::uninstall('photocrati-nextgen');
// removes all ngg_options entry in wp_options
$settings->reset();
$settings->destroy();
// clear NextGEN's capabilities from the roles system
$capabilities = array("NextGEN Gallery overview", "NextGEN Use TinyMCE", "NextGEN Upload images", "NextGEN Manage gallery", "NextGEN Manage others gallery", "NextGEN Manage tags", "NextGEN Edit album", "NextGEN Change style", "NextGEN Change options", "NextGEN Attach Interface");
$roles = array("subscriber", "contributor", "author", "editor", "administrator");
foreach ($roles as $role) {
$role = get_role($role);
foreach ($capabilities as $capability) {
$role->remove_cap($capability);
}
}
// Some installations of NextGen that upgraded from 1.9x to 2.0x have duplicates installed,
// so for now (as of 2.0.21) we explicitly remove all display types and lightboxes from the
// db as a way of fixing this.
$wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'display_type'));
$wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'lightbox_library'));
// the installation will run on the next page load; so make our own request before reloading the browser
wp_remote_get(admin_url('plugins.php'), array('timeout' => 180, 'blocking' => true, 'sslverify' => false));
header('Location: ' . $_SERVER['REQUEST_URI']);
throw new E_Clean_Exit();
}
开发者ID:ayoayco,项目名称:upbeat,代码行数:33,代码来源:adapter.reset_form.php
示例3: define
/**
* Defines the module
*/
function define()
{
parent::define('photocrati-nextgen_admin', 'NextGEN Administration', 'Provides a framework for adding Administration pages', '0.5', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com');
include_once 'class.nextgen_admin_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Admin_Installer');
include_once 'class.nextgen_admin_option_handler.php';
C_NextGen_Settings::add_option_handler('C_NextGen_Admin_Option_Handler', array('jquery_ui_theme', 'jquery_ui_theme_version', 'jquery_ui_theme_url'));
}
开发者ID:jeanpage,项目名称:ca_learn,代码行数:11,代码来源:module.nextgen_admin.php
示例4: define
function define()
{
parent::define("photocrati-mvc", "MVC Framework", "Provides an MVC architecture for the plugin to use", "0.4", "http://www.photocrati.com", "Photocrati Media", "http://www.photocrati.com");
include_once 'class.mvc_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Mvc_Installer');
include_once 'class.mvc_option_handler.php';
C_NextGen_Settings::add_option_handler('C_Mvc_Option_Handler', array('mvc_template_dir'));
}
开发者ID:hiaedenis,项目名称:nextgen-gallery,代码行数:8,代码来源:module.mvc.php
示例5: define
/**
* Defines the module
* @param string|bool $context
*/
function define($context = FALSE)
{
parent::define('photocrati-attach_to_post', 'Attach To Post', 'Provides the "Attach to Post" interface for displaying galleries and albums', '0.6', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com', $context);
include_once 'class.attach_to_post_option_handler.php';
C_NextGen_Settings::add_option_handler('C_Attach_To_Post_Option_Handler', array('attach_to_post_url', 'gallery_preview_url', 'attach_to_post_display_tab_js_url'));
include_once 'class.attach_to_post_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Attach_To_Post_Installer');
}
开发者ID:fidler2326,项目名称:betfid,代码行数:12,代码来源:module.attach_to_post.php
示例6: define
function define()
{
parent::define('photocrati-ajax', 'AJAX', 'Provides AJAX functionality', '0.4', 'http://www.photocrati.com', 'Photocrati Media', 'http://www.photocrati.com');
include_once 'class.ajax_option_handler.php';
C_NextGen_Settings::add_option_handler('C_Ajax_Option_Handler', array('ajax_slug', 'ajax_url', 'ajax_js_url'));
include_once 'class.ajax_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Ajax_Installer');
}
开发者ID:hiaedenis,项目名称:nextgen-gallery,代码行数:8,代码来源:module.ajax.php
示例7: deactivate
public function deactivate()
{
delete_option('new_royalslider_ng_slider_id');
if (class_exists('C_Photocrati_Installer')) {
C_Photocrati_Installer::uninstall('ds-nextgen_royalslider');
C_Photocrati_Installer::uninstall('ds-royalslider');
}
}
开发者ID:treydonovan,项目名称:mymexicotours,代码行数:8,代码来源:NextGen.php
示例8: define
/**
* Defines the module
*/
function define()
{
parent::define('photocrati-nextgen_admin', 'NextGEN Administration', 'Provides a framework for adding Administration pages', '0.9', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com');
C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Admin_Installer');
C_NextGen_Settings::get_instance()->add_option_handler('C_NextGen_Admin_Option_Handler', array('jquery_ui_theme', 'jquery_ui_theme_version', 'jquery_ui_theme_url'));
if (is_multisite()) {
C_NextGen_Global_Settings::get_instance()->add_option_handler('C_NextGen_Admin_Option_Handler', array('jquery_ui_theme', 'jquery_ui_theme_version', 'jquery_ui_theme_url'));
}
}
开发者ID:interfisch,项目名称:lm,代码行数:12,代码来源:module.nextgen_admin.php
示例9: define
/**
* Defines the module
* @param string|bool $context
*/
function define($context = FALSE)
{
parent::define('photocrati-attach_to_post', 'Attach To Post', 'Provides the "Attach to Post" interface for displaying galleries and albums', '0.11', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', 'Photocrati Media', 'https://www.imagely.com', $context);
C_NextGen_Settings::get_instance()->add_option_handler('C_Attach_To_Post_Option_Handler', array('attach_to_post_url', 'gallery_preview_url', 'attach_to_post_display_tab_js_url'));
if (is_multisite()) {
C_NextGen_Global_Settings::get_instance()->add_option_handler('C_Attach_To_Post_Option_Handler', array('attach_to_post_url', 'gallery_preview_url', 'attach_to_post_display_tab_js_url'));
}
C_Photocrati_Installer::add_handler($this->module_id, 'C_Attach_To_Post_Installer');
}
开发者ID:sallf,项目名称:coopernature,代码行数:13,代码来源:module.attach_to_post.php
示例10: uninstall
function uninstall($hard = FALSE)
{
foreach (P_Photocrati_NextGen_Pro::$modules as $module_name) {
if ($handler = C_Photocrati_Installer::get_handler_instance($module_name)) {
if (method_exists($handler, 'uninstall')) {
$handler->uninstall($hard);
}
}
}
}
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:10,代码来源:class.nextgen_pro_installer.php
示例11: define
function define()
{
parent::define('photocrati-nextgen', 'Photocrati NextGEN', 'Photocrati NextGEN', NGG_PLUGIN_VERSION, 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com');
$module_path = implode(DIRECTORY_SEPARATOR, array(dirname(__FILE__), 'modules'));
$this->get_registry()->set_product_module_path($this->module_id, $module_path);
foreach ($this->get_modules_to_load() as $module_name) {
$this->_get_registry()->load_module($module_name);
}
include_once 'class.nextgen_product_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Product_Installer');
}
开发者ID:radscheit,项目名称:unicorn,代码行数:11,代码来源:product.photocrati_nextgen.php
示例12: define
/**
* Defines the module
* @param string|bool $context
*/
function define($context = FALSE)
{
parent::define('photocrati-attach_to_post', 'Attach To Post', 'Provides the "Attach to Post" interface for displaying galleries and albums', '0.7', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com', $context);
include_once 'class.attach_to_post_option_handler.php';
C_NextGen_Settings::add_option_handler('C_Attach_To_Post_Option_Handler', array('attach_to_post_url', 'gallery_preview_url', 'attach_to_post_display_tab_js_url'));
include_once 'class.attach_to_post_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Attach_To_Post_Installer');
$uri = strtolower($_SERVER['REQUEST_URI']);
if (strpos($uri, '/nextgen-attach_to_post') !== false) {
define('WP_ADMIN', true);
}
}
开发者ID:namwoody,项目名称:curry,代码行数:16,代码来源:module.attach_to_post.php
示例13: define
function define()
{
parent::define('photocrati-nextgen', 'Photocrati NextGEN', 'Photocrati NextGEN', '2.0.33', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com');
$module_path = path_join(dirname(__FILE__), 'modules');
$this->get_registry()->set_product_module_path($this->module_id, $module_path);
$this->get_registry()->add_module_path($module_path, TRUE, FALSE);
foreach (self::$modules as $module_name) {
$this->_get_registry()->load_module($module_name);
}
include_once 'class.nextgen_product_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Product_Installer');
}
开发者ID:namwoody,项目名称:curry,代码行数:12,代码来源:product.photocrati_nextgen.php
示例14: define
function define()
{
parent::define('ds-royalslider', 'RoyalSlider for NextGEN', 'RoyalSlider for NextGEN', '1.0', 'http://dimsemenov.com/plugins/royal-slider/wordpress/', 'Dmitry Semenov', 'http://dimsemenov.com');
$module_path = path_join(dirname(__FILE__), 'modules');
$registry = $this->get_registry();
$registry->set_product_module_path($this->module_id, $module_path);
$registry->add_module_path($module_path, TRUE, FALSE);
foreach (self::$modules as $module_name) {
$registry->load_module($module_name);
}
include_once 'class.ds_royalslider_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Ds_RoyalSlider_Installer');
}
开发者ID:treydonovan,项目名称:mymexicotours,代码行数:13,代码来源:product.ds_royalslider.php
示例15: define
/**
* Defines the module
* @param string|bool $context
*/
function define($context = FALSE)
{
parent::define('photocrati-attach_to_post', 'Attach To Post', 'Provides the "Attach to Post" interface for displaying galleries and albums', '0.10', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com', $context);
include_once 'class.attach_to_post_option_handler.php';
C_NextGen_Settings::add_option_handler('C_Attach_To_Post_Option_Handler', array('attach_to_post_url', 'gallery_preview_url', 'attach_to_post_display_tab_js_url'));
include_once 'class.attach_to_post_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Attach_To_Post_Installer');
// Set WP_ADMIN=true for better compatibility with certain themes & plugins.
// Unfortunately as of 3.9 in a multisite environment this causes problems.
if (self::is_atp_url() && (!defined('MULTISITE') || defined('MULTISITE') && !MULTISITE)) {
define('WP_ADMIN', true);
}
}
开发者ID:JeffreyBue,项目名称:jb,代码行数:17,代码来源:module.attach_to_post.php
示例16: uninstall
function uninstall($hard)
{
// remove this products modules from the pope_module_list registry
$registry = C_Component_Registry::get_instance();
$nextgen_product = $registry->get_product('photocrati-nextgen');
$pope_modules_list = get_option('pope_module_list', array());
$pope_modules_list = $this->_filter_modules($pope_modules_list, $nextgen_product->get_modules_to_load());
// run each modules respective uninstall routines
foreach ($nextgen_product->get_modules_to_load() as $module_name) {
if ($handler = C_Photocrati_Installer::get_handler_instance($module_name)) {
if (method_exists($handler, 'uninstall')) {
$handler->uninstall($hard);
}
}
}
// lastly remove this product itself from the pope_module_list registry
$search = array_search('photocrati-nextgen|' . NGG_PLUGIN_VERSION, $pope_modules_list);
if (FALSE !== $search) {
unset($pope_modules_list[$search]);
}
// TODO: remove this. NextGen Pro's uninstall routine will be updated in a separate release,
// so to maintain proper support we run the same routine as above for it
$pro_version = FALSE;
if (defined('NGG_PRO_PLUGIN_VERSION')) {
$pro_version = 'NGG_PRO_PLUGIN_VERSION';
}
if (defined('NEXTGEN_GALLERY_PRO_VERSION')) {
$pro_version = 'NEXTGEN_GALLERY_PRO_VERSION';
}
if (FALSE !== $pro_version) {
$pro_version = constant($pro_version);
}
if (FALSE !== $pro_version) {
$pope_modules_list = $this->_filter_modules($pope_modules_list, $this->get_modules_to_load_for('photocrati-nextgen-pro'));
$search = array_search('photocrati-nextgen-pro|' . $pro_version, $pope_modules_list);
if (FALSE !== $search) {
unset($pope_modules_list[$search]);
}
}
if (empty($pope_modules_list)) {
delete_option('pope_module_list');
} else {
update_option('pope_module_list', $pope_modules_list);
}
}
开发者ID:albinmartinsson91,项目名称:ux_blog,代码行数:45,代码来源:class.nextgen_product_installer.php
示例17: reset_action
function reset_action()
{
global $wpdb;
$installer = C_Photocrati_Installer::get_instance();
$settings = C_NextGen_Settings::get_instance();
// removes lightbox, display type, and source settings
$installer->uninstall(NEXTGEN_GALLERY_PLUGIN_BASENAME);
// removes ngg_options entry in wp_options
$settings->destroy();
$settings->save();
// TODO: remove this sometime after 2.0.21
//
// Some installations of NextGen that upgraded from 1.9x to 2.0x have duplicate display types installed,
// so for now (as of 2.0.21) we explicitly remove all display types from the db as a way of fixing this
$wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'display_type'));
// trigger the install routine
$installer->update(TRUE);
}
开发者ID:hiaedenis,项目名称:nextgen-gallery,代码行数:18,代码来源:adapter.reset_form.php
示例18: reset_action
function reset_action()
{
global $wpdb;
// Flush the cache
C_Photocrati_Cache::flush('all');
// Uninstall the plugin
$settings = C_NextGen_Settings::get_instance();
if (defined('NGG_PRO_PLUGIN_VERSION') || defined('NEXTGEN_GALLERY_PRO_VERSION')) {
C_Photocrati_Installer::uninstall('photocrati-nextgen-pro');
}
C_Photocrati_Installer::uninstall('photocrati-nextgen');
// removes all ngg_options entry in wp_options
$settings->reset();
$settings->destroy();
// Some installations of NextGen that upgraded from 1.9x to 2.0x have duplicates installed,
// so for now (as of 2.0.21) we explicitly remove all display types and lightboxes from the
// db as a way of fixing this.
$wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'display_type'));
$wpdb->query($wpdb->prepare("DELETE FROM {$wpdb->posts} WHERE post_type = %s", 'lightbox_library'));
// the installation will run on the next page load; so make our own request before reloading the browser
wp_remote_get(admin_url('plugins.php'), array('timeout' => 180, 'blocking' => true, 'sslverify' => false));
header('Location: ' . $_SERVER['REQUEST_URI']);
throw new E_Clean_Exit();
}
开发者ID:JeffreyBue,项目名称:jb,代码行数:24,代码来源:adapter.reset_form.php
示例19: define
function define()
{
parent::define('photocrati-cheque', 'Pay by cheque', 'Allows users to pay by mail with a cheque', '0.1', 'http://www.nextgen-gallery.com', 'Photocrati Media', 'http://www.photocrati.com');
include_once 'class.cheque_installer.php';
C_Photocrati_Installer::add_handler($this->module_id, 'C_Cheque_Installer');
}
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:6,代码来源:module.cheque.php
示例20: define
function define()
{
parent::define('photocrati-nextgen_basic_gallery', 'NextGEN Basic Gallery', "Provides NextGEN Gallery's basic thumbnail/slideshow integrated gallery", '0.16', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', 'Photocrati Media', 'https://www.imagely.com');
C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Basic_Gallery_Installer');
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:5,代码来源:module.nextgen_basic_gallery.php
注:本文中的C_Photocrati_Installer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论