Plugin Directory

Changeset 2586707


Ignore:
Timestamp:
08/22/2021 08:28:36 PM (4 years ago)
Author:
nikunjsoni
Message:

Tested and compatible with WordPress 5.8

Location:
filter-posts-by-date-range
Files:
21 added
3 edited

Legend:

Unmodified
Added
Removed
  • filter-posts-by-date-range/trunk/filter-posts-by-daterange.php

    r1916363 r2586707  
    2626    function FPBDR_form() {
    2727       
    28         $this_year      = date('Y');
    29         $this_year_text = 'yearRange: "'.$this_year - 50 .':'.$this_year.'"';
    30        
    3128        $FPBDR_DateFrom = sanitize_text_field( $_GET['FPBDR_DateFrom'] );
    3229        $FPBDR_DateTo   = sanitize_text_field( $_GET['FPBDR_DateTo'] );
     
    4643        }
    4744        </style>
    48  
     45
    4946        <input autocomplete="off" type="text" name="FPBDR_DateFrom" placeholder="Date From" value="' . $from . '" />
    5047        <input autocomplete="off" type="text" name="FPBDR_DateTo" placeholder="Date To" value="' . $to . '" />
    51  
     48
    5249        <script>
    5350        jQuery( function($) {
    5451            var from = $(\'input[name="FPBDR_DateFrom"]\'),
    55                 to = $(\'input[name="FPBDR_DateTo"]\');
    56  
     52                to = $(\'input[name="FPBDR_DateTo"]\');
     53
    5754            $( \'input[name="FPBDR_DateFrom"], input[name="FPBDR_DateTo"]\' ).datepicker({ changeMonth: true, changeYear: true, yearRange: "-15:+0",});
    58             // by default, the dates look like this "April 3, 2017" but you can use any strtotime()-acceptable date format
    59                 // to make it 2017-04-03, add this - datepicker({dateFormat : "yy-mm-dd"});
    60  
    61  
    62                 // the rest part of the script prevents from choosing incorrect date interval
    63                 from.on( \'change\', function() {
     55                // by default, the dates look like this "April 3, 2017" but you can use any strtotime()-acceptable date format
     56                // to make it 2017-04-03, add this - datepicker({dateFormat : "yy-mm-dd"});
     57
     58                // the rest part of the script prevents from choosing incorrect date interval
     59                from.on( \'change\', function() {
    6460                to.datepicker( \'option\', \'minDate\', from.val() );
    6561            });
    66  
     62
    6763            to.on( \'change\', function() {
    6864                from.datepicker( \'option\', \'maxDate\', to.val() );
    6965            });
    70  
     66
    7167        });
    72         </script>';
     68        </script>
     69        ';
    7370 
    7471    }
  • filter-posts-by-date-range/trunk/index.php

    r2163971 r2586707  
    22/*
    33Plugin Name: Filter Posts By Date Range
    4 Plugin URI: http://www.nikunjsoni.co.in/
     4Plugin URI: #
    55Description: Filter your WordPress posts by date range
    6 Version: 1.2
     6Version: 1.3
    77Author: Nikunj Soni
    8 Author URI: https://profiles.wordpress.org/nikunjsoni
     8Author URI: #
    99*/
    1010
    11 if ( ! defined( 'ABSPATH' ) ) {
     11if (!defined('ABSPATH')) {
    1212    exit; // Exit if accessed this file directly
    1313}
    1414
    15 if ( ! defined( 'FPBDR_PLUGIN_URL' ) ) {
    16    
     15if (!defined('FPBDR_PLUGIN_URL')) {
    1716    // define the url of this plugin
    1817    $FPBDR_plugins_url = plugin_dir_url( __FILE__ );
    19     define( FPBDR_PLUGIN_URL , $FPBDR_plugins_url );
     18    define('FPBDR_PLUGIN_URL', $FPBDR_plugins_url );
    2019}
    2120
  • filter-posts-by-date-range/trunk/readme.txt

    r2163972 r2586707  
    33Tags: posts,filter,date,daterange,wp,wordpress,wp-admin,admin,plugin
    44Requires at least: 3.7
    5 Tested up to: 5.2.3
    6 Requires PHP: 5.5.12
    7 Stable tag: 1.2
     5Tested up to: 5.8
     6Requires PHP: 7.1
     7Stable tag: 1.3
    88License: GPLv2
    99
     
    2929== Changelog ==
    3030
     31= 1.3 =
     32Tested and compatible with WordPress 5.8
     33
    3134= 1.2 =
    3235Tested and compatible with WordPress 5.2.3
     
    4043== Upgrade Notice ==
    4144
     45= 1.3 =
     46Tested and compatible with WordPress 5.8
     47
    4248= 1.2 =
    4349Tested and compatible with WordPress 5.2.3
Note: See TracChangeset for help on using the changeset viewer.