OwlCyberSecurity - MANAGER
Edit File: install-plugins.php
<?php /** * edura Dashboard Install Plugins Page * * @package edura */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } $edura_my_theme = wp_get_theme(); if ( $edura_my_theme->parent_theme ) { $edura_my_theme = wp_get_theme( basename( get_template_directory() ) ); } ?> <div class="wrap about-wrap et-admin-wrap"> <div class="et-header"> <h1><?php echo esc_html__( 'Welcome to ', 'edura' ) . esc_html( $edura_my_theme->Name ); ?> <?php printf( esc_html__( 'V%s', 'edura' ), esc_html( $edura_my_theme->Version ) ); ?></h1> <div class="about-text"><?php echo esc_html( $edura_my_theme->Name ) . esc_html__( ' is now installed and ready to use!', 'edura' ); ?></div> </div> <h2 class="nav-tab-wrapper wp-clearfix"> <a class="nav-tab" href="<?php echo esc_url( self_admin_url( 'admin.php?page=edura-dashboard' ) ); ?>"><?php esc_html_e( 'Dashboard', 'edura' ); ?></a> <a class="nav-tab nav-tab-active" href="<?php echo esc_url( self_admin_url( 'admin.php?page=edura-admin-plugins' ) ); ?>"><?php esc_html_e( 'Install Plugins', 'edura' ); ?></a> <a class="nav-tab" href="<?php echo esc_url( self_admin_url( 'themes.php?page=edura-demo-import' ) ); ?>"><?php esc_html_e( 'Demo Importer', 'edura' ); ?></a> </h2> <?php if ( isset($_POST['lms']) ) { echo "<meta http-equiv='refresh' content='0'>"; update_option('et_lms_plugin_name', $_POST['lms'], 'yes'); } $lms = get_option( 'et_lms_plugin_name' ); if($lms): update_option('et_selected_lms_plugin', $lms, 'yes'); else: update_option('et_selected_lms_plugin', 'learnpress', 'yes'); endif; ?> <form action="" method="post" id="et-lms-check" class="et-theme-register-form"> <div class="lms-plugin"> <h3><?php echo esc_html__('Please select the LMS plugin which you want to use.', 'edura'); ?></h3> <ul> <li> <input type="radio" id="tutor" name="lms" value="tutor" <?php if($lms == 'tutor'): ?>checked<?php endif; ?>> <label for="tutor"><?php echo esc_html__('Tutor LMS', 'edura'); ?></label> </li> <li> <input type="radio" id="learnpress" name="lms" value="learnpress" <?php if($lms == 'learnpress'): ?>checked<?php endif; ?>> <label for="learnpress"><?php echo esc_html__('LearnPress', 'edura'); ?></label> </li> <!-- --> </ul> </div> <input type="submit" class="et-lms-btn" value='Save'> </form> <div id="edura-dashboard" class="wrap about-wrap"> <div class="welcome-content w-clearfix extra"> <div class="edura-plugins edura-theme-browser-wrap"> <div class="theme-browser rendered"> <div class="whi-install-plugins-wrap"> <h3><?php echo esc_html__( 'These below plugins are required', 'edura' ); ?></h3> </div> <div class="edura-plugins-wrap edura-plugins"> <?php $tgmpa_list_table = new TGMPA_List_Table(); $plugins = TGM_Plugin_Activation::$instance->plugins; foreach ( $plugins as $plugin ) : $plugin_status = ''; $plugin['type'] = isset( $plugin['type'] ) ? $plugin['type'] : 'recommended'; $plugin['sanitized_plugin'] = $plugin['name']; $plugin_action = $tgmpa_list_table->actions_plugin( $plugin ); if ( strpos( $plugin_action, 'deactivate' ) !== false ) { $plugin_status = 'active'; $plugin_action = '<div class="row-actions visible active"><span class="activate"><a class="button edura-admin-btn">' . esc_html__( 'Activated', 'edura' ) . '</a></span></div>'; } ?> <div class="edura-plugin wp-clearfix <?php echo esc_attr( $plugin_status ); ?>" data-plugin-name="<?php echo esc_html( $plugin['name'] ); ?>"> <h4><?php echo esc_html( $plugin['name'] ); ?></h4> <?php echo '' . $plugin_action; ?> </div> <?php endforeach; ?> </div> </div> </div> </div> </div> </div> <!-- end wrap -->