Skip to main content

GravityKit\GravityMigrate\EntriesDateRangePicker

Puts Query Filters' date range picker on the settings page for the wizard to mount.

Query Filters is vendored as a composer library rather than depended on as a plugin, so nothing here requires another plugin to be active. Strauss prefixes the PHP and only the PHP: the JavaScript bundle registers under one un-prefixed handle shared by every GravityKit product on the site, and the newest vendored copy wins it.

Since: %ver%

Source: src/EntriesDateRangePicker.php:22

Details

  • Kind: class
  • Namespace: GravityKit\GravityMigrate

Methods

MethodDescription
enqueue()Registers and enqueues the picker bundle for the current request.
meta()The configuration handed to Query Filters.
segment_order()The order Query Filters should show the day, month and year segments in.

Method Reference

enqueue()

public static function enqueue(): void

Registers and enqueues the picker bundle for the current request.

Returns

  • void

Since: %ver%

Source: src/EntriesDateRangePicker.php:55

meta()

public static function meta( string $today, string $wp_date_format ): array

The configuration handed to Query Filters.

Parameters

NameTypeDefaultDescription
$todaystringToday, in Y-m-d, in the site's timezone.
$wp_date_formatstringThe site's date format option, e.g. 'F j, Y'.

Returns

  • array — The meta array for QueryFilters::enqueue_date_range_picker().

Since: %ver%

Source: src/EntriesDateRangePicker.php:74

segment_order()

public static function segment_order( string $wp_date_format ): string

The order Query Filters should show the day, month and year segments in.

Only the order is read, never the separator: a WordPress date format carries literal text that a segmented input has no equivalent for.

Parameters

NameTypeDefaultDescription
$wp_date_formatstringThe site's date format option.

Returns

  • string — One of mdy, dmy, ymd.

Since: %ver%

Source: src/EntriesDateRangePicker.php:96