예제 #1
0
/**
 * Show a link to the WP Email Debug settings page in the toolbar indicating
 * the debugging functionality is enabled.
 *
 * @since 1.0.0
 * @return void
 */
function WPMDBUG_toolbar_link($wp_admin_bar)
{
    if (WPMailDebugger::doEnforce()) {
        $args = array('id' => 'WPMDBUG-toolbar', 'title' => 'Email Debug ON', 'href' => get_admin_url(NULL, 'options-general.php?page=wpmdbug'));
        $wp_admin_bar->add_node($args);
    }
}
예제 #2
0
 public static function instantiate()
 {
     if (!isset(self::$instance) && !self::$instance instanceof WPMailDebugger) {
         self::$instance = new WPMailDebugger();
         self::$instance->includes();
     }
     return self::$instance;
 }
예제 #3
0
if (!function_exists('get_plugins')) {
    require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$plugins = get_plugins();
?>
<div class="wrap">
  <h2>E-Mail Debugger Settings</h2>
  <form action="options-general.php?page=wpmdbug" method="post">
    <table class="form-table">
      <tbody>
        <tr>
          <th scope="row">Enable E-Mail Debugging</strong></th>
          <td>
            <label>
              <input type="checkbox" value="1" name="wpmdbug_enabled" <?php 
echo WPMailDebugger::doEnforce() ? 'checked="checked"' : '';
?>
/>
            </label>
          </td>
        </tr>
        <tr>
          <th scope="row">Redirect E-Mails To</strong></th>
          <td>
            <label>
              <input type="text" size="40" value="<?php 
echo get_option('WPMDBUG_email', get_bloginfo('admin_email'));
?>
" name="wpmdbug_sendto"/>
            </label>
          </td>