PHP Classes

File: templates/admin-page.php

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Decagon WordPress Custom Todo List Plugin   templates/admin-page.php   Download  
File: templates/admin-page.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Decagon WordPress Custom Todo List Plugin
WordPress plugin to add to-do lists to site pages
Author: By
Last change:
Date: 2 years ago
Size: 1,073 bytes
 

Contents

Class file image Download
<?php
//add security
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
//convert to 1970-01-01 from $duedate
if(strpos($duedate, '/') !== false) {
   
$duedate = str_replace('/', '-', $duedate);
   
$date = date('Y-m-d', strtotime($duedate));
}else{
   
$date = date('Y-m-d', strtotime($duedate));
}
?>

<p>
    <label for="duedate">
        <?php _e( 'Due Date', 'decagon-todo' ); ?> <br>
        <input type="date" name="duedate" id="duedate" value="<?php echo $date; ?>">
    </label>
</p>
<p>
    <label for="status">
        <?php _e( 'Status', 'decagon-todo' ); ?> <br>
        <select name="decagon_status" id="status">
            <option value="new" <?php selected( $status, 'new' ); ?>><?php _e( 'New', 'decagon-todo' ); ?></option>
            <option value="cancelled" <?php selected( $status, 'cancelled' ); ?>>
                <?php _e( 'Cancelled', 'decagon-todo' ); ?></option>
            <option value="completed" <?php selected( $status, 'completed' ); ?>>
                <?php _e( 'Completed', 'decagon-todo' ); ?></option>
    </label>
</p>