Esempio n. 1
0
/**
 * Begins execution of the plugin.
 *
 * Since everything within the plugin is registered via hooks,
 * then kicking off the plugin from this point in the file does
 * not affect the page life cycle.
 *
 * @since    2.0.0
 */
function run_TuffTuffTime()
{
    $plugin = new TuffTuffTime();
    $plugin->run();
}
 /**
  * Create the options page.
  *
  * @since    2.0.0
  */
 public function create_options_page()
 {
     add_submenu_page('options-general.php', 'TuffTuffTime', 'TuffTuffTime', 'manage_options', 'tufftufftime', function () {
         if (!current_user_can('manage_options')) {
             return;
         }
         // Get the stations and loop them in the options page
         $tuffTuffTime = new TuffTuffTime();
         $TuffTuffTime_options = get_option('TuffTuffTime_options');
         $stations = $tuffTuffTime->load_stations($TuffTuffTime_options);
         include plugin_dir_path(__FILE__) . 'partials/tufftufftime-admin-options.php';
     });
 }