EventPost

The main class where everything begins. Add calendar and/or geolocation metadata on posts
Methods Summary
public
public
# EventPost( )
PHP4 constructor
public
# init( )
Init all variables when WP is ready

action


filter


filter


public
public
# hex2dec( string $color = '000000' )
Usefull hexadecimal to decimal converter. Returns an array of RGB from a given hexadecimal color.
public
# get_thumbnail_sizes( )
Fetch all registered image sizes

global


public
# get_settings( )
Get blog settings, load and saves default settings if needed. Can be filterred using `<?php add_filter('eventpost_getsettings', 'some_function'); ?>`

action


filter


public
# custom_shema( array $shema )
Checks if HTML schemas are not empty
public
# get_maps( )
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; } ?> ```

filter


public
public
# get_marker( string $color )
public
# load_styles( )
Enqueue CSS files
public
# editor_styles( )
Enqueue Editor style
public
# load_scripts( $deps = array ( 0 => 'jquery', ) )
Enqueue JS files
public
# load_map_scripts( )
Enqueue JS files for maps
public
# admin_head( )
Enqueue CSS files in admin
public
# admin_scripts( $deps = array ( 0 => 'jquery', ), $force = false )
Enqueue JS files in admin
public
public
# single_header( )
Add custom header meta for single events
public
# date_cleanup( \type $str )

since


public
# dateisvalid( string $str )
public
# parsedate( string $date , string $sep = '' )
public
# human_date( mixed $date , string $format = 'l j F Y' )
public
# delta_date( \timestamp $time_start , \timestamp $time_end )
public
# print_date( \WP_Post $post = NULL, mixed $links = 'deprecated', $context = '' )
public
# print_location( \WP_Post $post = NULL, $context = '' )
public
# print_categories( \WP_Post $post = NULL, $context = '' )
public
# get_single( \WP_Post $post = NULL, string $class = '', $context = '' )
Generate, return or output date event datas

filter


public
# get_singledate( \WP_Post $post = NULL, string $class = '', $context = '' )
Displays dates of a gieven post
public
# get_singlecat( \WP_Post $post = NULL, string $class = '', $context = '' )
Displays coloured terms of a given post
public
# get_singleloc( \WP_Post $post = NULL, string $class = '', $context = '' )
Displays location of a given post
public
# display_single( string $content )
Uses `the_content` filter to add event details before or after the content of the current post
public
# print_single( \WP_Post $post = NULL )
Outputs events details (dates, geoloc, terms) of given post

echoes


public
# the_title( string $title , $post_id = NULL )
Alter the post title in order to add icons if needed
public
# list_events( array $atts , string $id = 'event_list', string $context = '' )
Return an HTML list of events

filter


filter


filter


filter


public
# get_events( array $atts )
get_events

filter


filter


public
# is_future( object $event , bool $exact = false )
Checks if the given event is in the future or not
public
# is_past( object $event , bool $exact = false )
Checks if the given event is completed or not
public
# retreive( object $event = NULL )
public
# retreive_term( \mixte $_term = NULL, string $taxonomy = 'category', string $post_type = 'post' )
public
# add_custom_box( )
ADMIN ISSUES *
public
# inner_custom_box_date( )
display the date custom box
public
# inner_custom_box_loc( $post )
displays the location custom box
public
# inner_custom_box_edit( )
display custombox containing shortcode wizard
public
# quick_edit( string $column_name , bool $post_type , $bulk = false )
public
# inline_field( \type $fieldname , $bulk )
public
# inline_field_color( $html , $fieldname , $bulk )
public
# bulk_edit( \type $column_name , \type $post_type )
public
public
# save_postdata( int $post_id )
When the post is saved, saves our custom data
public
public
# display_caldate( string $date , string $cat = '', bool $display = false, $colored = true, $thumbnail = '', $title = '' )
public
# calendar( array $atts )

filter


public
# ajaxlist( )
public
# ajaxcal( )
echoes the content of the calendar in ajax context
public
# ajaxdate( )
echoes the date of the calendar in ajax context
public
# HumanDate( )
echoes a date in ajax context
public
# GetLatLong( )
AJAX Get lat long from address
public
# columns_head( array $defaults )
alters columns

filter


public
# columns_content( string $column_name , int $post_id )
echoes content of a row in a given column

action


public
# column_edit_hidden_fields( $post_id , $set )
public
# row_meta( \type $plugin_meta , \type $plugin_file , \type $plugin_data , \type $status )
public
# manage_options( )
adds menu items
public
# dashboard_right_now( array $elements )
adds items to the native "right now" dashboard widget
public
# register_settings( )

action


public
public
public
public
public
public
public
# manage_settings( )
output content of the setting page
public
# ics_date( \timestamp $timestamp )
public
public
# feed( )
outputs an ICS document
Constants Summary
public string META_START
# 'event_begin'
public string META_END
# 'event_end'
public string META_COLOR
# 'event_color'
public string META_ADD
# 'geo_address'
public string META_LAT
# 'geo_latitude'
public string META_LONG
# 'geo_longitude'
Properties Summary
public $list_id
# NULL
public $NomDuMois
# NULL
public $Week
# NULL
public $settings
# NULL
public $dateformat
# NULL
public $version
# '4.5'
public $map_interactions
# NULL
public $quick_edit_fields
# NULL
public $Shortcodes
# NULL