| Server IP : 37.27.51.148 / Your IP : 216.73.216.62 Web Server : nginx/1.14.1 System : Linux libra 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 20:24:04 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.3.31 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/404page/inc/ |
Upload File : |
<?php
/**
* The 404page classic editor plugin class
*
* @since 9
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* The classic editor plugin class
*/
if ( !class_exists( 'PP_404Page_ClassicEditor' ) ) {
class PP_404Page_ClassicEditor extends PPF09_SubClass {
/**
* Do Init
*
* @since 9
* @access public
*/
public function init() {
add_action( 'admin_head', array( $this, 'admin_style' ) );
}
/**
* Add Classic Editor Style to Header if currently edited page is a custom 404 error page
*
* @since 9
* @access public
*/
public function admin_style() {
// we just ignore whether Gutenberg is used or not, because this classes do not exist if Gutenberg is active
if ( get_current_screen()->id == 'page' && $this->settings()->get( 'page_id' ) > 0 ) {
global $post;
$all404pages = $this->core()->get_all_page_ids();
if ( in_array( $post->ID, $all404pages ) ) {
?>
<style type="text/css">
#post-body-content:before { content: "<?php esc_html_e( 'You are currently editing your custom 404 error page', '404page'); ?>"; background-color: #333; color: #FFF; padding: 8px; font-size: 16px; display: block; margin-bottom: 10px };
</style>
<?php
}
}
}
}
}