Initial Commit: first running version of the plugin
This commit is contained in:
49
templates/admin/settings-page.php
Normal file
49
templates/admin/settings-page.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<div class="wrap">
|
||||
<?php settings_errors();?>
|
||||
<form method="POST" action="options.php">
|
||||
<?php settings_fields( 'woo-out-of-office-page' ); ?>
|
||||
<?php do_settings_sections( 'woo-out-of-office-page' ); ?>
|
||||
<?php submit_button( ); ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
$woo_ooo_message = esc_attr(get_option( 'woo_ooo_message', '' ));
|
||||
$woo_ooo_title = esc_attr(get_option( 'woo_ooo_title', '' ));
|
||||
$woo_ooo_start_date = esc_attr(get_option( 'woo_ooo_start_date', '' ));
|
||||
$woo_ooo_end_date = esc_attr(get_option( 'woo_ooo_end_date', '' ));
|
||||
|
||||
$woo_ooo_message_compiled = woo_out_of_office_include_dates_in_message($woo_ooo_start_date, $woo_ooo_end_date, $woo_ooo_message);
|
||||
|
||||
//$woo_ooo_message_compiled = str_replace("[StartDate]", wp_date(get_option('date_format'), strtotime($woo_ooo_start_date)), $woo_ooo_message);
|
||||
//$woo_ooo_message_compiled = str_replace("[EndDate]", wp_date(get_option('date_format'), strtotime($woo_ooo_end_date)), $woo_ooo_message_compiled);
|
||||
|
||||
echo '<br>';
|
||||
if (woo_out_of_office_is_active()) {
|
||||
echo "Out of office is <b>ACTIVE</b>!";
|
||||
} else {
|
||||
echo "Out of office is <b>NOT</b> active!";
|
||||
}
|
||||
echo '<br>';
|
||||
|
||||
echo "The message will be displayed like this:";
|
||||
echo '<br>';
|
||||
|
||||
?>
|
||||
|
||||
<table id="add-vacation_info" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; margin-top: 20px; padding: 0; border= 2px solid black; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="text-align: left; border: 0; padding: 0;" valign="top">
|
||||
<hr>
|
||||
<h2>
|
||||
<?php esc_html_e( $woo_ooo_title ) ; ?>
|
||||
</h2>
|
||||
<hr style="border: 0; border-top: 1px solid #8c8c8c; border-bottom: 1px solid #fff;">
|
||||
<p>
|
||||
<?php echo ( wpautop($woo_ooo_message_compiled) ) ; ?>
|
||||
</p>
|
||||
<hr style="border: 0; border-top: 1px solid #8c8c8c; border-bottom: 1px solid #fff;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
Reference in New Issue
Block a user