Calendar Grid Functions

Display functions for use in WordPress templates.

Calendar Grid (Display)

tribe_calendar_grid()

Display the full size grid calendar table

Returns

  • void

More Info

  • since: 2.0
  • uses: load_template()

Calendar Mini Grid (Display)

tribe_calendar_mini_grid()

Displays the mini grid calendar table (usually in a widget)

Returns

  • void

More Info

  • since: 2.0
  • uses: load_template()

Current Month Text

tribe_get_current_month_text()

Returns a textual description of the current month

Returns

  • string

More Info

  • return: Name of the current month.
  • since: 2.0

Current Month Date

tribe_get_displayed_month()

Returns a formatted date string of the currently displayed month (in "jump to month" mode)

Returns

  • string

More Info

  • return: Name of the displayed month.
  • since: 2.0

Drop Menu Post Link

tribe_get_dropdown_link_prefix()

Returns the URL where the jump menu sends the month/year request.

Returns

  • string

More Info

  • return: URL
  • since: 2.0

Gridview Date

tribe_get_month_view_date()

Get current calendar gridview date

Returns

  • string

More Info

  • return: Date currently queried
  • since: 2.0

Link to Next Month

tribe_get_next_month_link()

Returns a link to the next month’s events page. Used in the grid view.

Returns

  • string

More Info

  • return: URL
  • since: 2.0

Next Month Text

tribe_get_next_month_text()

Returns a textual description of the next month

Returns

  • string

More Info

  • return: Name of the next month.
  • since: 2.0

Link to Previous Month

tribe_get_previous_month_link()

Returns a link to the previous month’s events page. Used in the grid view.

Returns

  • string

More Info

  • return: URL
  • since: 2.0

Previous Month Text

tribe_get_previous_month_text()

Returns a textual description of the previous month

Returns

  • string

More Info

  • return: Name of the previous month.
  • since: 2.0

Link to This Month

tribe_get_this_month_link()

Returns a link to the currently displayed month (if in "jump to month" mode)

Returns

  • string

More Info

  • return: URL
  • since: 2.0

Grid View Test

tribe_is_month()

Returns true if the query is set for grid display (as opposed to Upcoming / Past)

Returns

  • bool

More Info

  • since: 2.0

Month / Year Dropdown Selector (Display)

tribe_month_year_dropdowns([string $prefix = ''])

Display the year & month dropdowns. JavaScript in the resources/events-admin.js file will autosubmit on the change event.

Parameters

  • string
    $prefix: A prefix to add to the ID of the calendar elements. This allows you to reuse the calendar on the same page.

Returns

  • void

More Info

  • since: 2.0

Sort Events by Day

tribe_sort_by_month(array $results, string $date)

Maps events to days of the month.

Parameters

  • array
    $results: Array of events from tribe_get_events()
  • string
    $date

Returns

  • array

More Info

  • return: Days of the month with events as values
  • since: 2.0


Modern Tribe Newsletter

Insight, Discounts & Notices for People Who Kick Ass..