%PDF- %PDF-
| Direktori : /dom405686/wp-content/plugins/pws-core/admin/partials/ |
| Current File : /dom405686/wp-content/plugins/pws-core/admin/partials/GD-cORe-admin-home.php |
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Provide a admin area view for the plugin
*
* This file is used to markup the admin-facing aspects of the plugin.
*
* @since 3.0.0
*
* @package GD_cORe
* @subpackage GD_cORe/admin/partials
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'partials/form_handlers/GD-cORe-admin-home-forms.php';
$settings = new GD_cORe\handlers\Settings();
$mwp_actions = new GD_cORe\handlers\MWP();
$base_actions = new GD_cORe\handlers\Base_Function();
$plugin_actions = new GD_cORe\handlers\Plugins();
$current_user = wp_get_current_user();
$settings->load_wpmudevtoken();
include_once 'GD-cORe-admin-actionLoader.php';
?>
<div class = 'core-main'> <!--start main layout-->
<h1>Dashboard</h1>
<span class = 'error-notice'>
<?php
if ( isset( $error ) ) {
echo htmlentities( $error, ENT_QUOTES, 'utf-8' );
}
?>
</span>
<div class = 'core-dash'> <!--start core dashboard layout-->
<div class = 'dash-sec'> <!--start dash section-->
<div class = 'dash-box'> <!--start dash box-->
<div class = 'box-title'>
<h3>Plugin Settings</h3>
</div>
<div class = 'box-info'>
<div class = 'box-info-row'>
<span class = 'dash-label'>Plugin Version:</span> [ <?php echo GD_cORe_VERSION;
?> ]
</div>
<div class = 'box-info-row'>
<span class = 'dash-label'>Plugin Status:</span> [Setup]
</div>
</div>
</div> <!--end dash box-->
<div class = 'dash-box'>
<div class = 'box-title'>
<h3>Tools</h3>
</div>
<div class = 'box-info'>
<div class = 'box-info-row'>
<span class = 'dash-label'>Refresh WPMUDEV Token</span>
<form action = '' method = 'POST'>
<?php wp_nonce_field( 'gd_core_home_action' ); ?>
<input type = 'hidden' name = 'wpmudev-refresh' value = '1' />
<button class = 'plugin-btn' data-id = 'action-button'>Refresh</button>
</form>
</div>
<div class = 'box-info-row'>
<span class = 'dash-label'>Flush All Cache ( MWP and Beaver Builder )</span>
<form action = '' method = 'POST'>
<?php wp_nonce_field( 'gd_core_home_action' ); ?>
<input type = 'hidden' name = 'all-cache' value = '1' />
<button class = 'plugin-btn' data-id = 'action-button'>Flush</button>
</form>
</div>
<?php
if ( $current_user->user_login === 'pwsbuilder' ) {
?>
<div class = 'box-info-row'>
<span class = 'dash-label'>cORe Reset</span>
<a href = "<?php echo $base_actions::PLUGIN_MAIN;?>&core-reset" class = 'linkBtn' data-id = 'action-button'>Reset</a>
</div>
<?php
}
?>
</div>
</div>
<div class = 'dash-box'> <!--start dash box-->
<div class = 'box-title'>
<h3>Website Settings</h3>
</div>
<div class = 'box-info'>
<div class = 'box-info-row'>
<?php
$active_theme = wp_get_theme();
$active_name = $active_theme->get( 'Name' );
?>
<span class = 'dash-label'>Active Theme:</span> [ <?php echo $active_name;
?> ]
</div>
<div class = 'box-info-row'>
<label class = 'dash-label'>Active Plugins:</label> [ <?php echo sizeof( get_option( 'active_plugins' ) ). '/' . sizeof( get_plugins() );
?> ]
</div>
<div class = 'box-info-row'>
<span class = 'dash-label'>WP Debug Status:</span> [ <?php echo WP_DEBUG ? 'Enabled' : 'Disabled';
?> ]
</div>
<div class = 'box-info-row'>
<span class = 'dash-label'>MWP CDN:</span> [ <?php echo $mwp_actions->isCDN();
?> ]
</div>
<div class = 'box-info-row'>
<span class = 'dash-label'>PHP Version:</span> [ <?php echo phpversion();
?> ]
</div>
<div class = 'box-info-row'>
<span class = 'dash-label tooltip'>
<span class = 'tooltiptext'>
<?php
$ini_exists = file_exists( get_home_path() . '.user.ini' );
echo $ini_exists ? get_home_path() . '.user.ini' : 'None';
?></span>
User INI:
</span>
[ <?php echo $ini_exists ? 'Enabled' : 'Disabled';
?> ]
</div>
<div class = 'box-info-row'>
<span class = 'dash-label'>PHP Memory Limit</span>
[ <?php echo ini_get( 'memory_limit' );
?> ]
</div>
</div>
</div> <!--end dash box-->
<div class = 'dash-box'> <!--start dash box-->
<div class = 'box-title'>
<h3>Unsupported Plugins</h3>
</div>
<div class = 'box-info'>
<?php
foreach ( $plugin_actions->plugin_review() as $unapproved_plugin ) {
$plugin_status = $plugin_actions->check_plugin_status( $unapproved_plugin );
?>
<div class = 'box-info-row'>
<span class = 'dash-label'><?php echo $unapproved_plugin;
?></span>
<?php
if ( $plugin_status[0] === 1 ) {
?>
<form action = '' method = 'POST'>
<?php wp_nonce_field( 'gd_core_home_action' ); ?>
<input type = 'hidden' name = 'plugin-path' value = "<?php echo $plugin_status[1];?>"/>
<button class = 'plugin-btn' data-id = 'action-button'>Disable</button>
</form>
<?php
} else {
echo 'Deactivated';
}
?>
</div>
<?php
}
?>
</div>
</div> <!--end dash box-->
</div> <!--end dash section-->
</div> <!--end core dashboard layout-->
</div> <!--end main layout-->