ANTID00T
root
/
opt
/
a2wp_toastmasters
5 items
single-file file manager
ANTID00T
php
8.5.12
os
Linux
disk
317.4 GB
free of 487.33 GB
t.me/jellyproject
editing
a2wp_toastmasters.php
<?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();
Save
Cancel