dependencies_loaded() private method

Check if plugin dependencies are present.
Since: 3.0.2
private dependencies_loaded ( ) : boolean
return boolean True of dependencies are here, false otherwise
コード例 #1
0
/*----------------------------------------------------------------------------*
 * Public-Facing Only Functionality
 *----------------------------------------------------------------------------*/
if (!is_admin() && Awesome_Support::dependencies_loaded()) {
    require_once WPAS_PATH . 'includes/shortcodes/shortcode-tickets.php';
    // The plugin main shortcodes
    require_once WPAS_PATH . 'includes/shortcodes/shortcode-submit.php';
    // The plugin main shortcode-submit
}
/*----------------------------------------------------------------------------*
 * Dashboard and Administrative Functionality
 *----------------------------------------------------------------------------*/
/**
 * The code below is intended to to give the lightest footprint possible.
 */
if (is_admin() && Awesome_Support::dependencies_loaded()) {
    /* Load main admin class */
    require_once WPAS_PATH . 'includes/admin/class-admin.php';
    add_action('plugins_loaded', array('Awesome_Support_Admin', 'get_instance'));
    /* Load the MailGun e-mail check settings */
    add_filter('wpas_plugin_settings', array('WPAS_MailGun_EMail_Check', 'settings'), 10, 1);
    /**
     * Add link ot settings tab
     */
    add_filter('plugin_action_links_' . plugin_basename(__FILE__), array('Awesome_Support_Admin', 'settings_page_link'));
}
/*----------------------------------------------------------------------------*
 * Declare global variables
 *----------------------------------------------------------------------------*/
/**
 * Instantiate the global $wpas_cf object containing all the custom fields.