/** * Generates the header for admin pages * * @param bool $form Whether or not the form start tag should be included. * @param string $option The short name of the option to use for the current page. * @param bool $contains_files Whether the form should allow for file uploads. * @param bool $option_long_name */ public function admin_header($form = true, $option = 'wpseo', $contains_files = false, $option_long_name = false) { if (!$option_long_name) { $option_long_name = YMBESEO_Options::get_group_name($option); } ?> <div class="wrap wpseo-admin-page page-<?php echo $option; ?> "> <?php /** * Display the updated/error messages * Only needed as our settings page is not under options, otherwise it will automatically be included * @see settings_errors() */ require_once ABSPATH . 'wp-admin/options-head.php'; ?> <h2 id="wpseo-title"><?php echo esc_html(get_admin_page_title()); ?> </h2> <div class="YMBESEO_content_wrapper"> <div class="YMBESEO_content_cell" id="YMBESEO_content_top"> <?php if ($form === true) { $enctype = $contains_files ? ' enctype="multipart/form-data"' : ''; echo '<form action="' . esc_url(admin_url('options.php')) . '" method="post" id="wpseo-conf"' . $enctype . ' accept-charset="' . esc_attr(get_bloginfo('charset')) . '">'; settings_fields($option_long_name); } $this->set_option($option); }