Ejemplo n.º 1
0
 public static function start()
 {
     WP_SendGrid::load_include('sendgrid-settings.php');
     $options = WP_SendGrid_Settings::get_settings();
     if (WP_SendGrid_Settings::API_REST == $options['api'] && !function_exists('wp_mail')) {
         self::load_include('wp-mail.php');
     } else {
         add_action('phpmailer_init', array(__CLASS__, 'configure_smtp'));
     }
     add_action('plugin_action_links', array(__CLASS__, 'plugin_action_links'), 10, 2);
 }
 public static function load_field_view($view, $args)
 {
     $args['settings'] = self::is_network_admin_page() ? self::get_network_settings() : self::get_local_settings();
     $args['value'] = $args['settings'][$args['id']];
     WP_SendGrid::load_view($view, $args);
 }