本文整理汇总了PHP中FrmAppHelper::plugin_folder方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmAppHelper::plugin_folder方法的具体用法?PHP FrmAppHelper::plugin_folder怎么用?PHP FrmAppHelper::plugin_folder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmAppHelper
的用法示例。
在下文中一共展示了FrmAppHelper::plugin_folder方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load_admin_hooks
public static function load_admin_hooks()
{
add_action('admin_menu', 'FrmAppController::menu', 1);
add_action('admin_enqueue_scripts', 'FrmAppController::load_wp_admin_style');
add_action('admin_notices', 'FrmAppController::pro_get_started_headline');
add_action('admin_init', 'FrmAppController::admin_init', 11);
add_filter('admin_body_class', 'FrmAppController::wp_admin_body_class');
add_filter('plugin_action_links_' . FrmAppHelper::plugin_folder() . '/formidable.php', 'FrmAppController::settings_link');
register_activation_hook(FrmAppHelper::plugin_path() . '/formidable.php', 'FrmAppController::activation_install');
// Entries Controller
add_action('admin_menu', 'FrmEntriesController::menu', 12);
add_filter('contextual_help', 'FrmEntriesController::contextual_help', 10, 3);
add_filter('set-screen-option', 'FrmEntriesController::save_per_page', 10, 3);
add_filter('update_user_metadata', 'FrmEntriesController::check_hidden_cols', 10, 5);
add_action('updated_user_meta', 'FrmEntriesController::update_hidden_cols', 10, 4);
// Fields Controller
add_filter('frm_display_field_options', 'FrmFieldsController::display_field_options');
add_action('frm_field_options_form', 'FrmFieldsController::add_conditional_update_msg', 50);
// Form Actions Controller
if (FrmAppHelper::is_admin_page('formidable')) {
add_action('frm_before_update_form_settings', 'FrmFormActionsController::update_settings');
}
add_action('frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3);
// Forms Controller
add_action('admin_menu', 'FrmFormsController::menu', 10);
add_action('admin_head-toplevel_page_formidable', 'FrmFormsController::head');
add_filter('set-screen-option', 'FrmFormsController::save_per_page', 10, 3);
add_action('admin_footer', 'FrmFormsController::insert_form_popup');
add_filter('media_buttons_context', 'FrmFormsController::insert_form_button');
// Forms Model
add_action('frm_after_duplicate_form', 'FrmForm::after_duplicate', 10, 2);
// Settings Controller
add_action('admin_menu', 'FrmSettingsController::menu', 45);
add_action('frm_before_settings', 'FrmSettingsController::license_box');
// Stats Controller
add_action('admin_menu', 'FrmStatisticsController::menu', 24);
add_action('frm_form_action_reports', 'FrmStatisticsController::list_reports');
// Styles Controller
add_action('admin_menu', 'FrmStylesController::menu', 14);
add_action('admin_init', 'FrmStylesController::admin_init');
// XML Controller
add_action('admin_menu', 'FrmXMLController::menu', 41);
}
示例2: uninstall
public static function uninstall()
{
check_ajax_referer('frm_ajax', 'nonce');
if (current_user_can('administrator')) {
$frmdb = new FrmDb();
$frmdb->uninstall();
//disable the plugin and redirect after uninstall so the tables don't get added right back
deactivate_plugins(FrmAppHelper::plugin_folder() . '/formidable.php', false, false);
echo esc_url_raw(admin_url('plugins.php?deactivate=true'));
} else {
$frm_settings = FrmAppHelper::get_settings();
wp_die($frm_settings->admin_permission);
}
wp_die();
}
示例3: test_plugin_folder
/**
* @covers FrmAppHelper::plugin_folder
*/
function test_plugin_folder()
{
$folder = FrmAppHelper::plugin_folder();
$expected = array('formidable', 'formidable-forms');
$this->assertTrue(in_array($folder, $expected));
}
示例4: uninstall
public static function uninstall()
{
FrmAppHelper::permission_check('administrator');
check_ajax_referer('frm_ajax', 'nonce');
$frmdb = new FrmDb();
$frmdb->uninstall();
//disable the plugin and redirect after uninstall so the tables don't get added right back
deactivate_plugins(FrmAppHelper::plugin_folder() . '/formidable.php', false, false);
echo esc_url_raw(admin_url('plugins.php?deactivate=true'));
wp_die();
}