File manager - Edit - /home/verseaumee/TF89388/wp-content/themes/noisa/admin/admin-init.php
Back
<?php /** * Theme Name: Noisa * Theme Author: Mariusz Rek - Rascals Themes * Theme URI: http://rascalsthemes.com/noisa * Author URI: http://rascalsthemes.com * File: admin-init.php * @package noisa * @since 1.0.0 */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } /* ================================================== Add admin pages to the wp-admin menu on the left ================================================== */ /* Main page -------------------------------- */ function noisa_register_admin_pages() { add_theme_page( esc_html__( 'Noisa', 'noisa' ), esc_html__( 'Noisa', 'noisa' ), 'edit_theme_options', 'admin-welcome', 'noisa_admin_page_welcome'); } add_action('admin_menu', 'noisa_register_admin_pages', 1 ); /** * Render admin pages header * @version 1.1.0 * @return void */ function noisa_admin_page_header() { $pages = array( array( 'title' => esc_html__( 'Welcome', 'noisa' ), 'title_attr' => esc_html__( 'Welcome', 'noisa' ), 'id' => 'admin-welcome' ), array( 'title' => esc_html__( 'System Status', 'noisa' ), 'title_attr' => esc_html__( 'Please install Noisa Toolkit plugin to activate this tab.', 'noisa' ), 'id' => 'inactive' ), array( 'title' => esc_html__( 'Theme Plugins', 'noisa' ), 'title_attr' => esc_html__( 'Theme Plugins', 'noisa' ), 'id' => 'admin-plugins' ), array( 'title' => esc_html__( 'Install Demos', 'noisa' ), 'title_attr' => esc_html__( 'Please install Noisa Toolkit plugin to activate this tab.', 'noisa' ), 'id' => 'inactive' ), array( 'title' => esc_html__( 'Customize', 'noisa' ), 'title_attr' => esc_html__( 'Please install Noisa Toolkit and Kirki Customizer plugins to activate this tab.', 'noisa' ), 'id' => 'inactive' ), array( 'title' => esc_html__( 'Theme Panel', 'noisa' ), 'title_attr' => esc_html__( 'Theme Panel', 'noisa' ), 'id' => 'theme-panel' ) ); if ( has_filter( 'rascals_admin_menu' ) ) { $pages = apply_filters( 'rascals_admin_menu', $pages ); } $page_link = 'admin.php?page='; $theme = wp_get_theme(); ?> <h3 class="rascals-theme-name"><?php echo esc_html( $theme->get( 'Name' ) ); ?><span class="rascals-version"> v <?php echo esc_html( $theme->get( 'Version' ) ); ?></span></h3> <div class="wrap about-wrap rascals-admin-header"> <h2 class="nav-tab-wrapper"> <?php foreach ( $pages as $mp_page ) { $extra_classes = ''; $title_attr = $mp_page['title_attr']; /* Redirect */ if ( $mp_page['id'] === 'inactive' ) { $page_link = '#'; $extra_classes .= ' inactive'; } else if ( strpos( $mp_page['id'], '.php' ) !== false ) { $page_link = $mp_page['id']; } else { $page_link = 'admin.php?page=' . esc_attr( $mp_page['id'] ); } if ( isset( $_GET['page'] ) && ( $_GET['page'] === $mp_page['id'] ) ) { $extra_classes .= ' nav-tab-active'; } ?> <a href="<?php echo esc_url( $page_link ) ?>" title="<?php echo esc_attr( $title_attr ) ?>" class="nav-tab rascals-nav-tab <?php echo esc_attr( $extra_classes ); ?> "><?php echo esc_html( $mp_page['title'] ) ?></a> <?php } ?> </h2> </div> <?php } /* ================================================== Admin Notices ================================================== */ if ( ! function_exists( 'noisa_admin_notices' ) ) : function noisa_admin_notices() { $theme = wp_get_theme(); $theme->get( 'Version' ); return; $output = '<div class="rascals-admin-notice warning"><p>'; $output .= esc_html__( 'Please note! The current version of Noisa is created from scratch. Please deactivate old Noisa Extensions plugin and remove it from WordPress because it will no longer be required. The new required plug-in is called Noisa Toolki and must be installed. Also we changed the Customizator now please install the Kirki plugin which is located in the plugins sections. Open it and save settings again. If your widgets disappear, find them in the "Inactive Widgets" pane and re-add them into the sidebar(s) of the theme. These changes are necessary to meet the latest ThemeForest requirements. We apologize for the inconvenience if you have any problems, please contact us immediately.', 'noisa' ); $output .= '</p></div>'; return $output; } endif; /* ================================================== Admin Scripts ================================================== */ function noisa_admin_scripts() { wp_enqueue_style( 'rascals-admin-pages', get_template_directory_uri() . '/admin/assets/css/admin-page.css' ); } add_action( 'admin_enqueue_scripts', 'noisa_admin_scripts' ); /* ================================================== Welcome Page ================================================== */ function noisa_admin_page_welcome() { require_once( 'admin-welcome.php' ); } /* ================================================== Plugins Page ================================================== */ require_once( 'admin-plugins.php' ); /* ================================================== Theme Panel ================================================== */ if ( ! class_exists( 'RascalsThemePanel' ) ) { /* Load Theme panel class */ require_once( trailingslashit( get_template_directory() ) . 'admin/classes/class-rascals-panel.php' ); /* Init Panel */ require_once( trailingslashit( get_template_directory() ) . 'admin/panel-options.php' ); }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings