WordPress.org

Support

Support » Plugins and Hacks » The Events Calendar » [Resolved] How I replaced hyphen with en-dash in widget ranges

[Resolved] How I replaced hyphen with en-dash in widget ranges

  • Should one use a hyphen in a date range? Should one use an en-dash? It depends on the style guide that your organization has adopted. I use an en-dash, and so here’s how I quickly replaced the hyphens in the Events List widget with en-dashes. (I didn’t try to perform a substitution over the entire plugin.)

    1. Copy
      ./wp-content/plugins/the-events-calendar/views/widgets/list-widget.php
      to
      ./wp-content/themes/THEME_NAME/tribe-events/widgets
    2. Edit
      ./wp-content/themes/THEME_NAME/tribe-events/widgets
      and replace
      <?php echo tribe_events_event_schedule_details(); ?>
      with
      <?php echo str_replace('-', '&ndash;', tribe_events_event_schedule_details()); ?>

    References:
    http://en.wikipedia.org/wiki/Dash#Differing_recommendations and
    http://www.slvarc.org.

    https://wordpress.org/plugins/the-events-calendar/

Viewing 1 replies (of 1 total)
  • Plugin Author leahkoerper

    @leahkoerper

    Hi kerryveenstra,

    Thanks so much for posting your solution here! Hopefully that will be helpful for other folks.

    Cheers,
    Leah

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] How I replaced hyphen with en-dash in widget ranges’ is closed to new replies.
Skip to toolbar