-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
43 lines (37 loc) · 936 Bytes
/
page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
// Exits if accessed directly.
if ( ! defined( 'ABSPATH' ) ) exit;
?>
<div class="ymfo-page-header">
<div class="wrap">
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
</div>
</div>
<div class="wrap">
<?php
if ( get_current_screen()->parent_base !== 'options-general' ) {
settings_errors();
}
?>
</div>
<div class="ymfo-page-content">
<div class="wrap">
<?php
$ymfo_form_action = 'options.php';
if ( $this->page_args[ 'in_network' ] ) {
$ymfo_form_action = "edit.php?action={$this->page_slug}";
}
?>
<form action="<?php echo esc_attr( $ymfo_form_action ); ?>" method="POST" class="ymfo-page-content__options-form">
<?php
if ( $this->page_args[ 'in_network' ] ) {
wp_nonce_field( 'ymfo_network_nonce' );
} else {
settings_fields( $this->page_slug );
}
do_settings_sections( $this->page_slug );
submit_button();
?>
</form>
</div>
</div>