-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin-page.php
37 lines (22 loc) · 1008 Bytes
/
admin-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
<?php
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
// Include the Responsivity Tool API
require_once( dirname(__file__).'/viewer/responsivity-class.php' );
$responsivity = new ResponsivityTool();
?>
<div class="wrap">
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
<?php
$tool_url = plugin_dir_url( __FILE__ )."viewer/";
if ( get_page_by_path( 'responsivity' ) ) $tool_url = home_url("responsivity");
$responsivity->print_form($tool_url, "_blank");
?><br/>
<h2>Access</h2>
<form method="post" action="options.php" id="responsivity-ajax-option-save" enctype="multipart/form-data">
<?php settings_fields( 'responsivity_settings' ); ?>
<?php do_settings_sections( 'responsivity_settings' ); ?>
<label for="responsivity_public">
<input type="checkbox" id="responsivity_public" name="responsivity_public" value="true" <?=$this->responsivity_public ? "checked" : ""?>> Allow public access
</label><br/><br/><br/>
</form>
</div>