Notice: Undefined variable: plugin_directory in /var/www/site.com/wp-content/plugins/sendgrid-email-delivery-simplified/lib/class-sendgrid-settings.php on line 37
To fix, open the file mentioned in the error and make the following 3 changes.
1. public static $plugin_directory;
//New Line
2. self::$plugin_directory = $plugin_directory;
//New Line
3. self::
$plugin_directory //Modify line #37
So the beginning of the file would then look like this:
<?php
require_once plugin_dir_path( __FILE__ ) . 'sendgrid/class-sendgrid-smtp.php';
require_once plugin_dir_path( __FILE__ ) . 'class-sendgrid-tools.php';
require_once plugin_dir_path( __FILE__ ) . 'class-sendgrid-nlvx.php';
require_once plugin_dir_path( __FILE__ ) . 'class-sendgrid-mc-optin.php';
require_once plugin_dir_path( __FILE__ ) . 'class-sendgrid-nlvx-widget.php';
class Sendgrid_Settings {
const DEFAULT_SIGNUP_EMAIL_SUBJECT = 'Confirm your subscription to ';
const DEFAULT_SIGNUP_EMAIL_CONTENT = '<p>Greetings!</p>
<p>Please click <a href="%confirmation_link%">here</a> in order to subscribe to our newsletter!</p>
<p>Thank you,</p>
<p>';
const DEFAULT_SIGNUP_EMAIL_CONTENT_TEXT = 'Greetings!
Please open %confirmation_link% in order to subscribe to our newsletter!
Thank you,
';
public static $plugin_directory;
/**
* Settings class constructor
*
* @param string $plugin_directory name of the plugin directory
*
* @return void
*/
public function __construct( $plugin_directory )
{
self::$plugin_directory = $plugin_directory;
add_action( 'init', array( __CLASS__, 'set_up_menu' ) );
}
/**
* Method that is called to set up the settings menu
*
* @return void
*/
public static function set_up_menu()
{
if ( ! is_multisite() and current_user_can('manage_options') ) {
// Add SendGrid settings page in the menu
add_action( 'admin_menu', array( __CLASS__, 'add_settings_menu' ) );
// Add SendGrid settings page in the plugin list
add_filter( 'plugin_action_links_' . self::$plugin_directory, array( __CLASS__, 'add_settings_link' ) );
// Add SendGrid Help contextual menu in the settings page
add_filter( 'contextual_help', array( __CLASS__, 'show_contextual_help' ), 10, 3 );
// Add SendGrid javascripts in header
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_headers' ) );
} elseif ( is_multisite() and is_super_admin() ) {
// Add SendGrid settings page in the network admin menu
add_action( 'network_admin_menu', array( __CLASS__, 'add_network_settings_menu' ) );
// Add SendGrid Help contextual menu in the settings page
add_filter( 'contextual_help', array( __CLASS__, 'show_contextual_help' ), 10, 3 );
// Add SendGrid javascripts in header
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'add_headers' ) );
}
}
-
This reply was modified 8 years, 6 months ago by
cartpauj. Reason: Can't bold inside a code block duh