本文整理汇总了PHP中RGForms::is_gravity_page方法的典型用法代码示例。如果您正苦于以下问题:PHP RGForms::is_gravity_page方法的具体用法?PHP RGForms::is_gravity_page怎么用?PHP RGForms::is_gravity_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RGForms
的用法示例。
在下文中一共展示了RGForms::is_gravity_page方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: scripts_styles
/**
* load JS for fields.
*
* @param string $hook The admin page we are on.
*
* @return void
*/
public function scripts_styles($hook)
{
// Bail if not on the GF page.
if (!RGForms::is_gravity_page()) {
return;
}
// Enqueue our items.
wp_enqueue_script('gftips-admin', plugins_url('/js/gftips.admin.js', __FILE__), array('jquery'), GFT_VER, true);
wp_localize_script('gftips-admin', 'gftipsAdmin', array('fldTypes' => self::show_field_item_types()));
}
示例2: plugin_dir_path
require_once plugin_dir_path(__FILE__) . 'forms_model.php';
require_once plugin_dir_path(__FILE__) . 'widget.php';
require_once plugin_dir_path(__FILE__) . 'includes/api.php';
require_once plugin_dir_path(__FILE__) . 'includes/webapi/webapi.php';
require_once plugin_dir_path(__FILE__) . 'includes/fields/class-gf-fields.php';
// GFCommon::$version is deprecated, set it to current version for backwards compatibility
GFCommon::$version = GFForms::$version;
add_action('init', array('RGForms', 'init'));
add_action('wp', array('RGForms', 'maybe_process_form'), 9);
add_action('admin_init', array('RGForms', 'maybe_process_form'), 9);
add_action('wp', array('RGForms', 'process_exterior_pages'));
add_filter('upgrader_pre_install', array('GFForms', 'validate_upgrade'), 10, 2);
add_filter('tiny_mce_before_init', array('GFForms', 'modify_tiny_mce_4'), 20);
add_filter('user_has_cap', array('RGForms', 'user_has_cap'), 10, 3);
//Hooks for no-conflict functionality
if (is_admin() && (RGForms::is_gravity_page() || RGForms::is_gravity_ajax_action())) {
add_action('wp_print_scripts', array('RGForms', 'no_conflict_mode_script'), 1000);
add_action('admin_print_footer_scripts', array('RGForms', 'no_conflict_mode_script'), 9);
add_action('wp_print_styles', array('RGForms', 'no_conflict_mode_style'), 1000);
add_action('admin_print_styles', array('RGForms', 'no_conflict_mode_style'), 1);
add_action('admin_print_footer_scripts', array('RGForms', 'no_conflict_mode_style'), 1);
add_action('admin_footer', array('RGForms', 'no_conflict_mode_style'), 1);
}
add_action('plugins_loaded', array('GFForms', 'loaded'));
register_deactivation_hook(__FILE__, array('GFForms', 'deactivation_hook'));
class GFForms
{
public static $version = '1.9.13.26';
public static function loaded()
{
/**
示例3: define
define("IS_ADMIN", is_admin());
}
define("RG_CURRENT_VIEW", RGForms::get("view"));
define("GF_SUPPORTED_WP_VERSION", version_compare(get_bloginfo("version"), '3.0', '>='));
if (!defined("GRAVITY_MANAGER_URL")) {
define("GRAVITY_MANAGER_URL", " ");
}
require_once WP_PLUGIN_DIR . "/" . basename(dirname(__FILE__)) . "/common.php";
require_once WP_PLUGIN_DIR . "/" . basename(dirname(__FILE__)) . "/forms_model.php";
require_once WP_PLUGIN_DIR . "/" . basename(dirname(__FILE__)) . "/widget.php";
add_action('init', array('RGForms', 'init'));
add_action('wp', array('RGForms', 'maybe_process_form'), 9);
add_action('wp', array('RGForms', 'process_exterior_pages'));
add_filter('user_has_cap', array("RGForms", "user_has_cap"), 10, 3);
//Hooks for no-conflict functionality
if (is_admin() && (RGForms::is_gravity_page() || RG_CURRENT_PAGE == "admin-ajax.php")) {
add_action("wp_print_scripts", array("RGForms", "no_conflict_mode_script"), 1000);
add_action("admin_print_footer_scripts", array("RGForms", "no_conflict_mode_script"), 9);
add_action("wp_print_styles", array("RGForms", "no_conflict_mode_style"), 1000);
add_action("admin_print_styles", array("RGForms", "no_conflict_mode_style"), 1);
add_action("admin_print_footer_scripts", array("RGForms", "no_conflict_mode_style"), 1);
add_action("admin_footer", array("RGForms", "no_conflict_mode_style"), 1);
}
class RGForms
{
public static function has_members_plugin()
{
return function_exists('members_get_capabilities');
}
//Plugin starting point. Will load appropriate files
public static function init()
示例4: is_gravity_page
public static function is_gravity_page()
{
return class_exists('RGForms') ? RGForms::is_gravity_page() : false;
}
示例5: useyourdrive_extra_scripts
public function useyourdrive_extra_scripts()
{
if (RGForms::is_gravity_page()) {
add_thickbox();
}
}
示例6: bb_click_array_enqueue_form_editor_style
function bb_click_array_enqueue_form_editor_style()
{
if (RGForms::is_gravity_page()) {
$url = plugins_url('css/gform_bb_click_array.css', __FILE__);
wp_enqueue_style('gform_bb_click_array_style', $url);
}
}