golden hour
/var/www/html/wp-content/plugins/designthemes-webinar
⬆️ Go Up
Upload
File/Folder
Size
Actions
assets
-
Del
OK
designthemes-webinar.php
5.19 KB
Del
OK
elementor
-
Del
OK
languages
-
Del
OK
modules
-
Del
OK
script-and-styles.php
1.17 KB
Del
OK
theme-support
-
Del
OK
Edit: designthemes-webinar.php
<?php /* Plugin Name: DesignThemes Webinar Plugin URI: http://wedesignthemes.com/plugins/designthemes-webinar Description: A simple wordpress plugin designed to implements <strong>Webinar addon features of DesignThemes</strong> Version: 1.0 Author: DesignThemes Author URI: http://themeforest.net/user/designthemes Text Domain: dtwebinar */ if (! class_exists ( 'DtWebinar' )) { class DtWebinar { /** * Instance variable */ private static $_instance = null; /** * Active Modules */ public $active_modules = array (); /** * Instance * * Ensures only one instance of the class is loaded or can be loaded. */ public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } /** * Constructor */ function __construct() { $this->dtwebinar_setup_constants(); $this->dtwebinar_action_hooks(); //$this->dtwebinar_includes(); $this->dtwebinar_load_modules(); // Theme Support $this->dtwebinar_theme_support_includes(); } /** * Define constant if not already set. */ public function dtwebinar_define_constants( $name, $value ) { if ( ! defined( $name ) ) { define( $name, $value ); } } /** * Configure Constants */ public function dtwebinar_setup_constants() { $this->dtwebinar_define_constants( 'DTWEBINAR_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); $this->dtwebinar_define_constants( 'DTWEBINAR_PLUGIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) ); $this->dtwebinar_define_constants( 'DTWEBINAR_PLUGIN_NAME', esc_html__('DesignThemes Webinar', 'dtwebinar') ); $this->dtwebinar_define_constants( 'DTWEBINAR_PLUGIN_MODULE_PATH', DTWEBINAR_PLUGIN_PATH.'modules' ); } /** * Action Hooks */ public function dtwebinar_action_hooks() { add_action ( 'init', array ( $this, 'dtwebinar_init' ) ); add_action ( 'admin_menu', array ( $this, 'dtwebinar_configure_admin_menu' ), 10 ); } /** * On Init */ function dtwebinar_init() { load_plugin_textdomain ( 'dtwebinar', false, dirname ( plugin_basename ( __FILE__ ) ) . '/languages/' ); // Register Dependent Styles & Scripts require_once DTWEBINAR_PLUGIN_PATH . 'script-and-styles.php'; } /** * Plugins Load */ function dtwebinar_plugins_loaded() { // Page Builders if ( did_action( 'elementor/loaded' ) ) { //require_once DTWEBINAR_PLUGIN_PATH . 'elementor/register-elementor.php'; } else { add_action ('admin_notices', array( $this, 'dtwebinar_pb_plugin_notice' ) ); return; } } function dtwebinar_pb_plugin_notice() { echo '<div class="updated notice is-dismissible">'; echo '<p>'; echo sprintf(esc_html__('%1$s requires %2$s plugin to be installed and activated on your site','dtwebinar'), '<strong>'.DTWEBINAR_PLUGIN_NAME.'</strong>', '<strong><a href="https://wordpress.org/plugins/elementor/" target="_blank">'.esc_html__('Elementor Page Builder', 'dtwebinar').'</a></strong>' ); echo '</p>'; echo '<button type="button" class="notice-dismiss">'; echo '<span class="screen-reader-text">'.esc_html__('Dismiss this notice.','dtwebinar').'</span>'; echo '</button>'; echo '</div>'; } /** * Configure admin menu - First Set */ function dtwebinar_configure_admin_menu() { add_menu_page( esc_html__('DT Webinar', 'dtwebinar'), esc_html__('DT Webinar','dtwebinar'), 'manage_options', 'dtwebinar-google-classroom', '', 'dashicons-index-card', 6 ); } /** * Action Hooks */ public function dtwebinar_includes() { // Settings //require_once DTWEBINAR_PLUGIN_PATH . 'settings/settings.php'; } /** * Scan & Include Active Modules */ function dtwebinar_load_modules() { if(is_dir(DTWEBINAR_PLUGIN_MODULE_PATH)) { $dtwebinar_modules = scandir(DTWEBINAR_PLUGIN_MODULE_PATH); $dtwebinar_modules = array_diff($dtwebinar_modules, array('..', '.')); if(is_array($dtwebinar_modules) && !empty($dtwebinar_modules)) { rsort($dtwebinar_modules); // To extend search module class in elementor $this->active_modules = $dtwebinar_modules; foreach($dtwebinar_modules as $dtwebinar_module) { $module_path = DTWEBINAR_PLUGIN_MODULE_PATH . '/'.$dtwebinar_module.'/register-module.php'; if(file_exists($module_path)) { require_once $module_path; } } } } } /** * Theme support files include */ function dtwebinar_theme_support_includes() { switch ( get_template() ) { case 'elementor-fw': include_once DTWEBINAR_PLUGIN_PATH . 'theme-support/class-designthemes.php'; break; case 'lms': include_once DTWEBINAR_PLUGIN_PATH . 'theme-support/class-lms.php'; break; default: include_once DTWEBINAR_PLUGIN_PATH . 'theme-support/class-default.php'; break; } } } } if( !function_exists('dtdirectory_instance') ) { function dtdirectory_instance() { return DtWebinar::instance(); } } dtdirectory_instance(); ?>
Save