Overview

Namespaces

  • EventPost
  • None

Classes

  • EventPost
  • EventPost_Cal
  • EventPost_List
  • EventPost_Map
  • EventPost_Search
  • EventPostWeather

Functions

  • event_post_format_color
  • event_post_get_all_terms
  • eventdetails_block_init
  • EventPost
  • eventpost_list_block_init
  • eventpost_timeline_block_init
  • eventscalendar_block_init
  • eventsmap_block_init
  • get_the_date_end
  • get_the_date_start
  • get_the_dates
  • get_the_location
  • the_date_end
  • the_date_start
  • the_dates
  • the_location
  • Overview
  • Namespace
  • Class

Class EventPost

The main class where everything begins.

Add calendar and/or geolocation metadata on posts

Package: event-post
Located at eventpost.php
Methods summary
public
# __construct( )
public
# EventPost( )

PHP4 constructor

PHP4 constructor

public
# init( )
public
# widgets_init( )

Init all variables when WP is ready

Init all variables when WP is ready

Action

evenpost_init

Filter

eventpost_default_list_shema
eventpost_list_shema
public
# register_widgets( )
public array
# hex2dec( string $color = '000000' )

Usefull hexadecimal to decimal converter. Returns an array of RGB from a given hexadecimal color.

Usefull hexadecimal to decimal converter. Returns an array of RGB from a given hexadecimal color.

Parameters

$color

Returns

array
$color($R, $G, $B)
public array
# get_thumbnail_sizes( )

Fetch all registered image sizes

Fetch all registered image sizes

Returns

array
public array
# get_settings( )

Get blog settings, load and saves default settings if needed. Can be filterred using

Get blog settings, load and saves default settings if needed. Can be filterred using

Returns

array

Example

<?php add_filter('eventpost_getsettings', 'some_function'); ?>

Action

eventpost_getsettings_action

Filter

eventpost_getsettings
public array
# custom_shema( array $shema )

Checks if HTML schemas are not empty

Checks if HTML schemas are not empty

Parameters

$shema

Returns

array
public array
# get_maps( )

Parse the maps.json file. Custom maps can be added by using the eventpost_getsettings filter like the following example:

Parse the maps.json file. Custom maps can be added by using the eventpost_getsettings filter like the following example:

<?php add_filter('eventpost_getsettings', 'map_function'); function map_function($maps){
array_push($maps, array( 'name'=>'Myt custom map', 'id'=>'custom_map', 'urls'=>array( 'http://a.customurl.org/{z}/{x}/{y}.png', 'http://b.customurl.org/{z}/{x}/{y}.png', 'http://c.customurl.org/{z}/{x}/{y}.png', )
));
return $maps; } ?>

Returns

array
of map arrays ['name', 'id', 'urls']

Filter

eventpost_maps
public array
# get_colors( )

Get colors

Get colors

Returns

array
public string
# get_post_color( integer $post_id, boolean $default = false, boolean $check_taxo = false )

Get color of a post

Get color of a post

Parameters

$post_id
$default
$check_taxo

Returns

string
color
public string|false
# get_post_icon( integer $post_id, boolean $default = false, boolean $check_taxo = false )

Get icon of a post

Get icon of a post

Parameters

$post_id
$default
$check_taxo

Returns

string|false
icon
public sring
# get_marker( string $color )

Get the URL of a marker

Get the URL of a marker

Parameters

$color

Returns

sring
public
# load_styles( $deps = null )

Enqueue CSS files

Enqueue CSS files

public
# editor_styles( )

Enqueue Editor style

Enqueue Editor style

public
# load_scripts( )

Enqueue JS files

Enqueue JS files

public
# load_map_scripts( )

Enqueue JS files for maps

Enqueue JS files for maps

public
# admin_head( )

Enqueue CSS files in admin

Enqueue CSS files in admin

public
# admin_scripts( $deps = array('jquery'), $force = false )

Enqueue JS files in admin

Enqueue JS files in admin

public
# scripts_edit( )
public
# get_rich_result( $event )
public
# wpseo_schema_webpage( $rich_result )
public
# get_theme_palette( $return = "hex" )
public
# single_header( )

Add custom header meta for single events

Add custom header meta for single events

public string
# date_cleanup( type $str )

Cleanups a date

Cleanups a date

Parameters

$str

Returns

string

Since

5.0.1
public boolean
# dateisvalid( string $str )

Checks if a date is valid or not

Checks if a date is valid or not

Parameters

$str

Returns

boolean
public string
# parsedate( string $date, string $sep = '' )

Parse a date from a string

Parse a date from a string

Parameters

$date
$sep

Returns

string
public string
# sanitize_coordinate( string $str )

Sanitize a coordinate string Only keeps, numbers, dots and commas

Sanitize a coordinate string Only keeps, numbers, dots and commas

Parameters

$str

Returns

string

Since

5.9.9
public type
# human_date( mixed $date, string $format = 'l j F Y' )

Format a date for humans

Format a date for humans

Parameters

$date
$format

Returns

type
public string
# delta_date( timestamp $time_start, timestamp $time_end )

Returns a range of dates

Returns a range of dates

Parameters

$time_start
$time_end

Returns

string
public string
# print_date( WP_Post $post = null, mixed $links = 'deprecated', $context = '' )

Displays a date

Displays a date

Parameters

$post
$post
$links
$context

Returns

string
public string
# print_location( WP_Post $post = null, $context = '' )

Outputs location of an event

Outputs location of an event

Parameters

$post
$post
$context

Returns

string
public float
# color_darkness( string $color )

Compute darkness of the color

Compute darkness of the color

Parameters

$color

Returns

float
public string
# print_categories( WP_Post $post = null, $context = '' )

Outputs categories of an event

Outputs categories of an event

Parameters

$post
$post
$context

Returns

string
public string
# get_single( WP_Post $post = null, string $class = '', $context = '' )

Generate, return or output date event datas

Generate, return or output date event datas

Parameters

$post
$post
$class
$context

Returns

string

Filter

eventpost_get_single
public string
# get_singledate( WP_Post $post = null, string $class = '', $context = '' )

Displays dates of a gieven post

Displays dates of a gieven post

Parameters

$post
$post
$class
$context

Returns

string
public string
# get_singlecat( WP_Post $post = null, string $class = '', $context = '' )

Displays coloured terms of a given post

Displays coloured terms of a given post

Parameters

$post
$post
$class
$context

Returns

string
public string
# get_singleloc( WP_Post $post = null, string $class = '', $context = '' )

Displays location of a given post

Displays location of a given post

Parameters

$post
$post
$class
$context

Returns

string
public string
# display_single( string $content )

Uses the_content filter to add event details before or after the content of the current post

Uses the_content filter to add event details before or after the content of the current post

Parameters

$content

Returns

string
public
# print_single( WP_Post $post = null )

Outputs events details (dates, geoloc, terms) of given post

Outputs events details (dates, geoloc, terms) of given post

Parameters

$post
$post
public string
# the_title( string $title, $post_id = null )

Alter the post title in order to add icons if needed

Alter the post title in order to add icons if needed

Parameters

$title
$post_id

Returns

string
public
# get_price( $event, $html = false )
public string
# list_events( array $atts, string $id = 'event_list', string $context = '' )

Return an HTML list of events

Return an HTML list of events

Parameters

$atts
$id
$context

Returns

string

Filter

eventpost_params($defaults, 'list_events')
eventpost_listevents
eventpost_item_scheme_entities
eventpost_item_scheme_values
public array
# get_events( array $atts )

Get events

Get events

Parameters

$atts

Returns

array
of post_ids which are events

Filter

eventpost_params
eventpost_get_items
public boolean
# is_future( object $event, boolean $exact = false )

Checks if the given event is in the future or not

Checks if the given event is in the future or not

Parameters

$event
$exact
Future status has to be calculated against time or entire day

Returns

boolean
public boolean
# is_past( object $event, boolean $exact = false )

Checks if the given event is completed or not

Checks if the given event is completed or not

Parameters

$event
$exact
Past status has to be calculated against time or entire day

Returns

boolean
public boolean
# is_online( $event )

Checks if an event is online

Checks if an event is online

Parameters

$event

Returns

boolean
public boolean
# is_offline( $event )

Checks if an event is offline

Checks if an event is offline

Parameters

$event

Returns

boolean
public object
# retreive( object $event = null )

Populates a WP_Post object with event datas

Populates a WP_Post object with event datas

Parameters

$event

Returns

object
public
# retreive_term( mixed $_term = null, string $taxonomy = 'category', string $post_type = 'post' )

Fetch terms of a post

Fetch terms of a post

Parameters

$_term
$taxonomy
$post_type
public
# add_custom_box( )

Add custom boxes in posts edit page

Add custom boxes in posts edit page

public
# inner_custom_box_date( )

Displays the date custom box

Displays the date custom box

public
# inner_custom_box_loc( $post )

Displays the location custom box

Displays the location custom box

public
# icon_color_fields( $item_id, $meta_color, $value_color, $meta_icon, $value_icon )
public
# quick_edit( string $column_name, boolean $post_type, $bulk = false )

Quick edit

Quick edit

Parameters

$column_name
$post_type
$bulk
$bulk
public string
# inline_field( type $fieldname, $bulk )

Inline field in bulk edit

Inline field in bulk edit

Parameters

$fieldname
$bulk

Returns

string
public
# inline_field_color( $html, $fieldname, $bulk )
public
# inline_field_icon( $html, $fieldname, $bulk )
public
# bulk_edit( type $column_name, type $post_type )

Bulk edit

Bulk edit

Parameters

$column_name
$post_type
public
# inline_save( )

Saves data from quick-edit via wp_ajax_inline-save action

Saves data from quick-edit via wp_ajax_inline-save action

public
# save_postdata( integer $post_id )

When the post is saved, saves our custom data

When the post is saved, saves our custom data

Parameters

$post_id
public
# save_bulkdatas( array $post_ids, array $shared_post_data )

Saves data from bulk-edit Uses bulk_edit_posts hook

Saves data from bulk-edit Uses bulk_edit_posts hook

See

https://developer.wordpress.org/reference/hooks/bulk_edit_posts/
public boolean
# display_caldate( string $date, string $cat = '', boolean $display = false, $colored = true, $thumbnail = '', $title = '', $tax_name = '' , $tax_term = '' )

Displays a date for calendar cell

Displays a date for calendar cell

Parameters

$date
$cat
$display
$colored
$thumbnail
$title
$tax_name
$tax_term

Returns

boolean
public string
# calendar( array $atts )

Returns a calendar HTML

Returns a calendar HTML

Parameters

$atts

Returns

string

Filter

eventpost_params
public
# ajaxlist( )

Echoes a list of event, should be called via AJAX

Echoes a list of event, should be called via AJAX

public
# ajaxTimeline( )

Echoes a list of event, should be called via AJAX

Echoes a list of event, should be called via AJAX

public
# ajaxGetNextPage( )

Echoes next page of events, should be called via AJAX

Echoes next page of events, should be called via AJAX

public
# ajaxcal( )

Echoes the content of the calendar in ajax context

Echoes the content of the calendar in ajax context

public
# ajaxdate( )

Echoes the date of the calendar in ajax context

Echoes the date of the calendar in ajax context

public
# HumanDate( )

Echoes a date in ajax context

Echoes a date in ajax context

public type
# search( type $atts )

Displays a search form

Displays a search form

Parameters

$atts

Returns

type
public
# GetLatLong( )

AJAX Get lat long from address

AJAX Get lat long from address

public array
# columns_head( array $defaults )

Alters columns

Alters columns

Parameters

$defaults

Returns

array

Filter

eventpost_columns_head
public
# columns_content( string $column_name, integer $post_id )

Echoes content of a row in a given column

Echoes content of a row in a given column

Parameters

$column_name
$post_id

Action

eventpost_columns_content
public
# column_edit_hidden_fields( $post_id, $set )
public array
# dashboard_right_now( array $elements )

Adds items to the native "right now" dashboard widget

Adds items to the native "right now" dashboard widget

Parameters

$elements

Returns

array
public string
# ics_date( timestamp $timestamp )

Get a date formatted for ICS

Get a date formatted for ICS

Parameters

$timestamp

Returns

string
public
# get_gmt_offset( )
public
# parse_request( )
public
# export( )
public
# feed( )

Outputs an ICS document

Outputs an ICS document

Properties summary
public array $version

The current version

The current version

# '5.9.2'
public string $META_START

The meta name for event start date

The meta name for event start date

# 'event_begin'
public string $META_END

The meta name for event end date

The meta name for event end date

# 'event_end'
public string $META_COLOR

The meta name for event color

The meta name for event color

# 'event_color'
public string $META_ICON

The meta name for event icon

The meta name for event icon

# 'event_icon'
public string $META_ADD

The meta name for event address

The meta name for event address

# 'geo_address'
public string $META_LAT

The meta name for event latitude

The meta name for event latitude

See

http://codex.wordpress.org/Geodata
# 'geo_latitude'
public string $META_LONG

The meta name for event longitude

The meta name for event longitude

See

http://codex.wordpress.org/Geodata
# 'geo_longitude'
public string $META_VIRTUAL_LOCATION

The meta name for event location

The meta name for event location

See

https://schema.org/location
# 'event_virtual_location'
public string $META_STATUS

The meta name for event status

The meta name for event status

See

https://schema.org/eventStatus
# 'event_status'
public string $META_ATTENDANCE_MODE

The meta name for event attendance mode

The meta name for event attendance mode

See

https://schema.org/eventAttendanceMode
# 'event_attendance_mode'
public integer $list_id

ID of the current list

ID of the current list

#
public array $NomDuMois

Month names

Month names

#
public array $Week

Week days

Week days

#
public string $dateformat

Date format

Date format

#
public string $plugin_path

Plugin path

Plugin path

#
public array $settings

Settings values

Settings values

#
public array $map_interactions

Map interractions (from openlayers)

Map interractions (from openlayers)

#
public array $quick_edit_fields

Fields supported by quick-edit

Fields supported by quick-edit

#
public array $bulk_edit_fields

Fields supported by bulk-edit

Fields supported by bulk-edit

#
public array $attendance_modes

Supported attendance modes

Supported attendance modes

#
public array $statuses

Supported statuses

Supported statuses

#
public string $default_list_shema

Default list schema (HTML template)

Default list schema (HTML template)

#
public string $default_timeline_shema

Default timeline schema (HTML template)

Default timeline schema (HTML template)

#
public string $list_shema

Current list schema (HTML template)

Current list schema (HTML template)

#
public string $timeline_shema

Current timeline schema (HTML template)

Current timeline schema (HTML template)

#
public array $maps

Map tiles

Map tiles

#
public string $markpath

Dirpath for map tiles

Dirpath for map tiles

#
public string $markurl

Base URL for map tiles

Base URL for map tiles

#
public EventPost\Taxonomies $Taxonomies

Taxonomies object

Taxonomies object

#
public EventPost\Icons $DashIcons

Icons object

Icons object

#
public EventPost\Settings $Settings

Settings object

Settings object

#
public EventPost\Shortcodes $Shortcodes

Shortcodes object

Shortcodes object

#
public array $kses_tags

Allowed tags in main outputs

Allowed tags in main outputs

#
API documentation generated by ApiGen