WPGlobus
  • Package
  • Class

Packages

  • WPGlobus
    • ACF
    • Admin
      • Customizer
      • HelpDesk
      • Options
        • Field
    • All-in-One-SEO
    • Compat
    • MailChimp
    • RevSlider
    • The-Events-Calendar
    • Yoast

Classes

  • WPGlobus
  • WPGlobus_Config
  • WPGlobus_Core
  • WPGlobus_Filters
  • WPGlobus_Plugin
  • WPGlobus_Utils
  • WPGlobus_WP
  • WPGlobusWidget

Class WPGlobus_WP

Class WPGlobus_WP

Package: WPGlobus
Located at includes/class-wpglobus-wp.php

Methods summary

public static boolean
# is_doing_ajax( )

Returns

boolean
public static boolean
# is_admin_doing_ajax( )

Attempt to check if an AJAX call was originated from admin screen.

Attempt to check if an AJAX call was originated from admin screen.

Returns

boolean
public static string
# pagenow( )

To get the current admin page (Set in wp-includes/vars.php)

To get the current admin page (Set in wp-includes/vars.php)

Returns

string
$page

Since

1.2.0
public static boolean
# is_pagenow( string|string[] $page )

Parameters

$page

Returns

boolean
public static string
# plugin_page( )

To get the plugin page ID

To get the plugin page ID

Returns

string

Since

1.2.0

Example

On wp-admin/index.php?page=woothemes-helper, will return woothemes-helper.
public static boolean
# is_plugin_page( string|string[] $page )

Parameters

$page

Returns

boolean
public static boolean
# is_http_post_action( string|string[] $action )

Parameters

$action

Returns

boolean
public static boolean
# is_http_get_action( string|string[] $action )

Parameters

$action

Returns

boolean
public static boolean
# is_filter_called_by( string $function, string $class = '' )

Check if a filter is called by a certain function / class

Check if a filter is called by a certain function / class

Parameters

$function
$class

Returns

boolean
public static boolean
# is_function_in_backtrace( callable $method )

Check if was called by a specific function (could be any levels deep).

Check if was called by a specific function (could be any levels deep).

Parameters

$method
Function name or array(class,function).

Returns

boolean
True if Function is in backtrace.
public static boolean
# is_functions_in_backtrace( array $callables )

To call @see is_function_in_backtrace with the array of parameters.

To call @see is_function_in_backtrace with the array of parameters.

Parameters

$callables
Array of callables.

Returns

boolean
True if any of the pair is found in the backtrace.
public static boolean
# in_wp_admin( )

True if I am in the Admin Panel, not doing AJAX

True if I am in the Admin Panel, not doing AJAX

Returns

boolean

Constants summary

string ADMIN_NOTICE_SUCCESS

CSS classes for admin notices

CSS classes for admin notices

Example

echo '<div class="notice ' . WPGlobus_WP::ADMIN_NOTICE_WARNING . '">';
# 'notice-success'
string ADMIN_NOTICE_ERROR
# 'notice-error'
string ADMIN_NOTICE_INFO
# 'notice-info'
string ADMIN_NOTICE_WARNING
# 'notice-warning'
WPGlobus API documentation generated by ApiGen