Example #1
0
// Save plugin options on post.
if (talandewebb_is_method('post')) {
    _talandewebb_save_plugin_options();
}
?>

    <table class="form-table">
      <tbody>
        <tr>
          <th class="row">
            <label for="talandewebb_plugin_option_activation">Aktivera</label>
          </th>
          <td>
            <input type="hidden" name="talandewebb_plugin_option_activation" value="off" />
            <input type="checkbox" name="talandewebb_plugin_option_activation" <?php 
echo talandewebb_get_plugin_option('activation', "on") === "on" ? 'checked' : '';
?>
 />
          </td>
        </tr>
      </tbody>
    </table>

    <?php 
submit_button();
?>

  </form>

  <h3 class="title">Kom igång</h3>
Example #2
0
 /**
  * Enqueue the required scripts.
  *
  * @access public
  */
 public function _tw_enqueue()
 {
     $lang = get_bloginfo('language');
     if (isset($this->language[$lang])) {
         $lang = $this->language[$lang];
     } else {
         $lang = $this->defaultLanguage;
     }
     $activate_talandewebb = talandewebb_get_plugin_option('activation');
     if ($activate_talandewebb == 'on') {
         echo '<script type="text/javascript">var _baLocale = "' . $lang . '", _baMode = " ";</script>';
         echo '<script type="text/javascript" src="https://www.browsealoud.com/plus/scripts/ba.js"></script>';
     }
 }