| Server IP : 172.67.157.124 / Your IP : 216.73.216.213 Web Server : LiteSpeed System : Linux s12482.usc1.stableserver.net 5.14.0-570.32.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 6 11:30:41 EDT 2025 x86_64 User : snownico ( 1231) PHP Version : 8.2.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /opt/a2wp_toastmasters/ |
Upload File : |
<?php
/**
* Plugin Name: A2 WP Toastmasters Helper
* Author: A2 Hosting
* Version: 1.0.1
* Author URI: https://www.a2hosting.com/
* License: GPL2
* Liecense URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
// Prevent direct access to this file
if ( ! defined( 'WPINC' ) ) die;
class A2WPToastmastersPlugin {
public function __construct(){
register_activation_hook(__FILE__, array( $this , 'activate' ));
add_action( 'wp_dashboard_setup', array( $this, 'setup_widget' ));
}
// One-time setup stuff
public function activate () {
wp4toast_template(1); // install standard meeting templates, author = admin ID #1
rsvptoast_pages (1); // install placeholder pages for calendar and member directory; set up menu
wp_update_term(1, 'category', array(
'name' => 'Club News',
'slug' => 'club-news'
));
wp_create_category('Members Only');
}
public function widget_output() {
// outputs the content of the widget
echo file_get_contents(__DIR__.'/templates/dashboard.html');
}
public function setup_widget () {
wp_add_dashboard_widget(
'a2wp_toastmaster_widget',
'WP Toastmaster Setup',
array( $this, 'widget_output')
);
}
}
$a2wp_toastmasters = new A2WPToastmastersPlugin();