PluginProbe
Hide/Remove Metadata / trunk
Hide/Remove Metadata vtrunk
trunk 1.0.0 1.0.1 1.1 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.1
hide-metadata / partials / dashboard-display.php

dashboard-display.php in Hide/Remove Metadata trunk, at partials/dashboard-display.php

95 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (! defined('ABSPATH')) {
4 exit; // Exit if accessed directly
5 }
6
7 /**
8 * Provide a admin area view for the plugin
9 *
10 * This file is used to markup the admin-facing aspects of the plugin.
11 *
12 * @link https://catchplugins.com/plugins/hide-metadata
13 * @since 1.0.0
14 *
15 * @package Hide_Metadata
16 * @subpackage Hide_Metadata/partials
17 */
18 ?>
19
20 <div id="hide-metadata">
21 <div class="content-wrapper">
22 <div class="header">
23 <h2><?php esc_html_e('Settings', 'hide-metadata'); ?></h2>
24 </div> <!-- .Header -->
25 <div class="content">
26 <?php if (isset($_GET['settings-updated'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- standard WordPress settings-updated flag; value is never used. ?>
27 <div id="message" class="notice updated fade">
28 <p><strong><?php esc_html_e('Plugin Options Saved.', 'hide-metadata'); ?></strong></p>
29 </div>
30 <?php } ?>
31 <?php
32 // Use nonce for verification.
33 wp_nonce_field(HIDE_METADATA_BASENAME, 'hide_metadata_nonce');
34 ?>
35 <div id="hide_metadata_main" class="hide-metadata-main">
36 <form method="post" action="options.php">
37 <?php settings_fields('hide-metadata-group'); ?>
38 <?php
39 $settings = hide_metadata_get_options(); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- template-scope variable inside a required partial.
40 ?>
41 <div class="option-container">
42 <table class="form-table" bgcolor="white">
43 <tbody>
44 <tr>
45 <th>
46 <?php esc_html_e('Hide By', 'hide-metadata'); ?>
47 </th>
48 <td>
49 <select name="hide_metadata_options[hide_by]" id="hide_metadata_options[hide_by]">
50 <option value="css" <?php echo selected($settings['hide_by'], 'css', false); ?>><?php esc_html_e('CSS', 'hide-metadata'); ?></option>
51 <option value="php" <?php echo selected($settings['hide_by'], 'php', false); ?>><?php esc_html_e('PHP', 'hide-metadata'); ?></option>
52 </select>
53 <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Whether you want to hide it with CSS only or you remove it from the Page/Code.', 'hide-metadata'); ?>"></span>
54 </td>
55 </tr>
56 <tr>
57 <th scope="row"><?php esc_html_e('Hide author', 'hide-metadata'); ?></th>
58 <td>
59 <div class="module-header <?php echo $settings['hide_author'] ? 'active' : 'inactive'; ?>">
60 <div class="switch">
61 <input type="checkbox" id="hide_metadata_options[hide_author]" value="1" name="hide_metadata_options[hide_author]" class="shm-input-switch" rel="hide_author" <?php checked(1, $settings['hide_author']); ?>>
62 <label for="hide_metadata_options[hide_author]"></label>
63 </div>
64 </div>
65 </td>
66 </tr>
67 <tr>
68 <th scope="row"><?php esc_html_e('Hide published date', 'hide-metadata'); ?></th>
69 <td>
70 <div class="module-header <?php echo $settings['hide_date'] ? 'active' : 'inactive'; ?>">
71 <div class="switch">
72 <input type="checkbox" id="hide_metadata_options[hide_date]" value="1" name="hide_metadata_options[hide_date]" class="shm-input-switch" rel="hide_date" <?php checked(1, $settings['hide_date']); ?>>
73 <label for="hide_metadata_options[hide_date]"></label>
74 </div>
75 </div>
76 </td>
77 </tr>
78 <tr>
79 <th scope="row"><?php esc_html_e('Reset Options', 'hide-metadata'); ?></th>
80 <td>
81 <?php
82 echo '<input name="hide_metadata_options[reset]" id="hide_metadata_options[reset]" type="checkbox" value="1" class="hide_metadata_options[reset]" />' . esc_html__('Check to reset', 'hide-metadata');
83 ?>
84 <span class="dashicons dashicons-info tooltip" title="<?php esc_html_e('Caution: Reset all settings to default.', 'hide-metadata'); ?>"></span>
85 </td>
86 </tr>
87 </tbody>
88 </table>
89 <?php submit_button(esc_html__('Save Changes', 'hide-metadata')); ?>
90 </div><!-- .option-container -->
91 </form>
92 </div><!-- sticky_main -->
93 </div><!-- .content -->
94 </div><!-- .content-wrapper -->
95 </div><!---hide-metadata-->