Skip to content

Commit

Permalink
Merge pull request #402 from Automattic/master
Browse files Browse the repository at this point in the history
Alpha release Sep 06
  • Loading branch information
dkoo authored Sep 6, 2023
2 parents d1737c4 + d4fcc33 commit 72aad6a
Show file tree
Hide file tree
Showing 5 changed files with 1,625 additions and 764 deletions.
95 changes: 49 additions & 46 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions includes/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public static function get_sections() {
'slug' => 'newspack_listings_meta_settings',
'title' => __( 'Post Meta Settings', 'newspack-listings' ),
],
'date' => [
'slug' => 'newspack_listings_event_date_settings',
'title' => __( 'Event Listings Date Settings', 'newspack-listings' ),
],
];

// Product settings are only relevant if WooCommerce is available.
Expand Down Expand Up @@ -189,6 +193,22 @@ public static function get_default_settings() {
'value' => false,
'section' => $sections['meta']['slug'],
],
[
'description' => __( 'The full date format used by the Events Listings. <a href="https://wordpress.org/documentation/article/customize-date-and-time-format/">Documentation on date and time formatting.</a>', 'newspack-listings' ),
'key' => 'newspack_listings_events_date_format',
'label' => __( 'Events date format', 'newpack-listings' ),
'type' => 'input',
'value' => get_option( 'date_format', 'F j, Y' ),
'section' => $sections['date']['slug'],
],
[
'description' => __( 'The time format used by the Events Listings.', 'newspack-listings' ),
'key' => 'newspack_listings_events_time_format',
'label' => __( 'Events time format', 'newpack-listings' ),
'type' => 'input',
'value' => get_option( 'time_format', 'g:i A' ),
'section' => $sections['date']['slug'],
],
];

// If Related Posts is on, show the setting to hide it.
Expand Down
Loading

0 comments on commit 72aad6a

Please sign in to comment.