コード例 #1
0
<div class="wrap">
	<h2 class='opt-title'><span id='icon-options-general' class='analytics-options'><img src="<?php 
echo plugins_url('wp-analytify/images/wp-analytics-logo.png');
?>
" alt=""></span>
		<?php 
echo __('Analytify Settings', 'wp-analytify');
?>
	</h2>

	<?php 
if (isset($update_message)) {
    echo $update_message;
}
if (isset($_GET['tab'])) {
    $wp_analytify->pa_settings_tabs($_GET['tab']);
} else {
    $wp_analytify->pa_settings_tabs('authentication');
}
if (isset($_GET['tab'])) {
    $tab = $_GET['tab'];
} else {
    $tab = 'authentication';
}
// Authentication Tab section
if ($tab == 'authentication') {
    ?>

		<form action="<?php 
    echo str_replace('%7E', '~', $_SERVER['REQUEST_URI']);
    ?>
コード例 #2
0
	<h2 class='opt-title'><span id='icon-options-general' class='analytics-options'><img src="<?php 
echo esc_url(plugins_url('images/wp-analytics-logo.png', dirname(__FILE__)));
?>
" alt=""></span>
		<?php 
esc_html_e('Analytify Settings', 'wp-analytify');
?>
    </h2>

	<?php 
if (isset($update_message)) {
    echo '<div id="setting-error-settings_updated" class="updated notice is-dismissible settings-error below-h2"><p>' . esc_html($update_message) . '</p></div>';
}
$current_tab = filter_input(INPUT_GET, 'tab');
if ($current_tab) {
    $wp_analytify->pa_settings_tabs($current_tab);
} else {
    $wp_analytify->pa_settings_tabs('authentication');
}
if (isset($current_tab)) {
    $tab = $current_tab;
} else {
    $tab = 'authentication';
}
// Authentication Tab section.
if ('authentication' === $tab) {
    ?>

			<form action="" method="post" name="settings_form" id="settings_form">
            <?php 
    wp_nonce_field('logout_tab_action', 'logout_tab_nonce');