Plugin Directory

Changeset 1678088


Ignore:
Timestamp:
06/14/2017 08:04:06 AM (9 years ago)
Author:
Yendif Player
Message:

Commit Version 1.7.0

Location:
another-events-calendar/trunk
Files:
18 added
49 edited

Legend:

Unmodified
Added
Removed
  • another-events-calendar/trunk/README.txt

    r1601299 r1678088  
    44Tags: calendar, events, event, booking, registration, event management, venue, map, location
    55Requires at least: 4.4.0
    6 Tested up to: 4.7.2
    7 Stable tag: 1.6.0
     6Tested up to: 4.8
     7Stable tag: 1.7.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3535
    3636* Allow users to add their Events, Venues & Organizers through front-end.
    37 * Showcase your Events in 4 nice layouts,
     37* Showcase your Events in 5 nice layouts,
    3838 * Calendar (Monthly, Weekly & Daily)
    3939 * Table
    4040 * Grid
    4141 * Blog
     42 * Map
    4243* Show Events by Category
    4344* Show Events by Location
     
    5758 * Search by a date range
    5859* Widget to show upcoming events
     60* Widget to show past events
    5961* Widget to show events using a mini calendar
    6062
     
    9496== Changelog ==
    9597
     98= 1.7.0 =
     99
     100* New: Map View. Added new shortcode [aec_map] to show Events in a Google Map.
     101* New: Added new [aec_events] shortcode attribute 'filterby=past_events' to only show the Past Events.
     102* New: Widget to show Past Events.
     103* New: Added new setting to disable Event Categories.
     104* Fix: [+] Few minor bug fixes.
     105
    96106= 1.6.0 =
    97107
     
    129139== Upgrade Notice ==
    130140
     141= 1.7.0 =
     142
     143* New: Map View. Added new shortcode [aec_map] to show Events in a Google Map.
     144* New: Added new [aec_events] shortcode attribute 'filterby=past_events' to only show the Past Events.
     145* New: Widget to show Past Events.
     146* New: Added new setting to disable Event Categories.
     147* Fix: [+] Few minor bug fixes.
     148
    131149= 1.6.0 =
    132150
  • another-events-calendar/trunk/admin/class-aec-admin-categories.php

    r1601299 r1678088  
    2929     */
    3030    public function register_taxonomy() {
     31   
     32        $general_settings = get_option( 'aec_general_settings' );
    3133       
    32         $labels = array(
    33             'name'                       => _x( 'Categories', 'Taxonomy General Name', 'another-events-calendar' ),
    34             'singular_name'              => _x( 'Category', 'Taxonomy Singular Name', 'another-events-calendar' ),
    35             'menu_name'                  => __( 'Event Categories', 'another-events-calendar' ),
    36             'all_items'                  => __( 'All Categories', 'another-events-calendar' ),
    37             'parent_item'                => __( 'Parent Category', 'another-events-calendar' ),
    38             'parent_item_colon'          => __( 'Parent Category:', 'another-events-calendar' ),
    39             'new_item_name'              => __( 'New Category Name', 'another-events-calendar' ),
    40             'add_new_item'               => __( 'Add New Category', 'another-events-calendar' ),
    41             'edit_item'                  => __( 'Edit Category', 'another-events-calendar' ),
    42             'update_item'                => __( 'Update Category', 'another-events-calendar' ),
    43             'view_item'                  => __( 'View Category', 'another-events-calendar' ),
    44             'separate_items_with_commas' => __( 'Separate Categories with commas', 'another-events-calendar' ),
    45             'add_or_remove_items'        => __( 'Add or remove Categories', 'another-events-calendar' ),
    46             'choose_from_most_used'      => __( 'Choose from the most used', 'another-events-calendar' ),
    47             'popular_items'              => NULL,
    48             'search_items'               => __( 'Search Categories', 'another-events-calendar' ),
    49             'not_found'                  => __( 'Not Found', 'another-events-calendar' ),
    50         );
     34        if( ! empty( $general_settings['has_categories'] ) ) {
    5135       
    52         $args = array(
    53             'labels'            => $labels,
    54             'hierarchical'      => true,
    55             'public'            => true,
    56             'show_ui'           => true,           
    57             'show_admin_column' => true,
    58             'show_in_nav_menus' => true,
    59             'show_tagcloud'     => false,
    60             'query_var'         => true,
    61             'capabilities'      => array(
    62                 'manage_terms' => 'manage_aec_options',
    63                 'edit_terms'   => 'manage_aec_options',             
    64                 'delete_terms' => 'manage_aec_options',
    65                 'assign_terms' => 'edit_aec_events'
    66             )
    67         );
     36            $labels = array(
     37                'name'                       => _x( 'Categories', 'Taxonomy General Name', 'another-events-calendar' ),
     38                'singular_name'              => _x( 'Category', 'Taxonomy Singular Name', 'another-events-calendar' ),
     39                'menu_name'                  => __( 'Event Categories', 'another-events-calendar' ),
     40                'all_items'                  => __( 'All Categories', 'another-events-calendar' ),
     41                'parent_item'                => __( 'Parent Category', 'another-events-calendar' ),
     42                'parent_item_colon'          => __( 'Parent Category:', 'another-events-calendar' ),
     43                'new_item_name'              => __( 'New Category Name', 'another-events-calendar' ),
     44                'add_new_item'               => __( 'Add New Category', 'another-events-calendar' ),
     45                'edit_item'                  => __( 'Edit Category', 'another-events-calendar' ),
     46                'update_item'                => __( 'Update Category', 'another-events-calendar' ),
     47                'view_item'                  => __( 'View Category', 'another-events-calendar' ),
     48                'separate_items_with_commas' => __( 'Separate Categories with commas', 'another-events-calendar' ),
     49                'add_or_remove_items'        => __( 'Add or remove Categories', 'another-events-calendar' ),
     50                'choose_from_most_used'      => __( 'Choose from the most used', 'another-events-calendar' ),
     51                'popular_items'              => NULL,
     52                'search_items'               => __( 'Search Categories', 'another-events-calendar' ),
     53                'not_found'                  => __( 'Not Found', 'another-events-calendar' ),
     54            );
     55           
     56            $args = array(
     57                'labels'            => $labels,
     58                'hierarchical'      => true,
     59                'public'            => true,
     60                'show_ui'           => true,           
     61                'show_admin_column' => true,
     62                'show_in_nav_menus' => true,
     63                'show_tagcloud'     => false,
     64                'query_var'         => true,
     65                'capabilities'      => array(
     66                    'manage_terms' => 'manage_aec_options',
     67                    'edit_terms'   => 'manage_aec_options',             
     68                    'delete_terms' => 'manage_aec_options',
     69                    'assign_terms' => 'edit_aec_events'
     70                )
     71            );
    6872       
    69         register_taxonomy( 'aec_categories', array( 'aec_events', 'aec_recurring_events' ), $args );
     73            register_taxonomy( 'aec_categories', array( 'aec_events', 'aec_recurring_events' ), $args );
     74           
     75        }
    7076       
    7177    }   
  • another-events-calendar/trunk/admin/class-aec-admin-events.php

    r1601299 r1678088  
    165165            array(
    166166                'post_type'      => 'aec_venues',
    167                 'posts_per_page' => '-1'
     167                'posts_per_page' => '-1',
     168                'orderby'        => 'title',
     169                'order'          => 'ASC'
    168170            )
    169171        );
     
    194196        $organizers_list = get_posts(
    195197            array(
    196                 'post_type'   => 'aec_organizers',
    197                 'posts_per_page' => '-1'
     198                'post_type'      => 'aec_organizers',
     199                'posts_per_page' => '-1',
     200                'orderby'        => 'title',
     201                'order'          => 'ASC'
    198202            )
    199203        );
     
    352356               
    353357            }
    354 
     358           
    355359            if( ! empty( $organizer_ids ) ) {
    356360                update_post_meta( $post_id, 'organizers', $organizer_ids );
     
    373377        global $typenow;
    374378       
    375         $post_type = 'aec_events';
    376         $taxonomy  = 'aec_categories';
    377        
    378         if( $typenow == $post_type ) {
    379        
    380             $selected      = isset( $_GET[ $taxonomy ] ) ? (int) $_GET[ $taxonomy ] : '';
    381             $info_taxonomy = get_taxonomy( $taxonomy );
    382            
    383             wp_dropdown_categories( array(
    384                 'show_option_none' => __( "Show All {$info_taxonomy->label}" ),
    385                 'taxonomy'         => $taxonomy,
    386                 'name'             => $taxonomy,
    387                 'orderby'          => 'name',
    388                 'selected'         => $selected,
    389                 'hierarchical'     => true,
    390                 'hide_empty'       => false,
    391             ));
    392            
     379        $general_settings = get_option( 'aec_general_settings' );
     380       
     381        if( ! empty( $general_settings['has_categories'] ) ) {
     382       
     383            $post_type = 'aec_events';
     384            $taxonomy  = 'aec_categories';
     385           
     386            if( $typenow == $post_type ) {
     387           
     388                $selected      = isset( $_GET[ $taxonomy ] ) ? (int) $_GET[ $taxonomy ] : '';
     389                $info_taxonomy = get_taxonomy( $taxonomy );
     390               
     391                wp_dropdown_categories( array(
     392                    'show_option_none' => __( "Show All {$info_taxonomy->label}" ),
     393                    'taxonomy'         => $taxonomy,
     394                    'name'             => $taxonomy,
     395                    'orderby'          => 'name',
     396                    'selected'         => $selected,
     397                    'hierarchical'     => true,
     398                    'hide_empty'       => false,
     399                ));
     400               
     401            }
    393402        }
    394403       
     
    451460     * @return   array                Updated column names.
    452461     */
    453     function manage_posts_columns( $columns ) {
     462    public function manage_posts_columns( $columns ) {
    454463   
     464        $general_settings = get_option( 'aec_general_settings' );
     465       
    455466        $n_columns = array();
    456467       
     
    459470        foreach( $columns as $key => $value ) {
    460471            if( 'author' == $key ) {
    461                 $n_columns['taxonomy-aec_categories'] = __( 'Categories', 'another-events-calendar' );
     472                if( ! empty( $general_settings['has_categories'] ) ) $n_columns['taxonomy-aec_categories'] = __( 'Categories', 'another-events-calendar' );
    462473                $n_columns['start_date']              = __( 'Start Date','another-events-calendar' );
    463474                $n_columns['end_date']                = __( 'End Date', 'another-events-calendar' );
  • another-events-calendar/trunk/admin/class-aec-admin-recurring-events.php

    r1601299 r1678088  
    188188            array(
    189189                'post_type'      => 'aec_venues',
    190                 'posts_per_page' => '-1'
     190                'posts_per_page' => '-1',
     191                'orderby'        => 'title',
     192                'order'          => 'ASC'
    191193            )
    192194        );
     
    214216        $organizers_list = get_posts(
    215217            array(
    216                 'post_type'   => 'aec_organizers',
    217                 'posts_per_page' => '-1'
     218                'post_type'      => 'aec_organizers',
     219                'posts_per_page' => '-1',
     220                'orderby'        => 'title',
     221                'order'          => 'ASC'
    218222            )
    219223        );
     
    378382            if( ! empty( $meta['organizer_ids'] ) ) {
    379383                update_post_meta( $post_id, 'organizers', $meta['organizer_ids'] );
     384            } else {
     385                delete_post_meta( $post_id, 'organizers' );
    380386            }
    381387           
     
    484490     * @param    array     $meta    Post Meta.
    485491     */
    486     function process_daily_events( $post, $meta ) {
     492    public function process_daily_events( $post, $meta ) {
    487493       
    488494        $start_date = new DateTime( $meta['start_date_time'] );
     
    514520     * @param    int       $occurences    Number of Occurences.
    515521     */
    516     function process_weekly_events( $post, $meta, $start_date = '', $occurences = 0 ) {
     522    public function process_weekly_events( $post, $meta, $start_date = '', $occurences = 0 ) {
    517523       
    518524        if( '' == $start_date ) {
     
    531537                if( ! in_array( $date->format('w'), $meta['repeat_week_days'] ) ) continue;
    532538               
    533                 if( $date->format('U') > $initial_start_date->format('U') ) {
     539                if( $date->format('U') >= $initial_start_date->format('U') ) {
    534540                    $this->add_event( $post, $meta, $date );
    535541                   
     
    556562                foreach( $_period as $_date ) {
    557563                    if( ! in_array( $_date->format('w'), $meta['repeat_week_days'] ) ) continue;
    558                     if( $_date->format('U') > $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $post, $meta, $_date );
     564                    if( $_date->format('U') >= $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $post, $meta, $_date );
    559565                }
    560566               
     
    574580     * @param    int       $occurences    Number of Occurences.
    575581     */
    576     function process_monthly_events( $post, $meta, $start_date = '', $occurences = 0 ) {
     582    public function process_monthly_events( $post, $meta, $start_date = '', $occurences = 0 ) {
    577583       
    578584        if( '' == $start_date ) {
     
    592598                if( ! in_array($date->format('j'), (array) $meta['repeat_month_days'] ) ) continue;
    593599               
    594                 if( $date->format('U') > $initial_start_date->format('U') ) {
     600                if( $date->format('U') >= $initial_start_date->format('U') ) {
    595601                    $this->add_event( $post, $meta, $date );
    596602                   
     
    618624                foreach( $_period as $_date ) {
    619625                    if( ! in_array( $_date->format( 'j' ), (array) $meta['repeat_month_days'] ) ) continue;
    620                     if( $_date->format('U') > $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $post, $meta, $_date );
     626                    if( $_date->format('U') >= $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $post, $meta, $_date );
    621627                }
    622628               
     
    637643     */
    638644    public function add_event( $post, $meta, $start_date ) {   
    639 
     645       
     646        $general_settings = get_option( 'aec_general_settings' );
     647       
    640648        $args = array(
    641649            'post_type'    => 'aec_events',
     
    656664               
    657665        update_post_meta( $post_id, 'cost', $meta['cost'] );
    658         update_post_meta( $post_id, 'venue_id', $meta['venue_id'] );
    659         update_post_meta( $post_id, 'organizers', $meta['organizer_ids'] );
     666       
     667        if( ! empty( $general_settings['has_venues'] ) ) {
     668            update_post_meta( $post_id, 'venue_id', $meta['venue_id'] );
     669        }
     670       
     671        if( ! empty( $general_settings['has_organizers'] ) ) {
     672            update_post_meta( $post_id, 'organizers', $meta['organizer_ids'] );
     673        }
    660674       
    661         $terms = get_the_terms( $post->ID , 'aec_categories' );
    662         if( ! empty( $terms ) ) {
    663             foreach( $terms as $term ) {
    664                 wp_set_object_terms( $post_id, $term->term_id , 'aec_categories', true );
    665             }
    666         }
    667        
    668         $terms = get_the_terms( $post->ID , 'aec_tags' );
    669         if( ! empty( $terms ) ) {
    670             foreach( $terms as $term ) {
    671                 wp_set_object_terms( $post_id, $term->term_id , 'aec_tags', true );
     675        if( ! empty( $general_settings['has_categories'] ) ) {
     676            $terms = get_the_terms( $post->ID , 'aec_categories' );
     677            if( ! empty( $terms ) ) {
     678                foreach( $terms as $term ) {
     679                    wp_set_object_terms( $post_id, $term->term_id , 'aec_categories', true );
     680                }
     681            }
     682        }
     683       
     684        if( ! empty( $general_settings['has_tags'] ) ) {
     685            $terms = get_the_terms( $post->ID , 'aec_tags' );
     686            if( ! empty( $terms ) ) {
     687                foreach( $terms as $term ) {
     688                    wp_set_object_terms( $post_id, $term->term_id , 'aec_tags', true );
     689                }
    672690            }
    673691        }
     
    690708        global $typenow;
    691709       
    692         $post_type = 'aec_recurring_events';
    693         $taxonomy  = 'aec_categories';
    694        
    695         if( $typenow == $post_type ) {
    696        
    697             $selected      = isset( $_GET[ $taxonomy ] ) ? (int) $_GET[ $taxonomy ] : '';
    698             $info_taxonomy = get_taxonomy( $taxonomy );
    699            
    700             wp_dropdown_categories( array(
    701                 'show_option_none' => __( "Show All {$info_taxonomy->label}" ),
    702                 'taxonomy'         => $taxonomy,
    703                 'name'             => $taxonomy,
    704                 'orderby'          => 'name',
    705                 'selected'         => $selected,
    706                 'hierarchical'     => true,
    707                 'hide_empty'       => false,
    708             ));
     710        $general_settings = get_option( 'aec_general_settings' );
     711       
     712        if( ! empty( $general_settings['has_categories'] ) ) {
     713       
     714            $post_type = 'aec_recurring_events';
     715            $taxonomy  = 'aec_categories';
     716           
     717            if( $typenow == $post_type ) {
     718           
     719                $selected      = isset( $_GET[ $taxonomy ] ) ? (int) $_GET[ $taxonomy ] : '';
     720                $info_taxonomy = get_taxonomy( $taxonomy );
     721               
     722                wp_dropdown_categories( array(
     723                    'show_option_none' => __( "Show All {$info_taxonomy->label}" ),
     724                    'taxonomy'         => $taxonomy,
     725                    'name'             => $taxonomy,
     726                    'orderby'          => 'name',
     727                    'selected'         => $selected,
     728                    'hierarchical'     => true,
     729                    'hide_empty'       => false,
     730                ));
     731               
     732            }
    709733           
    710734        }
     
    768792     * @return   array                Updated column names.
    769793     */
    770     function manage_posts_columns( $columns ) {
     794    public function manage_posts_columns( $columns ) {
    771795   
     796        $general_settings = get_option( 'aec_general_settings' );
     797       
    772798        $n_columns = array();
    773799       
     
    776802        foreach( $columns as $key => $value ) {
    777803            if( 'author' == $key ) {
    778                 $n_columns['taxonomy-aec_categories'] = __( 'Categories', 'another-events-calendar' );
     804                if( ! empty( $general_settings['has_categories'] ) ) $n_columns['taxonomy-aec_categories'] = __( 'Categories', 'another-events-calendar' );
    779805                $n_columns['start_date']              = __( 'Start Date','another-events-calendar' );
    780806                $n_columns['end_date']                = __( 'End Date', 'another-events-calendar' );
  • another-events-calendar/trunk/admin/class-aec-admin-settings.php

    r1601299 r1678088  
    103103       
    104104        add_settings_field(
     105            'aec_general_settings[has_categories]',
     106            __( 'Enable Categories', 'another-events-calendar' ),
     107            array( $this, 'callback_checkbox' ),
     108            $page_hook,
     109            'aec_general_settings_section',
     110            array(
     111                'option_name' => 'aec_general_settings',
     112                'field_name'  => 'has_categories',
     113                'field_label' => __( 'Check this to enable categories', 'another-events-calendar' )
     114               
     115            )
     116        );
     117       
     118        add_settings_field(
    105119            'aec_general_settings[has_tags]',
    106120            __( 'Enable Tags', 'another-events-calendar' ),
     
    297311                    'table'  => __( 'Table view', 'another-events-calendar' ),
    298312                    'grid'   => __( 'Grid view', 'another-events-calendar' ),
    299                     'blog'   => __( 'Blog view', 'another-events-calendar' )                   
     313                    'blog'   => __( 'Blog view', 'another-events-calendar' ),
     314                    'map'    => __( 'Map view', 'another-events-calendar' )                     
    300315                ),
    301316                'description' => __( 'You must select at least one view.', 'another-events-calendar' )
     
    315330                    'table'  => __( 'Table view', 'another-events-calendar' ),
    316331                    'grid'   => __( 'Grid view', 'another-events-calendar' ),
    317                     'blog'   => __( 'Blog view', 'another-events-calendar' )
     332                    'blog'   => __( 'Blog view', 'another-events-calendar' ),
     333                    'map'    => __( 'Map view', 'another-events-calendar' )
    318334                )
    319335            )
     
    11651181                        break;
    11661182                    // Sanitize checkbox
     1183                    case 'has_categories':
    11671184                    case 'has_tags':
    11681185                    case 'has_venues': 
  • another-events-calendar/trunk/admin/class-aec-admin.php

    r1601299 r1678088  
    2222 */
    2323class AEC_Admin {
    24 
     24   
     25    /**
     26     * Check and update plugin options to the latest version.
     27     *
     28     * @since    1.7.0
     29     */
     30    public function manage_upgrades() {   
     31       
     32        if( AEC_PLUGIN_VERSION !== get_option( 'aec_version' ) ) {
     33       
     34            $default_pages_values = aec_insert_pages();
     35            update_option( 'aec_page_settings', $default_pages_values );
     36           
     37            $general_settings = get_option( 'aec_general_settings' );
     38            if( ! array_key_exists( 'has_categories', $general_settings ) ) {
     39                $general_settings['has_categories'] = 1;
     40                update_option( 'aec_general_settings', $general_settings );
     41            }
     42               
     43            // Update plugin version
     44            update_option( 'aec_version', AEC_PLUGIN_VERSION );
     45       
     46        }
     47       
     48    }
    2549   
    2650    /**
     
    5074        wp_enqueue_script( AEC_PLUGIN_SLUG, AEC_PLUGIN_URL.'admin/js/aec-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ), AEC_PLUGIN_VERSION, false );
    5175        wp_localize_script( AEC_PLUGIN_SLUG, 'aec', array(
    52                 'zoom_level' => ! empty( $map_settings['zoom_level'] ) ? (int) $map_settings['zoom_level'] : 5
     76                'zoom_level'     => ! empty( $map_settings['zoom_level'] ) ? (int) $map_settings['zoom_level'] : 5,
     77                'i18n_organizer' => __( 'Organizer', 'another-events-calendar' )
    5378            )
    5479        );
     
    124149     * @param    string    $footer_text    WordPress admin footer text.
    125150     * @return   string    $footer_text    Updated footer text.
    126      */
    127     public function admin_footer_text( $footer_text ) { 
     151     */ 
     152    public function admin_footer_text( $footer_text ) {
    128153       
    129154        global $typenow;
     
    139164            );
    140165           
    141         }
     166        } 
    142167       
    143168        return $footer_text;
  • another-events-calendar/trunk/admin/css/aec-admin.css

    r1514741 r1678088  
    113113
    114114.aec-organizer-fields p {
    115     width: 24%;
    116     text-align: center;
     115    padding: 5px;
     116    background-color: #0073AA;
     117    color: #FFF;
     118    text-align: left;
    117119}
    118120
  • another-events-calendar/trunk/admin/js/aec-admin.js

    r1601299 r1678088  
    196196        $( '#aec-add-new-organizer' ).on( 'click', function() {
    197197
    198             $( '#aec-organizer-fields' ).find( '.aec-organizer-fields p' ).html( '#' + $( '.aec-organizer-fields' ).length );
     198            $( '#aec-organizer-fields' ).find( '.aec-organizer-fields p' ).html( aec.i18n_organizer + ' #' + $( '.aec-organizer-fields' ).length );
    199199            var $clone = $( '#aec-organizer-fields' ).find( '.aec-organizer-fields' ).clone( false );
    200200            $( '#aec-organizer-fields-container' ).append( $clone );
  • another-events-calendar/trunk/another-events-calendar.php

    r1601299 r1678088  
    1212 * Plugin URI:        http://yendif.com/wordpress/another-events-calendar
    1313 * Description:       Another Events Calendar is a top-of-the-line event management plugin helps you organize and manage any type of events such as Conferences, Seminars, Meetings, Team Building Events, Trade Shows, Business Dinners, etc... in a very simple way.
    14  * Version:           1.6.0
     14 * Version:           1.7.0
    1515 * Author:            Yendif Technologies Pvt Ltd.
    1616 * Author URI:        http://yendif.com
     
    4848// The actuall plugin version
    4949if( ! defined( 'AEC_PLUGIN_VERSION' ) ) {
    50     define( 'AEC_PLUGIN_VERSION', '1.6.0' );
     50    define( 'AEC_PLUGIN_VERSION', '1.7.0' );
    5151}
    5252
     
    9494    // Register AEC Widgets
    9595    require_once AEC_PLUGIN_DIR . 'widgets/search/search.php';
     96    require_once AEC_PLUGIN_DIR . 'widgets/past-events/past-events.php';
    9697    require_once AEC_PLUGIN_DIR . 'widgets/upcoming-events/upcoming-events.php';
    9798    require_once AEC_PLUGIN_DIR . 'widgets/mini-calender/mini-calendar.php';
  • another-events-calendar/trunk/includes/class-aec-activator.php

    r1601299 r1678088  
    3535            $default_values = array(
    3636                'bootstrap'            => array( 'css', 'javascript' ),
     37                'has_categories'       => 1,
    3738                'has_tags'             => 1,
    3839                'has_venues'           => 1,
     
    9091        // Insert pages settings
    9192        if( ! get_option( 'aec_page_settings' ) ) {
    92            
    93             $pages_1 = self::insert_pages();
    94             $pages_2 = self::insert_pages_1_5();
    95             $default_values = array_merge( $pages_1, $pages_2 );
    96            
     93       
     94            $default_values = aec_insert_pages();
    9795            add_option( 'aec_page_settings', $default_values );
    98                
    99         } else {
    100        
    101             $page_settings = get_option( 'aec_page_settings' );
    102            
    103             if( ! array_key_exists( 'event_form', $page_settings ) ) {
    104                 $new_pages  = self::insert_pages_1_5();
    105                 $new_values = array_merge( $page_settings, $new_pages );
    106                 update_option( 'aec_page_settings', $new_values );
    107             }
    10896           
    10997        }
     
    156144       
    157145        // Add custom capabilities
    158         $roles = new AEC_Roles();
    159         $roles->add_caps();
     146        if( ! get_option( 'aec_version' ) ) {
     147            $roles = new AEC_Roles();
     148            $roles->add_caps();
     149        }
    160150       
    161         update_option( 'aec_version', AEC_PLUGIN_VERSION );
     151        // Add the plugin version number
     152        add_option( 'aec_version', AEC_PLUGIN_VERSION );
    162153
    163     }
     154    }   
    164155   
    165     /**
    166      * Insert pages required for the functional flow of the plugin.
    167      *
    168      * @since    1.0.0
    169      */
    170     public static function insert_pages() {
    171        
    172         $pages = array();
    173        
    174         // Insert calendar page
    175         $pages['calendar'] = wp_insert_post( array(
    176             'post_title'     => __( 'Calendar Page', 'another-events-calendar' ),
    177             'post_type'      => 'page',
    178             'post_name'      => 'aec-calendar',
    179             'comment_status' => 'closed',
    180             'ping_status'    => 'closed',
    181             'post_content'   => '[aec_calendar]',
    182             'post_status'    => 'publish',
    183             'post_author'    => get_current_user_id()
    184         ));
    185        
    186         // Insert events page
    187         $pages['events'] = wp_insert_post( array(
    188             'post_title'     => __( 'Events Page', 'another-events-calendar' ),
    189             'post_type'      => 'page',
    190             'post_name'      => 'aec-events',
    191             'comment_status' => 'closed',
    192             'ping_status'    => 'closed',
    193             'post_content'   => '[aec_events]',
    194             'post_status'    => 'publish',
    195             'post_author'    => get_current_user_id()
    196         ));
    197        
    198         // Insert categories page
    199         $pages['categories'] = wp_insert_post( array(
    200             'post_title'     => __( 'Categories Page', 'another-events-calendar' ),
    201             'post_type'      => 'page',
    202             'post_name'      => 'aec-categories',
    203             'comment_status' => 'closed',
    204             'ping_status'    => 'closed',
    205             'post_content'   => '[aec_categories]',
    206             'post_status'    => 'publish',
    207             'post_author'    => get_current_user_id()
    208         ));
    209                
    210         // Insert single category page
    211         $pages['category'] = wp_insert_post( array(
    212             'post_title'     => __( 'Single Category Page', 'another-events-calendar' ),
    213             'post_type'      => 'page',
    214             'post_name'      => 'aec-category',
    215             'comment_status' => 'closed',
    216             'ping_status'    => 'closed',
    217             'post_content'   => '[aec_category]',
    218             'post_status'    => 'publish',
    219             'post_author'    => get_current_user_id()
    220         ));
    221            
    222         // Insert single tag page
    223         $pages['tag'] = wp_insert_post( array(
    224             'post_title'     => __( 'Single Tag Page', 'another-events-calendar' ),
    225             'post_type'      => 'page',
    226             'post_name'      => 'aec-tag',
    227             'comment_status' => 'closed',
    228             'ping_status'    => 'closed',
    229             'post_content'   => '[aec_tag]',
    230             'post_status'    => 'publish',
    231             'post_author'    => get_current_user_id()
    232         ));     
    233            
    234         // Insert venue page
    235         $pages['venue'] = wp_insert_post( array(
    236             'post_title'     => __( 'Single Venue Page', 'another-events-calendar' ),
    237             'post_type'      => 'page',
    238             'post_name'      => 'aec-venue',
    239             'comment_status' => 'closed',
    240             'ping_status'    => 'closed',
    241             'post_content'   => '[aec_venue]',
    242             'post_status'    => 'publish',
    243             'post_author'    => get_current_user_id()
    244         ));     
    245            
    246         // Insert single organizer page
    247         $pages['organizer'] = wp_insert_post( array(
    248             'post_title'     => __( 'Single Organizer Page', 'another-events-calendar' ),
    249             'post_type'      => 'page',
    250             'post_name'      => 'aec-organizer',
    251             'comment_status' => 'closed',
    252             'ping_status'    => 'closed',
    253             'post_content'   => '[aec_organizer]',
    254             'post_status'    => 'publish',
    255             'post_author'    => get_current_user_id()
    256         ));
    257        
    258         // Insert search page
    259         $pages['search'] = wp_insert_post( array(
    260             'post_title'     => __( 'Search Results Page', 'another-events-calendar' ),
    261             'post_type'      => 'page',
    262             'post_name'      => 'aec-search',
    263             'comment_status' => 'closed',
    264             'ping_status'    => 'closed',
    265             'post_content'   => '[aec_search]',
    266             'post_status'    => 'publish',
    267             'post_author'    => get_current_user_id()
    268         ));
    269                
    270         return $pages;
    271        
    272     }
    273    
    274     /**
    275      * Insert pages for version 1.5.0+.
    276      *
    277      * @since    1.5.0
    278      */
    279     public static function insert_pages_1_5() {
    280        
    281         $pages = array();
    282        
    283         // Insert event form page
    284         $pages['event_form'] = wp_insert_post( array(
    285             'post_title'     => __( 'Add New Event', 'another-events-calendar' ),
    286             'post_type'      => 'page',
    287             'post_name'      => 'aec-event-form',
    288             'comment_status' => 'closed',
    289             'ping_status'    => 'closed',
    290             'post_content'   => '[aec_event_form]',
    291             'post_status'    => 'publish',
    292             'post_author'    => get_current_user_id()
    293         ));
    294        
    295         // Insert manage evente page
    296         $pages['manage_events'] = wp_insert_post( array(
    297             'post_title'     => __( 'Manage Events', 'another-events-calendar' ),
    298             'post_type'      => 'page',
    299             'post_name'      => 'aec-manage-events',
    300             'comment_status' => 'closed',
    301             'ping_status'    => 'closed',
    302             'post_content'   => '[aec_manage_events]',
    303             'post_status'    => 'publish',
    304             'post_author'    => get_current_user_id()
    305         ));
    306        
    307         // Insert venue form page
    308         $pages['venue_form'] = wp_insert_post( array(
    309             'post_title'     => __( 'Add New Venue', 'another-events-calendar' ),
    310             'post_type'      => 'page',
    311             'post_name'      => 'aec-venue-form',
    312             'comment_status' => 'closed',
    313             'ping_status'    => 'closed',
    314             'post_content'   => '[aec_venue_form]',
    315             'post_status'    => 'publish',
    316             'post_author'    => get_current_user_id()
    317         ));
    318        
    319         // Insert manage venues page
    320         $pages['manage_venues'] = wp_insert_post( array(
    321             'post_title'     => __( 'Manage Venues', 'another-events-calendar' ),
    322             'post_type'      => 'page',
    323             'post_name'      => 'aec-manage-venues',
    324             'comment_status' => 'closed',
    325             'ping_status'    => 'closed',
    326             'post_content'   => '[aec_manage_venues]',
    327             'post_status'    => 'publish',
    328             'post_author'    => get_current_user_id()
    329         ));
    330        
    331         // Insert organizer form page
    332         $pages['organizer_form'] = wp_insert_post( array(
    333             'post_title'     => __( 'Add New Organizer', 'another-events-calendar' ),
    334             'post_type'      => 'page',
    335             'post_name'      => 'aec-organizer-form',
    336             'comment_status' => 'closed',
    337             'ping_status'    => 'closed',
    338             'post_content'   => '[aec_organizer_form]',
    339             'post_status'    => 'publish',
    340             'post_author'    => get_current_user_id()
    341         ));
    342        
    343         // Insert manage organizers page
    344         $pages['manage_organizers'] = wp_insert_post( array(
    345             'post_title'     => __( 'Manage Organizers', 'another-events-calendar' ),
    346             'post_type'      => 'page',
    347             'post_name'      => 'aec-manage-organizers',
    348             'comment_status' => 'closed',
    349             'ping_status'    => 'closed',
    350             'post_content'   => '[aec_manage_organizers]',
    351             'post_status'    => 'publish',
    352             'post_author'    => get_current_user_id()
    353         ));
    354                
    355         return $pages;
    356        
    357     }
    358 
    359156}
  • another-events-calendar/trunk/includes/class-aec.php

    r1601299 r1678088  
    108108        require_once AEC_PLUGIN_DIR . 'public/class-aec-public-calendar.php';
    109109        require_once AEC_PLUGIN_DIR . 'public/class-aec-public-events.php';
     110        require_once AEC_PLUGIN_DIR . 'public/class-aec-public-map.php';
    110111        require_once AEC_PLUGIN_DIR . 'public/class-aec-public-search.php';
    111112        require_once AEC_PLUGIN_DIR . 'public/class-aec-public-venues.php';
     
    144145        $plugin_admin = new AEC_Admin();
    145146
     147        $this->loader->add_action( 'wp_loaded', $plugin_admin, 'manage_upgrades' );
    146148        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
    147149        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
     
    234236        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    235237       
     238        // implement a filter for the post link title
    236239        $this->loader->add_filter( 'the_title', $plugin_public, 'the_title', 99 );
     240        $this->loader->add_filter( 'single_post_title', $plugin_public, 'the_title', 99 );
     241       
     242        // implement a filter for the page title. Support WordPress < 4.4
     243        $this->loader->add_filter( 'wp_title', $plugin_public, 'wp_title', 99, 3 );
     244
     245        // implement a filter for the page title. Support WordPress >= 4.4
     246        $this->loader->add_filter( 'pre_get_document_title', $plugin_public, 'pre_get_document_title', 999 );
     247        $this->loader->add_filter( 'document_title_parts', $plugin_public, 'document_title_parts' );
    237248               
    238249        // Hooks specific to categor(ies) page
     
    247258        $this->loader->add_filter( 'post_thumbnail_html', $plugin_events, 'post_thumbnail_html' );
    248259        $this->loader->add_filter( 'the_content', $plugin_events, 'the_content' );
     260       
     261        // Hooks specific to map page
     262        $plugin_map = new AEC_Public_Map();
    249263                   
    250264        // Hooks specific to search results page
  • another-events-calendar/trunk/includes/helper-functions.php

    r1601299 r1678088  
    1212
    1313// Exit if accessed directly
    14 if( ! defined( 'WPINC' ) ) {
     14if( ! defined( 'WPINC' ) ) { 
    1515    die;
    1616}
     
    3636    return $pages;
    3737           
     38}
     39
     40/**
     41 * Insert required custom pages.
     42 *
     43 * @since    1.7.0
     44 */
     45function aec_insert_pages() {
     46   
     47    global $wpdb;
     48   
     49    $page_settings = get_option( 'aec_page_settings', array() );
     50    $pages = array();
     51   
     52    // Calendar Page
     53    if( array_key_exists( 'calendar', $page_settings ) ) {
     54       
     55        $pages['calendar'] = $page_settings['calendar'];
     56   
     57    } else {
     58       
     59        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_calendar]%' LIMIT 1" );
     60
     61        if( ! $post_id ) {
     62            $pages['calendar'] = wp_insert_post( array(
     63                'post_title'     => __( 'Calendar Page', 'another-events-calendar' ),
     64                'post_type'      => 'page',
     65                'post_name'      => 'aec-calendar',
     66                'comment_status' => 'closed',
     67                'ping_status'    => 'closed',
     68                'post_content'   => '[aec_calendar]',
     69                'post_status'    => 'publish',
     70                'post_author'    => get_current_user_id()
     71            ));
     72        }
     73    }
     74   
     75    // Events Page
     76    if( array_key_exists( 'events', $page_settings ) ) {
     77       
     78        $pages['events'] = $page_settings['events'];
     79   
     80    } else {
     81   
     82        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_events]%' LIMIT 1" );
     83        if( ! $post_id ) {
     84            $pages['events'] = wp_insert_post( array(
     85                'post_title'     => __( 'Events Page', 'another-events-calendar' ),
     86                'post_type'      => 'page',
     87                'post_name'      => 'aec-events',
     88                'comment_status' => 'closed',
     89                'ping_status'    => 'closed',
     90                'post_content'   => '[aec_map]<br />[aec_events]',
     91                'post_status'    => 'publish',
     92                'post_author'    => get_current_user_id()
     93            ));
     94        }
     95    }
     96   
     97    // Categories Page
     98    if( array_key_exists( 'categories', $page_settings ) ) {
     99       
     100        $pages['categories'] = $page_settings['categories'];
     101   
     102    } else {
     103   
     104        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_categories]%' LIMIT 1" );
     105        if( ! $post_id ) {
     106            $pages['categories'] = wp_insert_post( array(
     107                'post_title'     => __( 'Categories Page', 'another-events-calendar' ),
     108                'post_type'      => 'page',
     109                'post_name'      => 'aec-categories',
     110                'comment_status' => 'closed',
     111                'ping_status'    => 'closed',
     112                'post_content'   => '[aec_categories]',
     113                'post_status'    => 'publish',
     114                'post_author'    => get_current_user_id()
     115            ));
     116        }
     117    }
     118   
     119    // Single Category Page
     120    if( array_key_exists( 'category', $page_settings ) ) {
     121       
     122        $pages['category'] = $page_settings['category'];
     123   
     124    } else {
     125   
     126        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_category]%' LIMIT 1" );
     127        if( ! $post_id ) {
     128            $pages['category'] = wp_insert_post( array(
     129                'post_title'     => __( 'Single Category Page', 'another-events-calendar' ),
     130                'post_type'      => 'page',
     131                'post_name'      => 'aec-category',
     132                'comment_status' => 'closed',
     133                'ping_status'    => 'closed',
     134                'post_content'   => '[aec_map]<br />[aec_category]',
     135                'post_status'    => 'publish',
     136                'post_author'    => get_current_user_id()
     137            ));
     138        }
     139    }
     140   
     141    // Single Tag Page
     142    if( array_key_exists( 'tag', $page_settings ) ) {
     143       
     144        $pages['tag'] = $page_settings['tag'];
     145   
     146    } else {
     147   
     148        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_tag]%' LIMIT 1" );
     149        if( ! $post_id ) {
     150            $pages['tag'] = wp_insert_post( array(
     151                'post_title'     => __( 'Single Tag Page', 'another-events-calendar' ),
     152                'post_type'      => 'page',
     153                'post_name'      => 'aec-tag',
     154                'comment_status' => 'closed',
     155                'ping_status'    => 'closed',
     156                'post_content'   => '[aec_map]<br />[aec_tag]',
     157                'post_status'    => 'publish',
     158                'post_author'    => get_current_user_id()
     159            ));     
     160        }
     161    }
     162   
     163    // Single Venue Page
     164    if( array_key_exists( 'venue', $page_settings ) ) {
     165       
     166        $pages['venue'] = $page_settings['venue'];
     167   
     168    } else {
     169   
     170        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_venue]%' LIMIT 1" );
     171        if( ! $post_id ) {
     172            $pages['venue'] = wp_insert_post( array(
     173                'post_title'     => __( 'Single Venue Page', 'another-events-calendar' ),
     174                'post_type'      => 'page',
     175                'post_name'      => 'aec-venue',
     176                'comment_status' => 'closed',
     177                'ping_status'    => 'closed',
     178                'post_content'   => '[aec_venue]',
     179                'post_status'    => 'publish',
     180                'post_author'    => get_current_user_id()
     181            ));
     182        }
     183    }   
     184       
     185    // Single Organizer Page
     186    if( array_key_exists( 'organizer', $page_settings ) ) {
     187       
     188        $pages['organizer'] = $page_settings['organizer'];
     189   
     190    } else {
     191   
     192        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_organizer]%' LIMIT 1" );
     193        if( ! $post_id ) {
     194            $pages['organizer'] = wp_insert_post( array(
     195                'post_title'     => __( 'Single Organizer Page', 'another-events-calendar' ),
     196                'post_type'      => 'page',
     197                'post_name'      => 'aec-organizer',
     198                'comment_status' => 'closed',
     199                'ping_status'    => 'closed',
     200                'post_content'   => '[aec_map]<br />[aec_organizer]',
     201                'post_status'    => 'publish',
     202                'post_author'    => get_current_user_id()
     203            ));
     204        }
     205    }
     206   
     207    // Search Results Page
     208    if( array_key_exists( 'search', $page_settings ) ) {
     209       
     210        $pages['search'] = $page_settings['search'];
     211   
     212    } else {
     213   
     214        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_search]%' LIMIT 1" );
     215        if( ! $post_id ) {
     216            $pages['search'] = wp_insert_post( array(
     217                'post_title'     => __( 'Search Results Page', 'another-events-calendar' ),
     218                'post_type'      => 'page',
     219                'post_name'      => 'aec-search',
     220                'comment_status' => 'closed',
     221                'ping_status'    => 'closed',
     222                'post_content'   => '[aec_search]',
     223                'post_status'    => 'publish',
     224                'post_author'    => get_current_user_id()
     225            ));
     226        }
     227    }
     228           
     229    // Event Submission Form
     230    if( array_key_exists( 'event_form', $page_settings ) ) {
     231       
     232        $pages['event_form'] = $page_settings['event_form'];
     233   
     234    } else {
     235   
     236        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_event_form]%' LIMIT 1" );
     237        if( ! $post_id ) {
     238            $pages['event_form'] = wp_insert_post( array(
     239                'post_title'     => __( 'Add New Event', 'another-events-calendar' ),
     240                'post_type'      => 'page',
     241                'post_name'      => 'aec-event-form',
     242                'comment_status' => 'closed',
     243                'ping_status'    => 'closed',
     244                'post_content'   => '[aec_event_form]',
     245                'post_status'    => 'publish',
     246                'post_author'    => get_current_user_id()
     247            ));
     248        }
     249    }
     250   
     251    // Manage Events Page
     252    if( array_key_exists( 'manage_events', $page_settings ) ) {
     253       
     254        $pages['manage_events'] = $page_settings['manage_events'];
     255   
     256    } else {
     257   
     258        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_manage_events]%' LIMIT 1" );
     259        if( ! $post_id ) {
     260            $pages['manage_events'] = wp_insert_post( array(
     261                'post_title'     => __( 'Manage Events', 'another-events-calendar' ),
     262                'post_type'      => 'page',
     263                'post_name'      => 'aec-manage-events',
     264                'comment_status' => 'closed',
     265                'ping_status'    => 'closed',
     266                'post_content'   => '[aec_manage_events]',
     267                'post_status'    => 'publish',
     268                'post_author'    => get_current_user_id()
     269            ));
     270        }
     271    }
     272   
     273    // Venue Form
     274    if( array_key_exists( 'venue_form', $page_settings ) ) {
     275       
     276        $pages['venue_form'] = $page_settings['venue_form'];
     277   
     278    } else {
     279   
     280        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_venue_form]%' LIMIT 1" );
     281        if( ! $post_id ) {
     282            $pages['venue_form'] = wp_insert_post( array(
     283                'post_title'     => __( 'Add New Venue', 'another-events-calendar' ),
     284                'post_type'      => 'page',
     285                'post_name'      => 'aec-venue-form',
     286                'comment_status' => 'closed',
     287                'ping_status'    => 'closed',
     288                'post_content'   => '[aec_venue_form]',
     289                'post_status'    => 'publish',
     290                'post_author'    => get_current_user_id()
     291            ));
     292        }
     293    }
     294   
     295    // Manage Events
     296    if( array_key_exists( 'manage_venues', $page_settings ) ) {
     297       
     298        $pages['manage_venues'] = $page_settings['manage_venues'];
     299   
     300    } else {
     301   
     302        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_manage_venues]%' LIMIT 1" );
     303        if( ! $post_id ) {
     304            $pages['manage_venues'] = wp_insert_post( array(
     305                'post_title'     => __( 'Manage Venues', 'another-events-calendar' ),
     306                'post_type'      => 'page',
     307                'post_name'      => 'aec-manage-venues',
     308                'comment_status' => 'closed',
     309                'ping_status'    => 'closed',
     310                'post_content'   => '[aec_manage_venues]',
     311                'post_status'    => 'publish',
     312                'post_author'    => get_current_user_id()
     313            ));
     314        }
     315    }
     316   
     317    // Organizer Form
     318    if( array_key_exists( 'organizer_form', $page_settings ) ) {
     319       
     320        $pages['organizer_form'] = $page_settings['organizer_form'];
     321   
     322    } else {
     323   
     324        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_organizer_form]%' LIMIT 1" );
     325        if( ! $post_id ) {
     326            $pages['organizer_form'] = wp_insert_post( array(
     327                'post_title'     => __( 'Add New Organizer', 'another-events-calendar' ),
     328                'post_type'      => 'page',
     329                'post_name'      => 'aec-organizer-form',
     330                'comment_status' => 'closed',
     331                'ping_status'    => 'closed',
     332                'post_content'   => '[aec_organizer_form]',
     333                'post_status'    => 'publish',
     334                'post_author'    => get_current_user_id()
     335            ));
     336        }
     337    }
     338   
     339    // Manage Organizers Page
     340    if( array_key_exists( 'manage_organizers', $page_settings ) ) {
     341       
     342        $pages['manage_organizers'] = $page_settings['manage_organizers'];
     343   
     344    } else {
     345   
     346        $post_id = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type='page' AND post_content='%[aec_manage_organizers]%' LIMIT 1" );
     347        if( ! $post_id ) {
     348            $pages['manage_organizers'] = wp_insert_post( array(
     349                'post_title'     => __( 'Manage Organizers', 'another-events-calendar' ),
     350                'post_type'      => 'page',
     351                'post_name'      => 'aec-manage-organizers',
     352                'comment_status' => 'closed',
     353                'ping_status'    => 'closed',
     354                'post_content'   => '[aec_manage_organizers]',
     355                'post_status'    => 'publish',
     356                'post_author'    => get_current_user_id()
     357            ));
     358        }
     359    }
     360           
     361    return $pages;
     362   
    38363}
    39364
     
    671996}
    672997
    673 
    674 
    675998/**
    676999 * Generate permalink for a tag page.
     
    9991322   
    10001323    if( $website = get_post_meta( $venue_id, 'website', true ) ) {
    1001         $meta[] =  sprintf( '<a href="%s" target="_blank">%s</a>', $website, $website );
     1324        $meta[] = sprintf( '<a href="%s" target="_blank" style="word-break: break-all;">%s</a>', $website, $website );
    10021325    }
    10031326   
     
    11631486
    11641487/**
     1488 * Display the Footer Text.
     1489 *
     1490 * @since    1.7.0
     1491 */
     1492function the_footer_text() {
     1493   
     1494    $general_settings = get_option( 'aec_general_settings' );
     1495   
     1496    if( ! empty( $general_settings['show_credit_link'] ) ) {
     1497        echo '<p style="font-size: 12px; margin-top: 10px;">Powered by <a href="https://yendif.com/wordpress/item/another-events-calendar.html" target="_blank">Yendif Technologies</a></p>';
     1498    }
     1499
     1500}
     1501
     1502/**
    11651503 * Display the socialshare buttons.
    11661504 *
     
    13011639    if( $all_day_event ) {
    13021640   
    1303         $formatted_date = date_i18n( get_option( 'date_format' ), strtotime( $start_date_time ) );
     1641        $formatted_date = '<span class="aec-date">' . date_i18n( get_option( 'date_format' ), strtotime( $start_date_time ) ) . '</span>';
    13041642       
    13051643        // If there is end date
     
    13131651            // If there is day difference
    13141652            if( $day_diff > 0 ) {
    1315                 $formatted_date = $formatted_date . ' - ' .date_i18n( get_option( 'date_format' ), strtotime( $end_date_time ) );
     1653                $formatted_date .= '<span class="aec-hyphen-separator">-</span>';
     1654                $formatted_date .= '<span class="aec-date">' . date_i18n( get_option( 'date_format' ), strtotime( $end_date_time ) ) . '</span>';
    13161655            }
    13171656        }
    13181657       
    13191658    } else {
    1320    
    1321         $formatted_date = date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), strtotime( $start_date_time ) );
    1322    
     1659       
     1660        $start_date = '<span class="aec-date">' . date_i18n( get_option( 'date_format' ), strtotime( $start_date_time ) ) . '</span>';
     1661        $start_time = '<span class="aec-time">' . date_i18n( get_option( 'time_format' ), strtotime( $start_date_time ) ) . '</span>';
     1662        $formatted_date = $start_date . '<span class="aec-space-separator">&nbsp;</span>' . $start_time;
     1663       
    13231664        // If there is end date
    13241665        if( '0000-00-00 00:00:00' != $end_date_time ) {
     
    13281669            $interval = $datetime1->diff( $datetime2 );
    13291670            $day_diff = $interval->format('%a');
    1330        
     1671           
    13311672            // If day difference less than 1 day
    13321673            if( $day_diff < 1 ) {
    1333                 $formatted_date = $formatted_date . ' - ' .date_i18n( get_option( 'time_format' ), strtotime( $end_date_time ) );
     1674                $formatted_date .= '<span class="aec-hyphen-separator">-</span>';
     1675                $formatted_date .= '<span class="aec-time">' . date_i18n( get_option( 'time_format' ), strtotime( $end_date_time ) ) . '</span>';
    13341676            }
    13351677       
    13361678            // Else
    13371679            else {
    1338                 $formatted_date = $formatted_date . ' - ' .date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), strtotime( $end_date_time ) );
     1680                $formatted_date .= '<span class="aec-hyphen-separator">-</span>';
     1681               
     1682                $end_date = '<span class="aec-date">' . date_i18n( get_option( 'date_format' ) , strtotime( $end_date_time ) ) . '</span>';
     1683                $end_time = '<span class="aec-time">' . date_i18n( get_option( 'time_format' ), strtotime( $end_date_time ) ) . '</span>';
     1684                $formatted_date .= $end_date . '<span class="aec-space-separator">&nbsp;</span>' . $end_time;   
    13391685            }
    13401686        }
  • another-events-calendar/trunk/languages/another-events-calendar.pot

    r1544926 r1678088  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Another Events Calendar\n"
    4 "POT-Creation-Date: 2016-12-01 10:48+0530\n"
    5 "PO-Revision-Date: 2016-12-01 10:48+0530\n"
    6 "Last-Translator: \n"
     3"Project-Id-Version: another-events-calendar\n"
     4"POT-Creation-Date: 2017-06-13 17:32+0530\n"
     5"PO-Revision-Date: 2017-06-13 17:32+0530\n"
    76"Language-Team: \n"
    8 "Language: en_US\n"
    97"MIME-Version: 1.0\n"
    108"Content-Type: text/plain; charset=UTF-8\n"
    119"Content-Transfer-Encoding: 8bit\n"
    12 "X-Generator: Poedit 1.8.9\n"
     10"X-Generator: Poedit 1.8.11\n"
    1311"X-Poedit-Basepath: ..\n"
    1412"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    15 "X-Poedit-SourceCharset: UTF-8\n"
    16 "X-Poedit-KeywordsList: __;_e;_x\n"
     13"X-Poedit-KeywordsList: __;_e\n"
     14"Last-Translator: \n"
     15"Language: en_US\n"
    1716"X-Poedit-SearchPath-0: .\n"
    1817
    19 #: admin/class-aec-admin-categories.php:33 admin/class-aec-admin-events.php:458
    20 #: admin/class-aec-admin-recurring-events.php:777
    21 #: admin/class-aec-admin-settings.php:863
    22 msgid "Categories"
    23 msgstr ""
    24 
    25 #: admin/class-aec-admin-categories.php:34
    26 msgid "Category"
    27 msgstr ""
    28 
    29 #: admin/class-aec-admin-categories.php:35
     18#: admin/class-aec-admin-categories.php:39
    3019#: public/partials/events/aec-public-single-event-display.php:48
    3120msgid "Event Categories"
    3221msgstr ""
    3322
    34 #: admin/class-aec-admin-categories.php:36
     23#: admin/class-aec-admin-categories.php:40
    3524msgid "All Categories"
    3625msgstr ""
    3726
    38 #: admin/class-aec-admin-categories.php:37
     27#: admin/class-aec-admin-categories.php:41
    3928msgid "Parent Category"
    4029msgstr ""
    4130
    42 #: admin/class-aec-admin-categories.php:38
     31#: admin/class-aec-admin-categories.php:42
    4332msgid "Parent Category:"
    4433msgstr ""
    4534
    46 #: admin/class-aec-admin-categories.php:39
     35#: admin/class-aec-admin-categories.php:43
    4736msgid "New Category Name"
    4837msgstr ""
    4938
    50 #: admin/class-aec-admin-categories.php:40
     39#: admin/class-aec-admin-categories.php:44
    5140msgid "Add New Category"
    5241msgstr ""
    5342
    54 #: admin/class-aec-admin-categories.php:41
     43#: admin/class-aec-admin-categories.php:45
    5544msgid "Edit Category"
    5645msgstr ""
    5746
    58 #: admin/class-aec-admin-categories.php:42
     47#: admin/class-aec-admin-categories.php:46
    5948msgid "Update Category"
    6049msgstr ""
    6150
    62 #: admin/class-aec-admin-categories.php:43
     51#: admin/class-aec-admin-categories.php:47
    6352msgid "View Category"
    6453msgstr ""
    6554
    66 #: admin/class-aec-admin-categories.php:44
     55#: admin/class-aec-admin-categories.php:48
    6756msgid "Separate Categories with commas"
    6857msgstr ""
    6958
    70 #: admin/class-aec-admin-categories.php:45
     59#: admin/class-aec-admin-categories.php:49
    7160msgid "Add or remove Categories"
    7261msgstr ""
    7362
    74 #: admin/class-aec-admin-categories.php:46 admin/class-aec-admin-tags.php:50
     63#: admin/class-aec-admin-categories.php:50 admin/class-aec-admin-tags.php:50
    7564msgid "Choose from the most used"
    7665msgstr ""
    7766
    78 #: admin/class-aec-admin-categories.php:48
     67#: admin/class-aec-admin-categories.php:52
    7968msgid "Search Categories"
    8069msgstr ""
    8170
    82 #: admin/class-aec-admin-categories.php:49 admin/class-aec-admin-tags.php:53
     71#: admin/class-aec-admin-categories.php:53 admin/class-aec-admin-tags.php:53
    8372msgid "Not Found"
    8473msgstr ""
    8574
    86 #: admin/class-aec-admin-events.php:41
    87 #: public/partials/organizers/aec-public-organizer-header-display.php:35
    88 #: public/partials/venues/aec-public-venue-header-display.php:28
    89 msgid "Events"
    90 msgstr ""
    91 
    92 #: admin/class-aec-admin-events.php:42 admin/class-aec-admin-events.php:44
     75#: admin/class-aec-admin-events.php:43 admin/class-aec-admin.php:126
     76msgid "Another Events Calendar"
     77msgstr ""
     78
     79#: admin/class-aec-admin-events.php:44
    9380msgid "Event"
    94 msgstr ""
    95 
    96 #: admin/class-aec-admin-events.php:43
    97 msgid "Another Events Calendar"
    9881msgstr ""
    9982
     
    10285msgstr ""
    10386
    104 #: admin/class-aec-admin-events.php:46 admin/class-aec-admin-settings.php:579
    105 #: includes/class-aec-activator.php:276
     87#: admin/class-aec-admin-events.php:46 admin/class-aec-admin-settings.php:608
     88#: includes/helper-functions.php:239
    10689#: public/partials/user/aec-public-manage-events-display.php:28
    10790msgid "Add New Event"
     
    144127msgstr ""
    145128
    146 #: admin/class-aec-admin-events.php:89
    147 #: admin/class-aec-admin-recurring-events.php:80
     129#: admin/class-aec-admin-events.php:90
     130#: admin/class-aec-admin-recurring-events.php:81
    148131msgid "Time & Date"
    149132msgstr ""
    150133
    151 #: admin/class-aec-admin-events.php:90
    152 #: admin/class-aec-admin-recurring-events.php:84
    153 #: public/partials/user/aec-public-edit-event-display.php:74
     134#: admin/class-aec-admin-events.php:91
     135#: admin/class-aec-admin-recurring-events.php:85
     136#: public/partials/user/aec-public-edit-event-display.php:77
    154137msgid "Event Cost"
    155138msgstr ""
    156139
    157 #: admin/class-aec-admin-events.php:93
    158 #: admin/class-aec-admin-recurring-events.php:87
     140#: admin/class-aec-admin-events.php:94
     141#: admin/class-aec-admin-recurring-events.php:88
    159142#: admin/partials/events/aec-admin-venues-display.php:12
    160 #: public/partials/user/aec-public-edit-event-display.php:256
     143#: public/partials/user/aec-public-edit-event-display.php:260
    161144#: widgets/search/views/widget.php:36
    162145msgid "Select Venue"
    163146msgstr ""
    164147
    165 #: admin/class-aec-admin-events.php:97
    166 #: admin/class-aec-admin-recurring-events.php:91
     148#: admin/class-aec-admin-events.php:98
     149#: admin/class-aec-admin-recurring-events.php:92
    167150#: admin/partials/events/aec-admin-organizers-display.php:13
    168 #: public/partials/user/aec-public-edit-event-display.php:369
     151#: public/partials/user/aec-public-edit-event-display.php:385
    169152msgid "Select Organizers"
    170153msgstr ""
    171154
    172 #: admin/class-aec-admin-events.php:459
    173 #: admin/class-aec-admin-recurring-events.php:778
     155#: admin/class-aec-admin-events.php:472
     156#: admin/class-aec-admin-recurring-events.php:804
     157#: admin/class-aec-admin-settings.php:892
     158msgid "Categories"
     159msgstr ""
     160
     161#: admin/class-aec-admin-events.php:473
     162#: admin/class-aec-admin-recurring-events.php:805
    174163msgid "Start Date"
    175164msgstr ""
    176165
    177 #: admin/class-aec-admin-events.php:460
    178 #: admin/class-aec-admin-recurring-events.php:779
     166#: admin/class-aec-admin-events.php:474
     167#: admin/class-aec-admin-recurring-events.php:806
    179168msgid "End Date"
    180169msgstr ""
    181170
    182 #: admin/class-aec-admin-organizers.php:37
    183171#: admin/class-aec-admin-organizers.php:39
    184172#: admin/class-aec-admin-organizers.php:41
     
    187175msgstr ""
    188176
    189 #: admin/class-aec-admin-organizers.php:38
    190 #: admin/class-aec-admin-organizers.php:40
     177#: admin/class-aec-admin-organizers.php:40 admin/class-aec-admin.php:77
     178#: public/class-aec-public.php:234
    191179msgid "Organizer"
    192180msgstr ""
    193181
    194182#: admin/class-aec-admin-organizers.php:42
    195 #: admin/class-aec-admin-settings.php:635 includes/class-aec-activator.php:324
     183#: admin/class-aec-admin-settings.php:664 includes/helper-functions.php:327
    196184#: public/partials/user/aec-public-manage-organizers-display.php:28
    197185msgid "Add New Organizer"
     
    218206msgstr ""
    219207
    220 #: admin/class-aec-admin-organizers.php:78
    221 #: public/partials/user/aec-public-edit-event-display.php:364
     208#: admin/class-aec-admin-organizers.php:79
     209#: public/partials/user/aec-public-edit-event-display.php:380
    222210msgid "Organizer Details"
    223211msgstr ""
    224212
    225 #: admin/class-aec-admin-organizers.php:186
     213#: admin/class-aec-admin-organizers.php:187
    226214msgid "Enter organizer name"
    227215msgstr ""
    228216
    229 #: admin/class-aec-admin-organizers.php:208
     217#: admin/class-aec-admin-organizers.php:209
    230218#: admin/partials/events/aec-admin-organizers-display.php:66
    231219#: admin/partials/events/aec-admin-venues-display.php:96
    232220#: admin/partials/organizers/aec-admin-organizers-display.php:20
    233221#: admin/partials/venues/aec-admin-venues-display.php:67
    234 #: public/partials/user/aec-public-edit-event-display.php:330
    235 #: public/partials/user/aec-public-edit-event-display.php:422
     222#: public/partials/user/aec-public-edit-event-display.php:334
     223#: public/partials/user/aec-public-edit-event-display.php:438
    236224#: public/partials/user/aec-public-edit-organizer-display.php:59
    237225#: public/partials/user/aec-public-edit-venue-display.php:89
     
    239227msgstr ""
    240228
    241 #: admin/class-aec-admin-organizers.php:209
     229#: admin/class-aec-admin-organizers.php:210
    242230#: admin/partials/events/aec-admin-organizers-display.php:58
    243231#: admin/partials/organizers/aec-admin-organizers-display.php:28
    244 #: public/partials/user/aec-public-edit-event-display.php:415
     232#: public/partials/user/aec-public-edit-event-display.php:431
    245233#: public/partials/user/aec-public-edit-organizer-display.php:66
    246234#: public/partials/user/aec-public-manage-organizers-display.php:43
     
    248236msgstr ""
    249237
    250 #: admin/class-aec-admin-organizers.php:213
    251 #: admin/class-aec-admin-settings.php:394 admin/class-aec-admin-venues.php:250
     238#: admin/class-aec-admin-organizers.php:214
     239#: admin/class-aec-admin-settings.php:423 admin/class-aec-admin-venues.php:251
    252240#: public/partials/user/aec-public-manage-organizers-display.php:42
    253241msgid "Name"
    254242msgstr ""
    255243
    256 #: admin/class-aec-admin-recurring-events.php:37
    257244#: admin/class-aec-admin-recurring-events.php:39
    258245#: admin/class-aec-admin-recurring-events.php:41
     
    260247msgstr ""
    261248
    262 #: admin/class-aec-admin-recurring-events.php:38
    263249#: admin/class-aec-admin-recurring-events.php:40
    264 #: public/partials/calendar/aec-public-calendar-daily-display.php:97
    265 #: public/partials/calendar/aec-public-calendar-weekly-display.php:103
     250#: public/partials/calendar/aec-public-calendar-daily-display.php:98
     251#: public/partials/calendar/aec-public-calendar-weekly-display.php:104
    266252#: public/partials/events/aec-public-events-blog-display.php:58
    267 #: public/partials/events/aec-public-events-grid-display.php:60
     253#: public/partials/events/aec-public-events-grid-display.php:61
    268254#: public/partials/events/aec-public-events-table-display.php:67
    269255#: public/partials/events/aec-public-single-event-display.php:14
    270 #: widgets/upcoming-events/views/widget.php:31
     256#: widgets/past-events/views/widget.php:32
     257#: widgets/upcoming-events/views/widget.php:32
    271258msgid "Recurring Event"
    272259msgstr ""
     
    293280
    294281#: admin/class-aec-admin-recurring-events.php:48 widgets/search/search.php:37
    295 #: widgets/search/search.php:118
     282#: widgets/search/search.php:124
    296283msgid "Search Events"
    297284msgstr ""
    298285
    299286#: admin/class-aec-admin-recurring-events.php:49
    300 #: public/class-aec-public-categories.php:153
    301 #: public/class-aec-public-organizers.php:162
    302 #: public/class-aec-public-tags.php:155 public/class-aec-public-venues.php:165
    303 #: public/partials/calendar/aec-public-calendar-daily-display.php:128
    304 #: public/partials/calendar/aec-public-calendar-weekly-display.php:137
     287#: public/class-aec-public-categories.php:187
     288#: public/class-aec-public-organizers.php:170
     289#: public/class-aec-public-tags.php:166 public/class-aec-public-venues.php:177
     290#: public/partials/calendar/aec-public-calendar-daily-display.php:145
     291#: public/partials/calendar/aec-public-calendar-weekly-display.php:154
    305292msgid "No events found."
    306293msgstr ""
     
    310297msgstr ""
    311298
    312 #: admin/class-aec-admin-recurring-events.php:82
     299#: admin/class-aec-admin-recurring-events.php:83
    313300msgid "Recurring Settings"
    314301msgstr ""
     
    341328
    342329#: admin/class-aec-admin-settings.php:106
     330msgid "Enable Categories"
     331msgstr ""
     332
     333#: admin/class-aec-admin-settings.php:113
     334msgid "Check this to enable categories"
     335msgstr ""
     336
     337#: admin/class-aec-admin-settings.php:120
    343338msgid "Enable Tags"
    344339msgstr ""
    345340
    346 #: admin/class-aec-admin-settings.php:113
     341#: admin/class-aec-admin-settings.php:127
    347342msgid "Check this to enable tags"
    348343msgstr ""
    349344
    350 #: admin/class-aec-admin-settings.php:120
     345#: admin/class-aec-admin-settings.php:134
    351346msgid "Enable Venues"
    352347msgstr ""
    353348
    354 #: admin/class-aec-admin-settings.php:127
     349#: admin/class-aec-admin-settings.php:141
    355350msgid "Check this to enable venues"
    356351msgstr ""
    357352
    358 #: admin/class-aec-admin-settings.php:133
     353#: admin/class-aec-admin-settings.php:147
    359354msgid "Enable Organizers"
    360355msgstr ""
    361356
    362 #: admin/class-aec-admin-settings.php:140
     357#: admin/class-aec-admin-settings.php:154
    363358msgid "Check this to enable organizers"
    364359msgstr ""
    365360
    366 #: admin/class-aec-admin-settings.php:146
     361#: admin/class-aec-admin-settings.php:160
    367362msgid "Enable Recurring Events"
    368363msgstr ""
    369364
    370 #: admin/class-aec-admin-settings.php:153
     365#: admin/class-aec-admin-settings.php:167
    371366msgid "Check this to enable recurring events"
    372367msgstr ""
    373368
    374 #: admin/class-aec-admin-settings.php:159
     369#: admin/class-aec-admin-settings.php:173
    375370msgid "Show Comments"
    376371msgstr ""
    377372
    378 #: admin/class-aec-admin-settings.php:166
     373#: admin/class-aec-admin-settings.php:180
    379374msgid "Check this to enable comments on event pages"
    380375msgstr ""
    381376
    382 #: admin/class-aec-admin-settings.php:172
     377#: admin/class-aec-admin-settings.php:186
    383378msgid "Show Past Events"
    384379msgstr ""
    385380
    386 #: admin/class-aec-admin-settings.php:179
     381#: admin/class-aec-admin-settings.php:193
    387382msgid "Check this to show past events"
    388383msgstr ""
    389384
    390 #: admin/class-aec-admin-settings.php:185
     385#: admin/class-aec-admin-settings.php:199
    391386msgid "Default Location"
    392387msgstr ""
    393388
    394 #: admin/class-aec-admin-settings.php:193
     389#: admin/class-aec-admin-settings.php:207
    395390msgid "Select a country that must be pre-selected when adding a new venue."
    396391msgstr ""
    397392
    398 #: admin/class-aec-admin-settings.php:206
    399 #: admin/class-aec-admin-settings.php:467 includes/class-aec-activator.php:167
     393#: admin/class-aec-admin-settings.php:213
     394msgid "Show Footer Credit"
     395msgstr ""
     396
     397#: admin/class-aec-admin-settings.php:220
     398msgid ""
     399"Check this to show a link to the plugin website at the bottom of your event "
     400"pages."
     401msgstr ""
     402
     403#: admin/class-aec-admin-settings.php:233
     404#: admin/class-aec-admin-settings.php:496 includes/helper-functions.php:63
    400405msgid "Calendar Page"
    401406msgstr ""
    402407
    403 #: admin/class-aec-admin-settings.php:213
    404 #: admin/class-aec-admin-settings.php:276
     408#: admin/class-aec-admin-settings.php:240
     409#: admin/class-aec-admin-settings.php:303
    405410msgid "View Options"
    406411msgstr ""
    407412
    408 #: admin/class-aec-admin-settings.php:221
    409 #: admin/class-aec-admin-settings.php:239
     413#: admin/class-aec-admin-settings.php:248
     414#: admin/class-aec-admin-settings.php:266
    410415msgid "Monthly view"
    411416msgstr ""
    412417
    413 #: admin/class-aec-admin-settings.php:222
    414 #: admin/class-aec-admin-settings.php:240
     418#: admin/class-aec-admin-settings.php:249
     419#: admin/class-aec-admin-settings.php:267
    415420msgid "Weekly view"
    416421msgstr ""
    417422
    418 #: admin/class-aec-admin-settings.php:223
    419 #: admin/class-aec-admin-settings.php:241
     423#: admin/class-aec-admin-settings.php:250
     424#: admin/class-aec-admin-settings.php:268
    420425msgid "Daily view"
    421426msgstr ""
    422427
    423 #: admin/class-aec-admin-settings.php:225
    424 #: admin/class-aec-admin-settings.php:288
     428#: admin/class-aec-admin-settings.php:252
     429#: admin/class-aec-admin-settings.php:316
    425430msgid "You must select at least one view."
    426431msgstr ""
    427432
    428 #: admin/class-aec-admin-settings.php:231
    429 #: admin/class-aec-admin-settings.php:294
     433#: admin/class-aec-admin-settings.php:258
     434#: admin/class-aec-admin-settings.php:322
    430435msgid "Default View"
    431436msgstr ""
    432437
    433 #: admin/class-aec-admin-settings.php:248
     438#: admin/class-aec-admin-settings.php:275
    434439msgid "Show all days of multi-day events"
    435440msgstr ""
    436441
    437 #: admin/class-aec-admin-settings.php:255
     442#: admin/class-aec-admin-settings.php:282
    438443msgid ""
    439444"When checked, events running on multiple days will appear on each of those "
     
    441446msgstr ""
    442447
    443 #: admin/class-aec-admin-settings.php:269
     448#: admin/class-aec-admin-settings.php:296
    444449msgid "Event Archive Pages"
    445450msgstr ""
    446451
    447 #: admin/class-aec-admin-settings.php:284
    448 #: admin/class-aec-admin-settings.php:302
     452#: admin/class-aec-admin-settings.php:311
     453#: admin/class-aec-admin-settings.php:330
    449454msgid "Table view"
    450455msgstr ""
    451456
    452 #: admin/class-aec-admin-settings.php:285
    453 #: admin/class-aec-admin-settings.php:303
     457#: admin/class-aec-admin-settings.php:312
     458#: admin/class-aec-admin-settings.php:331
    454459msgid "Grid view"
    455460msgstr ""
    456461
    457 #: admin/class-aec-admin-settings.php:286
    458 #: admin/class-aec-admin-settings.php:304
     462#: admin/class-aec-admin-settings.php:313
     463#: admin/class-aec-admin-settings.php:332
    459464msgid "Blog view"
    460465msgstr ""
    461466
    462 #: admin/class-aec-admin-settings.php:311
     467#: admin/class-aec-admin-settings.php:314
     468#: admin/class-aec-admin-settings.php:333
     469msgid "Map view"
     470msgstr ""
     471
     472#: admin/class-aec-admin-settings.php:340
    463473msgid "Order Events By"
    464474msgstr ""
    465475
    466 #: admin/class-aec-admin-settings.php:319
     476#: admin/class-aec-admin-settings.php:348
    467477#: public/partials/user/aec-public-manage-events-display.php:42
    468 #: widgets/mini-calender/views/form.php:9 widgets/search/views/form.php:9
    469 #: widgets/upcoming-events/views/form.php:9
     478#: widgets/mini-calender/views/form.php:9 widgets/past-events/views/form.php:9
     479#: widgets/search/views/form.php:9 widgets/upcoming-events/views/form.php:9
    470480msgid "Title"
    471481msgstr ""
    472482
    473 #: admin/class-aec-admin-settings.php:320
     483#: admin/class-aec-admin-settings.php:349
    474484msgid "Date posted"
    475485msgstr ""
    476486
    477 #: admin/class-aec-admin-settings.php:321
     487#: admin/class-aec-admin-settings.php:350
    478488msgid "Event start date"
    479489msgstr ""
    480490
    481 #: admin/class-aec-admin-settings.php:328
     491#: admin/class-aec-admin-settings.php:357
    482492msgid "Sort Events By"
    483493msgstr ""
    484494
    485 #: admin/class-aec-admin-settings.php:336
    486 #: admin/class-aec-admin-settings.php:410
     495#: admin/class-aec-admin-settings.php:365
     496#: admin/class-aec-admin-settings.php:439
    487497msgid "Ascending"
    488498msgstr ""
    489499
    490 #: admin/class-aec-admin-settings.php:337
    491 #: admin/class-aec-admin-settings.php:411
     500#: admin/class-aec-admin-settings.php:366
     501#: admin/class-aec-admin-settings.php:440
    492502msgid "Descending"
    493503msgstr ""
    494504
    495 #: admin/class-aec-admin-settings.php:344
     505#: admin/class-aec-admin-settings.php:373
    496506msgid "Number of columns ( grid view only )"
    497507msgstr ""
    498508
    499 #: admin/class-aec-admin-settings.php:351
     509#: admin/class-aec-admin-settings.php:380
    500510msgid ""
    501511"Enter the number of columns in which the events should display in grid view."
    502512msgstr ""
    503513
    504 #: admin/class-aec-admin-settings.php:357
     514#: admin/class-aec-admin-settings.php:386
    505515msgid "Number of events to show per page"
    506516msgstr ""
    507517
    508 #: admin/class-aec-admin-settings.php:364
     518#: admin/class-aec-admin-settings.php:393
    509519msgid "Enter the maximum number of events to show per page."
    510520msgstr ""
    511521
    512 #: admin/class-aec-admin-settings.php:377
    513 #: admin/class-aec-admin-settings.php:495 includes/class-aec-activator.php:191
     522#: admin/class-aec-admin-settings.php:406
     523#: admin/class-aec-admin-settings.php:524 includes/helper-functions.php:107
    514524msgid "Categories Page"
    515525msgstr ""
    516526
    517 #: admin/class-aec-admin-settings.php:384
     527#: admin/class-aec-admin-settings.php:413
    518528msgid "Order Categories By"
    519529msgstr ""
    520530
    521 #: admin/class-aec-admin-settings.php:392
     531#: admin/class-aec-admin-settings.php:421
    522532msgid "Id"
    523533msgstr ""
    524534
    525 #: admin/class-aec-admin-settings.php:393
     535#: admin/class-aec-admin-settings.php:422
    526536msgid "Count"
    527537msgstr ""
    528538
    529 #: admin/class-aec-admin-settings.php:395
     539#: admin/class-aec-admin-settings.php:424
    530540msgid "Slug"
    531541msgstr ""
    532542
    533 #: admin/class-aec-admin-settings.php:402
     543#: admin/class-aec-admin-settings.php:431
    534544msgid "Sort Categories By"
    535545msgstr ""
    536546
    537 #: admin/class-aec-admin-settings.php:418
     547#: admin/class-aec-admin-settings.php:447
    538548msgid "Show Events count next to Category name"
    539549msgstr ""
    540550
    541 #: admin/class-aec-admin-settings.php:425
     551#: admin/class-aec-admin-settings.php:454
    542552msgid "Check this to show events count next to the category name"
    543553msgstr ""
    544554
    545 #: admin/class-aec-admin-settings.php:431
     555#: admin/class-aec-admin-settings.php:460
    546556msgid "Hide Empty Categories"
    547557msgstr ""
    548558
    549 #: admin/class-aec-admin-settings.php:438
     559#: admin/class-aec-admin-settings.php:467
    550560msgid "Check this to hide categories with no events"
    551561msgstr ""
    552562
    553 #: admin/class-aec-admin-settings.php:460
     563#: admin/class-aec-admin-settings.php:489
    554564msgid "Configure Pages"
    555565msgstr ""
    556566
    557 #: admin/class-aec-admin-settings.php:475
     567#: admin/class-aec-admin-settings.php:504
    558568msgid ""
    559569"This is the page where your events are displayed in calendar. [aec_calendar] "
     
    561571msgstr ""
    562572
    563 #: admin/class-aec-admin-settings.php:481 includes/class-aec-activator.php:179
     573#: admin/class-aec-admin-settings.php:510 includes/helper-functions.php:85
    564574msgid "Events Page"
    565575msgstr ""
    566576
    567 #: admin/class-aec-admin-settings.php:489
     577#: admin/class-aec-admin-settings.php:518
    568578msgid ""
    569579"This is the page where all your events are displayed. [aec_events] shortcode "
     
    571581msgstr ""
    572582
    573 #: admin/class-aec-admin-settings.php:503
     583#: admin/class-aec-admin-settings.php:532
    574584msgid ""
    575585"This is the page where all your event categories are displayed. "
     
    577587msgstr ""
    578588
    579 #: admin/class-aec-admin-settings.php:509 includes/class-aec-activator.php:203
     589#: admin/class-aec-admin-settings.php:538 includes/helper-functions.php:129
    580590msgid "Single Category Page"
    581591msgstr ""
    582592
    583 #: admin/class-aec-admin-settings.php:517
     593#: admin/class-aec-admin-settings.php:546
    584594msgid ""
    585595"This is the page where events from a single category are displayed. "
     
    587597msgstr ""
    588598
    589 #: admin/class-aec-admin-settings.php:523 includes/class-aec-activator.php:215
     599#: admin/class-aec-admin-settings.php:552 includes/helper-functions.php:151
    590600msgid "Single Tag Page"
    591601msgstr ""
    592602
    593 #: admin/class-aec-admin-settings.php:531
     603#: admin/class-aec-admin-settings.php:560
    594604msgid ""
    595605"This is the page where events from a single tag are displayed. [aec_tag] "
     
    597607msgstr ""
    598608
    599 #: admin/class-aec-admin-settings.php:537 includes/class-aec-activator.php:227
     609#: admin/class-aec-admin-settings.php:566 includes/helper-functions.php:173
    600610msgid "Single Venue Page"
    601611msgstr ""
    602612
    603 #: admin/class-aec-admin-settings.php:545
     613#: admin/class-aec-admin-settings.php:574
    604614msgid ""
    605615"This is the page where events from a single venue are displayed. [aec_venue] "
     
    607617msgstr ""
    608618
    609 #: admin/class-aec-admin-settings.php:551 includes/class-aec-activator.php:239
     619#: admin/class-aec-admin-settings.php:580 includes/helper-functions.php:195
    610620msgid "Single Organizer Page"
    611621msgstr ""
    612622
    613 #: admin/class-aec-admin-settings.php:559
     623#: admin/class-aec-admin-settings.php:588
    614624msgid ""
    615625"This is the organizer profile page. [aec_organizer] shortcode must be in "
     
    617627msgstr ""
    618628
    619 #: admin/class-aec-admin-settings.php:565 includes/class-aec-activator.php:251
     629#: admin/class-aec-admin-settings.php:594 includes/helper-functions.php:217
    620630msgid "Search Results Page"
    621631msgstr ""
    622632
    623 #: admin/class-aec-admin-settings.php:573
     633#: admin/class-aec-admin-settings.php:602
    624634msgid ""
    625635"This is the page where the event search results are displayed. [aec_search] "
     
    627637msgstr ""
    628638
    629 #: admin/class-aec-admin-settings.php:587
     639#: admin/class-aec-admin-settings.php:616
    630640msgid ""
    631641"This is the form page where the users can add their events in your website. "
     
    633643msgstr ""
    634644
    635 #: admin/class-aec-admin-settings.php:593 includes/class-aec-activator.php:288
     645#: admin/class-aec-admin-settings.php:622 includes/helper-functions.php:261
    636646msgid "Manage Events"
    637647msgstr ""
    638648
    639 #: admin/class-aec-admin-settings.php:601
     649#: admin/class-aec-admin-settings.php:630
    640650msgid ""
    641651"This is the page where the users can manage(Add/Edit/Delete) their own "
     
    643653msgstr ""
    644654
    645 #: admin/class-aec-admin-settings.php:607 admin/class-aec-admin-venues.php:42
    646 #: includes/class-aec-activator.php:300
     655#: admin/class-aec-admin-settings.php:636 admin/class-aec-admin-venues.php:42
     656#: includes/helper-functions.php:283
    647657#: public/partials/user/aec-public-manage-venues-display.php:28
    648658msgid "Add New Venue"
    649659msgstr ""
    650660
    651 #: admin/class-aec-admin-settings.php:615
     661#: admin/class-aec-admin-settings.php:644
    652662msgid ""
    653663"This is the form page where the users can add their venues in your website. "
     
    655665msgstr ""
    656666
    657 #: admin/class-aec-admin-settings.php:621 includes/class-aec-activator.php:312
     667#: admin/class-aec-admin-settings.php:650 includes/helper-functions.php:305
    658668msgid "Manage Venues"
    659669msgstr ""
    660670
    661 #: admin/class-aec-admin-settings.php:629
     671#: admin/class-aec-admin-settings.php:658
    662672msgid ""
    663673"This is the page where the users can manage(Add/Edit/Delete) their own "
     
    665675msgstr ""
    666676
    667 #: admin/class-aec-admin-settings.php:643
     677#: admin/class-aec-admin-settings.php:672
    668678msgid ""
    669679"This is the form page where the users can add their organizers in your "
     
    671681msgstr ""
    672682
    673 #: admin/class-aec-admin-settings.php:649 includes/class-aec-activator.php:336
     683#: admin/class-aec-admin-settings.php:678 includes/helper-functions.php:349
    674684msgid "Manage Organizers"
    675685msgstr ""
    676686
    677 #: admin/class-aec-admin-settings.php:657
     687#: admin/class-aec-admin-settings.php:686
    678688msgid ""
    679689"This is the page where the users can manage(Add/Edit/Delete) their "
     
    681691msgstr ""
    682692
    683 #: admin/class-aec-admin-settings.php:679
     693#: admin/class-aec-admin-settings.php:708
    684694msgid "Permalink Settings"
    685695msgstr ""
    686696
    687 #: admin/class-aec-admin-settings.php:686
     697#: admin/class-aec-admin-settings.php:715
    688698msgid "Single event URL slug"
    689699msgstr ""
    690700
    691 #: admin/class-aec-admin-settings.php:693
     701#: admin/class-aec-admin-settings.php:722
    692702msgid ""
    693703"A typical single event page will include the alias 'aec_events' in it's URL. "
     
    699709msgstr ""
    700710
    701 #: admin/class-aec-admin-settings.php:693
     711#: admin/class-aec-admin-settings.php:722
    702712msgid "Example URL"
    703713msgstr ""
    704714
    705 #: admin/class-aec-admin-settings.php:706
     715#: admin/class-aec-admin-settings.php:735
    706716msgid "Currency Settings"
    707717msgstr ""
    708718
    709 #: admin/class-aec-admin-settings.php:713
     719#: admin/class-aec-admin-settings.php:742
    710720msgid "Currency"
    711721msgstr ""
    712722
    713 #: admin/class-aec-admin-settings.php:720
     723#: admin/class-aec-admin-settings.php:749
    714724msgid "Enter the currency value to display with your event prices."
    715725msgstr ""
    716726
    717 #: admin/class-aec-admin-settings.php:726
     727#: admin/class-aec-admin-settings.php:755
    718728msgid "Currency Position"
    719729msgstr ""
    720730
    721 #: admin/class-aec-admin-settings.php:734
     731#: admin/class-aec-admin-settings.php:763
    722732msgid "Before - $10"
    723733msgstr ""
    724734
    725 #: admin/class-aec-admin-settings.php:735
     735#: admin/class-aec-admin-settings.php:764
    726736msgid "After - 10$"
    727737msgstr ""
    728738
    729 #: admin/class-aec-admin-settings.php:737
     739#: admin/class-aec-admin-settings.php:766
    730740msgid "Choose the location of the currency sign."
    731741msgstr ""
    732742
    733 #: admin/class-aec-admin-settings.php:743
     743#: admin/class-aec-admin-settings.php:772
    734744msgid "Thousands Separator"
    735745msgstr ""
    736746
    737 #: admin/class-aec-admin-settings.php:750
     747#: admin/class-aec-admin-settings.php:779
    738748msgid "The symbol (usually , or .) to separate thousands."
    739749msgstr ""
    740750
    741 #: admin/class-aec-admin-settings.php:756
     751#: admin/class-aec-admin-settings.php:785
    742752msgid "Decimal Separator"
    743753msgstr ""
    744754
    745 #: admin/class-aec-admin-settings.php:763
     755#: admin/class-aec-admin-settings.php:792
    746756msgid "The symbol (usually , or .) to separate decimal points."
    747757msgstr ""
    748758
    749 #: admin/class-aec-admin-settings.php:776
     759#: admin/class-aec-admin-settings.php:805
    750760msgid "Map Settings"
    751761msgstr ""
    752762
    753 #: admin/class-aec-admin-settings.php:783
     763#: admin/class-aec-admin-settings.php:812
    754764msgid "Enable Google Maps"
    755765msgstr ""
    756766
    757 #: admin/class-aec-admin-settings.php:790
     767#: admin/class-aec-admin-settings.php:819
    758768msgid "Check this to enable maps"
    759769msgstr ""
    760770
    761 #: admin/class-aec-admin-settings.php:796
     771#: admin/class-aec-admin-settings.php:825
    762772msgid "Google Maps API Key"
    763773msgstr ""
    764774
    765 #: admin/class-aec-admin-settings.php:803
     775#: admin/class-aec-admin-settings.php:832
    766776msgid "Get A Key"
    767777msgstr ""
    768778
    769 #: admin/class-aec-admin-settings.php:809
     779#: admin/class-aec-admin-settings.php:838
    770780msgid "Default Zoom Level"
    771781msgstr ""
    772782
    773 #: admin/class-aec-admin-settings.php:816
     783#: admin/class-aec-admin-settings.php:845
    774784msgid "0 = zoomed out; 21 = zoomed in."
    775785msgstr ""
    776786
    777 #: admin/class-aec-admin-settings.php:829
     787#: admin/class-aec-admin-settings.php:858
    778788msgid "Social-share Settings"
    779789msgstr ""
    780790
    781 #: admin/class-aec-admin-settings.php:836
     791#: admin/class-aec-admin-settings.php:865
    782792msgid "Enable Services"
    783793msgstr ""
    784794
    785 #: admin/class-aec-admin-settings.php:844 includes/helper-functions.php:1154
     795#: admin/class-aec-admin-settings.php:873 includes/helper-functions.php:1596
    786796msgid "Facebook"
    787797msgstr ""
    788798
    789 #: admin/class-aec-admin-settings.php:845 includes/helper-functions.php:1158
     799#: admin/class-aec-admin-settings.php:874 includes/helper-functions.php:1600
    790800msgid "Twitter"
    791801msgstr ""
    792802
    793 #: admin/class-aec-admin-settings.php:846
     803#: admin/class-aec-admin-settings.php:875
    794804msgid "GPlus"
    795805msgstr ""
    796806
    797 #: admin/class-aec-admin-settings.php:847 includes/helper-functions.php:1166
     807#: admin/class-aec-admin-settings.php:876 includes/helper-functions.php:1608
    798808msgid "Linkedin"
    799809msgstr ""
    800810
    801 #: admin/class-aec-admin-settings.php:848
     811#: admin/class-aec-admin-settings.php:877
    802812msgid "Pinterest"
    803813msgstr ""
    804814
    805 #: admin/class-aec-admin-settings.php:855
     815#: admin/class-aec-admin-settings.php:884
    806816msgid "Show in pages"
    807817msgstr ""
    808818
    809 #: admin/class-aec-admin-settings.php:864
     819#: admin/class-aec-admin-settings.php:893
    810820msgid "Event archives"
    811821msgstr ""
    812822
    813 #: admin/class-aec-admin-settings.php:865
     823#: admin/class-aec-admin-settings.php:894
    814824msgid "Event detail page"
    815825msgstr ""
    816826
    817 #: admin/class-aec-admin-settings.php:890
     827#: admin/class-aec-admin-settings.php:919
    818828msgid ""
    819829"During the plugin activation, Another Events Calendar will add some pages "
     
    825835msgstr ""
    826836
    827 #: admin/class-aec-admin-tags.php:37
    828 msgid "Tags"
    829 msgstr ""
    830 
    831 #: admin/class-aec-admin-tags.php:38
    832 msgid "Tag"
    833 msgstr ""
    834 
    835837#: admin/class-aec-admin-tags.php:39
    836838#: public/partials/events/aec-public-single-event-display.php:60
     
    886888msgstr ""
    887889
    888 #: admin/class-aec-admin-venues.php:37 admin/class-aec-admin-venues.php:39
    889 #: admin/class-aec-admin-venues.php:41
     890#: admin/class-aec-admin-venues.php:39 admin/class-aec-admin-venues.php:41
    890891msgid "Venues"
    891892msgstr ""
    892893
    893 #: admin/class-aec-admin-venues.php:38 admin/class-aec-admin-venues.php:40
    894 #: public/partials/events/aec-public-single-event-display.php:104
     894#: admin/class-aec-admin-venues.php:40
     895#: public/partials/events/aec-public-single-event-display.php:105
    895896msgid "Venue"
    896897msgstr ""
     
    916917msgstr ""
    917918
    918 #: admin/class-aec-admin-venues.php:78
    919 #: public/partials/user/aec-public-edit-event-display.php:251
     919#: admin/class-aec-admin-venues.php:79
     920#: public/partials/user/aec-public-edit-event-display.php:255
    920921msgid "Venue Details"
    921922msgstr ""
    922923
    923 #: admin/class-aec-admin-venues.php:203
     924#: admin/class-aec-admin-venues.php:204
    924925msgid "Yes"
    925926msgstr ""
    926927
    927 #: admin/class-aec-admin-venues.php:203
     928#: admin/class-aec-admin-venues.php:204
    928929msgid "No"
    929930msgstr ""
    930931
    931 #: admin/class-aec-admin-venues.php:223
     932#: admin/class-aec-admin-venues.php:224
    932933msgid "Enter venue name"
    933934msgstr ""
    934935
    935 #: admin/class-aec-admin-venues.php:245
    936 #: public/partials/user/aec-public-edit-event-display.php:301
     936#: admin/class-aec-admin-venues.php:246
     937#: public/partials/user/aec-public-edit-event-display.php:305
    937938#: public/partials/user/aec-public-edit-venue-display.php:59
    938939#: public/partials/user/aec-public-manage-venues-display.php:44
     
    940941msgstr ""
    941942
    942 #: admin/class-aec-admin-venues.php:246
     943#: admin/class-aec-admin-venues.php:247
    943944msgid "Hide Map"
     945msgstr ""
     946
     947#: admin/class-aec-admin.php:128
     948msgid "Documentation"
     949msgstr ""
     950
     951#: admin/class-aec-admin.php:131
     952msgid "Support E-Mail"
     953msgstr ""
     954
     955#: admin/class-aec-admin.php:134
     956msgid "Ask in our Forum"
    944957msgstr ""
    945958
     
    954967
    955968#: admin/partials/events/aec-admin-events-display.php:12
    956 #: public/partials/user/aec-public-edit-event-display.php:90
     969#: public/partials/user/aec-public-edit-event-display.php:93
    957970msgid "All Day Event"
    958971msgstr ""
    959972
    960973#: admin/partials/events/aec-admin-events-display.php:20
    961 #: public/partials/user/aec-public-edit-event-display.php:97
     974#: public/partials/user/aec-public-edit-event-display.php:100
    962975msgid "Start Date & Time"
    963976msgstr ""
    964977
    965978#: admin/partials/events/aec-admin-events-display.php:46
    966 #: public/partials/user/aec-public-edit-event-display.php:124
     979#: public/partials/user/aec-public-edit-event-display.php:127
    967980msgid "End Date & Time"
    968981msgstr ""
    969982
    970983#: admin/partials/events/aec-admin-organizers-display.php:32
    971 #: public/partials/user/aec-public-edit-event-display.php:387
     984#: public/partials/user/aec-public-edit-event-display.php:403
    972985msgid "Add another Organizer"
    973986msgstr ""
    974987
    975988#: admin/partials/events/aec-admin-organizers-display.php:42
    976 #: public/partials/user/aec-public-edit-event-display.php:401
     989#: public/partials/user/aec-public-edit-event-display.php:417
    977990#: public/partials/user/aec-public-edit-organizer-display.php:13
    978991msgid "Organizer Name"
     
    983996#: admin/partials/organizers/aec-admin-organizers-display.php:12
    984997#: admin/partials/venues/aec-admin-venues-display.php:59
    985 #: includes/helper-functions.php:893
     998#: includes/helper-functions.php:1320
    986999#: public/partials/organizers/aec-public-organizer-header-display.php:24
    987 #: public/partials/user/aec-public-edit-event-display.php:408
     1000#: public/partials/user/aec-public-edit-event-display.php:424
    9881001#: public/partials/user/aec-public-edit-organizer-display.php:52
    9891002#: public/partials/user/aec-public-edit-venue-display.php:82
     
    9931006
    9941007#: admin/partials/events/aec-admin-venues-display.php:16
    995 #: public/partials/user/aec-public-edit-event-display.php:259
     1008#: public/partials/user/aec-public-edit-event-display.php:263
    9961009msgid "Create New Venue"
    9971010msgstr ""
    9981011
    9991012#: admin/partials/events/aec-admin-venues-display.php:33
    1000 #: public/partials/user/aec-public-edit-event-display.php:273
     1013#: public/partials/user/aec-public-edit-event-display.php:277
    10011014#: public/partials/user/aec-public-manage-venues-display.php:42
    10021015msgid "Venue Name"
     
    10051018#: admin/partials/events/aec-admin-venues-display.php:41
    10061019#: admin/partials/venues/aec-admin-venues-display.php:12
    1007 #: public/partials/user/aec-public-edit-event-display.php:280
     1020#: public/partials/user/aec-public-edit-event-display.php:284
    10081021#: public/partials/user/aec-public-edit-venue-display.php:38
    10091022msgid "Address"
     
    10121025#: admin/partials/events/aec-admin-venues-display.php:49
    10131026#: admin/partials/venues/aec-admin-venues-display.php:20
    1014 #: public/partials/user/aec-public-edit-event-display.php:287
     1027#: public/partials/user/aec-public-edit-event-display.php:291
    10151028#: public/partials/user/aec-public-edit-venue-display.php:45
    10161029msgid "City"
     
    10191032#: admin/partials/events/aec-admin-venues-display.php:57
    10201033#: admin/partials/venues/aec-admin-venues-display.php:28
    1021 #: public/partials/user/aec-public-edit-event-display.php:294
     1034#: public/partials/user/aec-public-edit-event-display.php:298
    10221035#: public/partials/user/aec-public-edit-venue-display.php:52
    10231036#: public/partials/user/aec-public-manage-venues-display.php:43
     
    10291042#: admin/partials/venues/aec-admin-venues-display.php:36
    10301043#: admin/partials/venues/aec-admin-venues-display.php:40
    1031 #: public/partials/user/aec-public-edit-event-display.php:304
     1044#: public/partials/user/aec-public-edit-event-display.php:308
    10321045#: public/partials/user/aec-public-edit-venue-display.php:62
    10331046msgid "Select Country"
     
    10361049#: admin/partials/events/aec-admin-venues-display.php:80
    10371050#: admin/partials/venues/aec-admin-venues-display.php:51
    1038 #: public/partials/user/aec-public-edit-event-display.php:316
     1051#: public/partials/user/aec-public-edit-event-display.php:320
    10391052#: public/partials/user/aec-public-edit-venue-display.php:75
    10401053msgid "Postal Code"
     
    10431056#: admin/partials/events/aec-admin-venues-display.php:105
    10441057#: admin/partials/venues/aec-admin-venues-display.php:76
    1045 #: public/partials/user/aec-public-edit-event-display.php:351
     1058#: public/partials/user/aec-public-edit-event-display.php:365
    10461059msgid "Hide Google Map"
    10471060msgstr ""
    10481061
    10491062#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:12
    1050 #: public/partials/user/aec-public-edit-event-display.php:159
     1063#: public/partials/user/aec-public-edit-event-display.php:162
    10511064msgid "Repeat type"
    10521065msgstr ""
    10531066
    10541067#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:16
    1055 #: public/partials/user/aec-public-edit-event-display.php:164
     1068#: public/partials/user/aec-public-edit-event-display.php:167
    10561069msgid "No repeat"
    10571070msgstr ""
    10581071
    10591072#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:17
    1060 #: public/partials/user/aec-public-edit-event-display.php:165
     1073#: public/partials/user/aec-public-edit-event-display.php:168
    10611074msgid "Daily"
    10621075msgstr ""
    10631076
    10641077#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:18
    1065 #: public/partials/user/aec-public-edit-event-display.php:166
     1078#: public/partials/user/aec-public-edit-event-display.php:169
    10661079msgid "Weekly"
    10671080msgstr ""
    10681081
    10691082#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:19
    1070 #: public/partials/user/aec-public-edit-event-display.php:167
     1083#: public/partials/user/aec-public-edit-event-display.php:170
    10711084msgid "Monthly"
    10721085msgstr ""
     
    10741087#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:25
    10751088#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:34
    1076 #: public/partials/user/aec-public-edit-event-display.php:174
    1077 #: public/partials/user/aec-public-edit-event-display.php:183
     1089#: public/partials/user/aec-public-edit-event-display.php:177
     1090#: public/partials/user/aec-public-edit-event-display.php:186
    10781091msgid "Repeat every"
    10791092msgstr ""
    10801093
    10811094#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:27
    1082 #: public/partials/user/aec-public-edit-event-display.php:176
     1095#: public/partials/user/aec-public-edit-event-display.php:179
    10831096msgid "days"
    10841097msgstr ""
    10851098
    10861099#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:36
    1087 #: public/partials/user/aec-public-edit-event-display.php:185
     1100#: public/partials/user/aec-public-edit-event-display.php:188
    10881101msgid "weeks"
    10891102msgstr ""
    10901103
    10911104#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:40
    1092 #: public/partials/user/aec-public-edit-event-display.php:189
     1105#: public/partials/user/aec-public-edit-event-display.php:192
    10931106msgid "On Days"
    10941107msgstr ""
     
    10971110#: public/partials/calendar/aec-public-calendar-monthly-display.php:126
    10981111#: public/partials/calendar/aec-public-calendar-monthly-display.php:128
    1099 #: public/partials/user/aec-public-edit-event-display.php:193
     1112#: public/partials/user/aec-public-edit-event-display.php:196
    11001113msgid "SUN"
    11011114msgstr ""
     
    11031116#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:45
    11041117#: public/partials/calendar/aec-public-calendar-monthly-display.php:113
    1105 #: public/partials/user/aec-public-edit-event-display.php:194
     1118#: public/partials/user/aec-public-edit-event-display.php:197
    11061119msgid "MON"
    11071120msgstr ""
     
    11091122#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:46
    11101123#: public/partials/calendar/aec-public-calendar-monthly-display.php:114
    1111 #: public/partials/user/aec-public-edit-event-display.php:195
     1124#: public/partials/user/aec-public-edit-event-display.php:198
    11121125msgid "TUE"
    11131126msgstr ""
     
    11151128#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:47
    11161129#: public/partials/calendar/aec-public-calendar-monthly-display.php:115
    1117 #: public/partials/user/aec-public-edit-event-display.php:196
     1130#: public/partials/user/aec-public-edit-event-display.php:199
    11181131msgid "WED"
    11191132msgstr ""
     
    11211134#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:48
    11221135#: public/partials/calendar/aec-public-calendar-monthly-display.php:116
    1123 #: public/partials/user/aec-public-edit-event-display.php:197
     1136#: public/partials/user/aec-public-edit-event-display.php:200
    11241137msgid "THU"
    11251138msgstr ""
     
    11271140#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:49
    11281141#: public/partials/calendar/aec-public-calendar-monthly-display.php:117
    1129 #: public/partials/user/aec-public-edit-event-display.php:198
     1142#: public/partials/user/aec-public-edit-event-display.php:201
    11301143msgid "FRI"
    11311144msgstr ""
     
    11331146#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:50
    11341147#: public/partials/calendar/aec-public-calendar-monthly-display.php:118
    1135 #: public/partials/user/aec-public-edit-event-display.php:199
     1148#: public/partials/user/aec-public-edit-event-display.php:202
    11361149msgid "SAT"
    11371150msgstr ""
    11381151
    11391152#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:64
    1140 #: public/partials/user/aec-public-edit-event-display.php:214
     1153#: public/partials/user/aec-public-edit-event-display.php:217
    11411154msgid "Repeat Every"
    11421155msgstr ""
    11431156
    11441157#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:66
    1145 #: public/partials/user/aec-public-edit-event-display.php:216
     1158#: public/partials/user/aec-public-edit-event-display.php:219
    11461159msgid "months"
    11471160msgstr ""
    11481161
    11491162#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:70
    1150 #: public/partials/user/aec-public-edit-event-display.php:220
     1163#: public/partials/user/aec-public-edit-event-display.php:223
    11511164msgid "On Dates"
    11521165msgstr ""
    11531166
    11541167#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:79
    1155 #: public/partials/user/aec-public-edit-event-display.php:228
     1168#: public/partials/user/aec-public-edit-event-display.php:231
    11561169msgid "Repeat until"
    11571170msgstr ""
    11581171
    11591172#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:85
    1160 #: public/partials/user/aec-public-edit-event-display.php:235
     1173#: public/partials/user/aec-public-edit-event-display.php:238
    11611174msgid "Occurrences"
    11621175msgstr ""
    11631176
    11641177#: admin/partials/recurring-events/aec-admin-recurring-settings-display.php:91
    1165 #: public/partials/user/aec-public-edit-event-display.php:241
     1178#: public/partials/user/aec-public-edit-event-display.php:244
    11661179msgid "Date"
    11671180msgstr ""
     
    11831196msgstr ""
    11841197
    1185 #: includes/helper-functions.php:70
     1198#: includes/helper-functions.php:395
    11861199msgid "Forgot your password?"
    11871200msgstr ""
    11881201
    1189 #: includes/helper-functions.php:71
     1202#: includes/helper-functions.php:396
    11901203msgid "Create an account"
    11911204msgstr ""
    11921205
    1193 #: includes/helper-functions.php:893
     1206#: includes/helper-functions.php:1320
    11941207#: public/partials/organizers/aec-public-organizer-header-display.php:24
    11951208msgid "P"
    11961209msgstr ""
    11971210
    1198 #: includes/helper-functions.php:1027
     1211#: includes/helper-functions.php:1454
    11991212msgid "&laquo;"
    12001213msgstr ""
    12011214
    1202 #: includes/helper-functions.php:1028
     1215#: includes/helper-functions.php:1455
    12031216msgid "&raquo;"
    12041217msgstr ""
    12051218
    1206 #: includes/helper-functions.php:1040
     1219#: includes/helper-functions.php:1467
    12071220#, php-format
    12081221msgid "Page %d of %d"
    12091222msgstr ""
    12101223
    1211 #: includes/helper-functions.php:1162
     1224#: includes/helper-functions.php:1604
    12121225msgid "Google+"
    12131226msgstr ""
    12141227
    1215 #: includes/helper-functions.php:1170
     1228#: includes/helper-functions.php:1612
    12161229msgid "Pin It"
    12171230msgstr ""
    12181231
    1219 #: public/class-aec-public-categories.php:69
    1220 #: public/class-aec-public-events.php:182
    1221 #: public/class-aec-public-organizers.php:75
    1222 #: public/class-aec-public-search.php:44 public/class-aec-public-search.php:179
    1223 #: public/class-aec-public-tags.php:75 public/class-aec-public-venues.php:80
     1232#: public/class-aec-public-categories.php:53
     1233msgid "Event Categories disabled by the admin."
     1234msgstr ""
     1235
     1236#: public/class-aec-public-categories.php:107
     1237#: public/class-aec-public-events.php:222
     1238#: public/class-aec-public-organizers.php:85
     1239#: public/class-aec-public-search.php:44 public/class-aec-public-search.php:186
     1240#: public/class-aec-public-tags.php:85 public/class-aec-public-venues.php:87
    12241241msgid "Sorry, no results matched your criteria."
    12251242msgstr ""
    12261243
    1227 #: public/class-aec-public-user.php:128 public/class-aec-public-user.php:704
    1228 #: public/class-aec-public-user.php:859
     1244#: public/class-aec-public-user.php:133 public/class-aec-public-user.php:722
     1245#: public/class-aec-public-user.php:882
    12291246msgid "You do not have sufficient permissions to access this page."
     1247msgstr ""
     1248
     1249#: public/class-aec-public-user.php:671 public/class-aec-public-user.php:713
     1250msgid "Event Venues disabled by the admin."
     1251msgstr ""
     1252
     1253#: public/class-aec-public-user.php:832 public/class-aec-public-user.php:873
     1254msgid "Event Organizers disabled by the admin."
    12301255msgstr ""
    12311256
     
    12691294#: public/partials/calendar/aec-public-calendar-daily-display.php:99
    12701295#: public/partials/calendar/aec-public-calendar-weekly-display.php:105
    1271 #: public/partials/events/aec-public-events-blog-display.php:58
     1296#: public/partials/events/aec-public-events-blog-display.php:59
    12721297#: public/partials/events/aec-public-events-grid-display.php:62
    1273 #: public/partials/events/aec-public-events-table-display.php:67
    1274 #: public/partials/events/aec-public-single-event-display.php:15
    1275 #: widgets/upcoming-events/views/widget.php:33
    1276 msgid "See all"
    1277 msgstr ""
    1278 
    1279 #: public/partials/calendar/aec-public-calendar-daily-display.php:120
    1280 #: public/partials/calendar/aec-public-calendar-weekly-display.php:126
    1281 #: public/partials/events/aec-public-events-blog-display.php:87
    1282 #: public/partials/events/aec-public-events-grid-display.php:86
    1283 #: public/partials/events/aec-public-events-table-display.php:88
     1298#: public/partials/events/aec-public-events-table-display.php:68
     1299msgid "see all"
     1300msgstr ""
     1301
     1302#: public/partials/calendar/aec-public-calendar-daily-display.php:137
     1303#: public/partials/calendar/aec-public-calendar-weekly-display.php:143
     1304#: public/partials/events/aec-public-events-blog-display.php:106
     1305#: public/partials/events/aec-public-events-grid-display.php:104
     1306#: public/partials/events/aec-public-events-table-display.php:106
    12841307msgid "Read more"
    12851308msgstr ""
     
    13391362#: public/partials/events/aec-public-events-blog-display.php:13
    13401363#: public/partials/events/aec-public-events-grid-display.php:13
     1364#: public/partials/events/aec-public-events-map-display.php:13
    13411365#: public/partials/events/aec-public-events-table-display.php:13
    13421366#, php-format
     
    13441368msgstr ""
    13451369
     1370#: public/partials/events/aec-public-events-map-display.php:69
     1371#: public/partials/map/aec-public-map-display.php:38
     1372msgid "Event :"
     1373msgstr ""
     1374
     1375#: public/partials/events/aec-public-events-map-display.php:73
     1376#: public/partials/map/aec-public-map-display.php:42
     1377msgid "Date :"
     1378msgstr ""
     1379
     1380#: public/partials/events/aec-public-events-map-display.php:84
     1381#: public/partials/map/aec-public-map-display.php:53
     1382msgid "Venue :"
     1383msgstr ""
     1384
     1385#: public/partials/events/aec-public-single-event-display.php:15
     1386#: widgets/past-events/views/widget.php:33
     1387#: widgets/upcoming-events/views/widget.php:33
     1388msgid "See all"
     1389msgstr ""
     1390
    13461391#: public/partials/events/aec-public-single-event-display.php:31
    13471392msgid "Details"
     
    13611406msgstr ""
    13621407
    1363 #: public/partials/events/aec-public-single-event-display.php:110
     1408#: public/partials/events/aec-public-single-event-display.php:111
    13641409msgid "Show map"
     1410msgstr ""
     1411
     1412#: public/partials/organizers/aec-public-organizer-header-display.php:35
     1413#: public/partials/venues/aec-public-venue-header-display.php:28
     1414msgid "Events"
    13651415msgstr ""
    13661416
     
    13821432msgstr ""
    13831433
    1384 #: public/partials/user/aec-public-edit-event-display.php:59
     1434#: public/partials/user/aec-public-edit-event-display.php:60
    13851435msgid "Upload Image"
    13861436msgstr ""
    13871437
    1388 #: public/partials/user/aec-public-edit-event-display.php:66
     1438#: public/partials/user/aec-public-edit-event-display.php:68
    13891439#: public/partials/user/aec-public-edit-organizer-display.php:44
    13901440msgid "Delete"
    13911441msgstr ""
    13921442
    1393 #: public/partials/user/aec-public-edit-event-display.php:85
     1443#: public/partials/user/aec-public-edit-event-display.php:88
    13941444msgid "Event Date & Time"
    13951445msgstr ""
    13961446
    1397 #: public/partials/user/aec-public-edit-event-display.php:152
     1447#: public/partials/user/aec-public-edit-event-display.php:155
    13981448msgid "This is a recurring event"
    13991449msgstr ""
    14001450
    1401 #: public/partials/user/aec-public-edit-event-display.php:323
     1451#: public/partials/user/aec-public-edit-event-display.php:327
    14021452msgid "Phone:"
    14031453msgstr ""
    14041454
    1405 #: public/partials/user/aec-public-edit-event-display.php:441
     1455#: public/partials/user/aec-public-edit-event-display.php:350
     1456#: public/partials/user/aec-public-edit-venue-display.php:105
     1457msgid "Latitude"
     1458msgstr ""
     1459
     1460#: public/partials/user/aec-public-edit-event-display.php:356
     1461#: public/partials/user/aec-public-edit-venue-display.php:111
     1462msgid "Longitude"
     1463msgstr ""
     1464
     1465#: public/partials/user/aec-public-edit-event-display.php:458
    14061466#: public/partials/user/aec-public-edit-organizer-display.php:81
    1407 #: public/partials/user/aec-public-edit-venue-display.php:126
     1467#: public/partials/user/aec-public-edit-venue-display.php:137
    14081468msgid "Save Changes"
    14091469msgstr ""
    14101470
    1411 #: public/partials/user/aec-public-edit-event-display.php:441
     1471#: public/partials/user/aec-public-edit-event-display.php:458
    14121472msgid "Submit Event"
    14131473msgstr ""
     
    14301490msgstr ""
    14311491
    1432 #: public/partials/user/aec-public-edit-venue-display.php:113
     1492#: public/partials/user/aec-public-edit-venue-display.php:123
    14331493msgid "Show / Hide Map"
    14341494msgstr ""
    14351495
    1436 #: public/partials/user/aec-public-edit-venue-display.php:126
     1496#: public/partials/user/aec-public-edit-venue-display.php:137
    14371497msgid "Submit Venue"
    14381498msgstr ""
     
    14811541msgstr ""
    14821542
    1483 #: public/partials/user/aec-public-manage-events-display.php:91
     1543#: public/partials/user/aec-public-manage-events-display.php:95
    14841544#: public/partials/user/aec-public-manage-organizers-display.php:69
    14851545#: public/partials/user/aec-public-manage-venues-display.php:69
     
    14871547msgstr ""
    14881548
    1489 #: public/partials/user/aec-public-manage-events-display.php:93
     1549#: public/partials/user/aec-public-manage-events-display.php:97
    14901550#: public/partials/user/aec-public-manage-organizers-display.php:71
    14911551#: public/partials/user/aec-public-manage-venues-display.php:71
     
    15521612msgstr ""
    15531613
     1614#: widgets/past-events/past-events.php:34
     1615msgid "Display past events."
     1616msgstr ""
     1617
     1618#: widgets/past-events/past-events.php:37
     1619#: widgets/past-events/past-events.php:134
     1620msgid "Past Events"
     1621msgstr ""
     1622
     1623#: widgets/past-events/views/form.php:15
     1624#: widgets/upcoming-events/views/form.php:15
     1625msgid "Show image"
     1626msgstr ""
     1627
     1628#: widgets/past-events/views/form.php:20
     1629#: widgets/upcoming-events/views/form.php:20
     1630msgid "Show date"
     1631msgstr ""
     1632
     1633#: widgets/past-events/views/form.php:26
     1634#: widgets/upcoming-events/views/form.php:26
     1635msgid "Show Category"
     1636msgstr ""
     1637
     1638#: widgets/past-events/views/form.php:32
     1639#: widgets/upcoming-events/views/form.php:32
     1640msgid "Show venue"
     1641msgstr ""
     1642
     1643#: widgets/past-events/views/form.php:36
     1644#: widgets/upcoming-events/views/form.php:36
     1645msgid "Limit"
     1646msgstr ""
     1647
    15541648#: widgets/search/search.php:34
    15551649msgid "Search events added through Another Events Calendar plugin."
     
    15681662msgstr ""
    15691663
    1570 #: widgets/search/views/form.php:23
     1664#: widgets/search/views/form.php:24
    15711665msgid "Search by Categories"
    15721666msgstr ""
    15731667
    1574 #: widgets/search/views/form.php:28
     1668#: widgets/search/views/form.php:30
    15751669msgid "Search by Venues"
    15761670msgstr ""
    15771671
    1578 #: widgets/search/views/form.php:33
     1672#: widgets/search/views/form.php:35
    15791673msgid "Search by Single Date"
    15801674msgstr ""
    15811675
    1582 #: widgets/search/views/form.php:38
     1676#: widgets/search/views/form.php:40
    15831677msgid "Search by Date Range"
    15841678msgstr ""
     
    16051699
    16061700#: widgets/upcoming-events/upcoming-events.php:37
    1607 #: widgets/upcoming-events/upcoming-events.php:131
     1701#: widgets/upcoming-events/upcoming-events.php:134
    16081702msgid "Upcoming Events"
    16091703msgstr ""
    1610 
    1611 #: widgets/upcoming-events/views/form.php:15
    1612 msgid "Show image"
    1613 msgstr ""
    1614 
    1615 #: widgets/upcoming-events/views/form.php:20
    1616 msgid "Show date"
    1617 msgstr ""
    1618 
    1619 #: widgets/upcoming-events/views/form.php:25
    1620 msgid "Show venue"
    1621 msgstr ""
    1622 
    1623 #: widgets/upcoming-events/views/form.php:29
    1624 msgid "Limit"
    1625 msgstr ""
  • another-events-calendar/trunk/public/class-aec-public-calendar.php

    r1601299 r1678088  
    4646       
    4747        // Vars
    48         $calendar_settings = get_option( 'aec_calendar_settings' );
     48        $general_settings  = get_option( 'aec_general_settings' );
     49        $calendar_settings = get_option( 'aec_calendar_settings' );     
    4950       
    5051        $view_options = $calendar_settings['view_options'];
     
    101102                'post_type'      => 'aec_events',
    102103                'post_status'    => 'publish',
    103                 'posts_per_page' => -1
     104                'posts_per_page' => -1,
     105                'meta_key'       => 'start_date_time',
     106                'orderby'        => 'meta_value_datetime start_date_time',
     107                'order'          => 'ASC'
    104108            );
    105109       
     
    270274                'post_status'    => 'publish',
    271275                'posts_per_page' => -1,
    272                 'orderby'        => 'start_date_time',
     276                'meta_key'       => 'start_date_time',
     277                'orderby'        => 'meta_value_datetime start_date_time',
    273278                'order'          => 'ASC'
    274279            );
     
    414419                'post_status'    => 'publish',
    415420                'posts_per_page' => -1,
    416                 'orderby'        => 'start_date_time',
     421                'meta_key'       => 'start_date_time',
     422                'orderby'        => 'meta_value_datetime start_date_time',
    417423                'order'          => 'ASC'
    418424            );
  • another-events-calendar/trunk/public/class-aec-public-categories.php

    r1601299 r1678088  
    4444        wp_enqueue_style( AEC_PLUGIN_SLUG );
    4545       
    46         ob_start();
    47         include AEC_PLUGIN_DIR.'public/partials/categories/aec-public-categories-display.php';
    48         return ob_get_clean();
     46        $general_settings = get_option( 'aec_general_settings' );
     47       
     48        if( ! empty( $general_settings['has_categories'] ) ) {
     49            ob_start();
     50            include AEC_PLUGIN_DIR.'public/partials/categories/aec-public-categories-display.php';
     51            return ob_get_clean();
     52        } else {
     53            return __( 'Event Categories disabled by the admin.', 'another-events-calendar' );
     54        }
    4955       
    5056    }
     
    6268        wp_enqueue_style( AEC_PLUGIN_SLUG );
    6369       
     70        wp_enqueue_script( AEC_PLUGIN_SLUG.'-google-map' );
     71        wp_enqueue_script( AEC_PLUGIN_SLUG.'-markercluster' );
     72        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );     
     73        wp_enqueue_script( AEC_PLUGIN_SLUG );
     74       
    6475        // Vars
    6576        $general_settings = get_option( 'aec_general_settings' );
    6677        $events_settings  = get_option( 'aec_events_settings' );
     78        $map_settings     = get_option( 'aec_map_settings' );
     79        $has_map          = empty( $map_settings['enabled'] ) ? 0 : 1;
    6780       
    6881        $atts = shortcode_atts(
     
    159172                break;
    160173            case 'event_start_date':
    161                 $args['meta_key'] = 'start_date_time';
    162                 $args['orderby']  = 'meta_value';
     174                $args['meta_key'] = 'start_date_time'; 
     175                $args['orderby']  = 'meta_value_datetime start_date_time';         
    163176                break;
    164177        }
  • another-events-calendar/trunk/public/class-aec-public-events.php

    r1544926 r1678088  
    4343     * @params   array    $atts    An associative array of attributes.
    4444     */
    45     public function shortcode_aec_events( $atts ) {   
     45    public function shortcode_aec_events( $atts ) { 
    4646
    4747        // Load dependencies
    4848        wp_enqueue_style( AEC_PLUGIN_SLUG );
     49       
     50        wp_enqueue_script( AEC_PLUGIN_SLUG.'-google-map' );
     51        wp_enqueue_script( AEC_PLUGIN_SLUG.'-markercluster' );
     52        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );     
     53        wp_enqueue_script( AEC_PLUGIN_SLUG );
    4954       
    5055        // Vars
    5156        $general_settings = get_option( 'aec_general_settings' );
    5257        $events_settings  = get_option( 'aec_events_settings' );
     58        $map_settings     = get_option( 'aec_map_settings' );
     59        $has_map          = empty( $map_settings['enabled'] ) ? 0 : 1;
    5360       
    5461        $atts = shortcode_atts(
     
    5764                'view'        => $events_settings['default_view'],
    5865                'category'    => '',
     66                'tag'         => '',
    5967                'venue'       => '',
     68                'organizer'   => '',
     69                'filterby'    => '',
    6070                'past_events' => empty( $general_settings['show_past_events'] ) ? 0 : 1,
    6171                'orderby'     => $events_settings['orderby'],
     
    92102        );
    93103       
     104        $tax_queries = array();
     105       
    94106        if( ! empty( $atts['category'] ) ) {
    95             $args['tax_query'] = array(
    96                 array(
    97                     'taxonomy' => 'aec_categories',
    98                     'field'    => 'term_id',
    99                     'terms'    => (int) $atts['category'],
    100                 ),
    101             );
    102         }
    103        
     107            $tax_queries[] = array(
     108                'taxonomy' => 'aec_categories',
     109                'field'    => 'term_id',
     110                'terms'    => (int) $atts['category'],
     111            );
     112        }
     113       
     114        if( ! empty( $atts['tag'] ) ) {
     115            $tax_queries[] = array(
     116                'taxonomy' => 'aec_tags',
     117                'field'    => 'term_id',
     118                'terms'    => (int) $atts['tag'],
     119            );
     120        }
     121
    104122        $meta_queries = array();
    105123
    106124        if( ! empty( $atts['venue'] ) ) {
    107125            $meta_queries[] = array(
    108                 array(
    109                     'key'     => 'venue_id',
    110                     'value'   => (int) $atts['venue'],
    111                     'compare' => '='
    112                 )
     126                'key'     => 'venue_id',
     127                'value'   => (int) $atts['venue'],
     128                'compare' => '='
     129            );
     130        }
     131       
     132        if( ! empty( $atts['organizer'] ) ) {
     133            $meta_queries[] = array(
     134                'key'     => 'organizers',
     135                'value'   => '"'.(int) $atts['organizer'].'"',
     136                'compare' => 'LIKE'
    113137            );
    114138        }
     
    132156        }
    133157       
     158        // Filter by past events
     159        if( ! empty( $atts['filterby'] ) && 'past_events' == $atts['filterby'] ) {
     160            $meta_queries[] = array(
     161                'relation' => 'AND',
     162                array(
     163                    'key'     => 'start_date_time',
     164                    'value'   => current_time('mysql'),
     165                    'compare' => '<',
     166                    'type'    => 'DATETIME'
     167                ),
     168                array(
     169                    'key'     => 'end_date_time',
     170                    'value'   => current_time('mysql'),
     171                    'compare' => '<',
     172                    'type'    => 'DATETIME'
     173                )
     174            );
     175        }
     176       
    134177        if( $slug = get_query_var( 'aec_event' ) ) {
    135178       
    136             $queried_event = get_page_by_path( $slug, OBJECT, 'aec_events' );
    137            
    138             if( $queried_event ) {
    139            
    140                 $has_recurring_link = 0;
     179            $queried_event = get_page_by_path( $slug, OBJECT, 'aec_recurring_events' );
     180           
     181            $meta_queries[] = array(
     182                'key'     => 'parent',
     183                'value'   => (int) $queried_event->ID,
     184                'compare' => '=',
     185            );
    141186               
    142                 $parent_id = get_post_meta( $queried_event->ID, 'parent', true );
    143                
    144                 $meta_queries[] = array(
    145                     'key'     => 'parent',
    146                     'value'   => ! empty( $parent_id ) ? (int) $parent_id : 0,
    147                     'compare' => '=',
    148                 );
    149                
    150             }
    151            
    152187        }
    153188       
     
    155190        if( $count_meta_queries ) {
    156191            $args['meta_query'] = ( $count_meta_queries > 1 ) ? array_merge( array( 'relation' => 'AND' ), $meta_queries ) : array( $meta_queries );
     192        }
     193       
     194        $count_tax_queries = count( $tax_queries );
     195        if( $count_tax_queries ) {
     196            $args['tax_query'] = ( $count_tax_queries > 1 ) ? array_merge( array( 'relation' => 'AND' ), $tax_queries ) : array( $tax_queries );
    157197        }
    158198       
     
    165205                break;
    166206            case 'event_start_date':
    167                 $args['meta_key'] = 'start_date_time';
    168                 $args['orderby']  = 'meta_value';
     207                $args['meta_key']  = 'start_date_time';
     208                $args['orderby']   = 'meta_value_datetime start_date_time';
    169209                break;
    170210        }
     
    209249       
    210250        if( is_singular('aec_events') && is_main_query() ) {
    211 
     251           
    212252            $post_id = get_the_ID();
    213253           
    214254            $general_settings = get_option( 'aec_general_settings' );
    215255            $map_settings     = get_option( 'aec_map_settings' );
    216            
     256       
    217257            // Vars
    218258            $title = get_the_title();
     
    291331        }
    292332       
    293          return $content;
     333        return $content;
    294334   
    295335    }   
  • another-events-calendar/trunk/public/class-aec-public-organizers.php

    r1601299 r1678088  
    4646        wp_enqueue_style( AEC_PLUGIN_SLUG );
    4747       
     48        wp_enqueue_script( AEC_PLUGIN_SLUG.'-google-map' );
     49        wp_enqueue_script( AEC_PLUGIN_SLUG.'-markercluster' );
     50        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );     
     51        wp_enqueue_script( AEC_PLUGIN_SLUG );
     52       
    4853        // Vars
    4954        $general_settings = get_option( 'aec_general_settings' );
    5055        $events_settings  = get_option( 'aec_events_settings' );
     56        $map_settings     = get_option( 'aec_map_settings' );
     57        $has_map          = empty( $map_settings['enabled'] ) ? 0 : 1;
    5158       
    5259        $atts = shortcode_atts(
     
    112119       
    113120        $meta_queries[] = array(
    114             array(
    115                 'key'     => 'organizers',
    116                 'value'   => '"'.$organizer->ID.'"',
    117                 'compare' => 'LIKE'
    118             )
     121            'key'     => 'organizers',
     122            'value'   => '"'.$organizer->ID.'"',
     123            'compare' => 'LIKE'
    119124        );
    120125
     
    151156            case 'event_start_date':
    152157                $args['meta_key'] = 'start_date_time';
    153                 $args['orderby']  = 'meta_value';
     158                $args['orderby']  = 'meta_value_datetime start_date_time';
    154159                break;
    155160        }
  • another-events-calendar/trunk/public/class-aec-public-search.php

    r1544926 r1678088  
    4747        wp_enqueue_style( AEC_PLUGIN_SLUG );
    4848       
     49        wp_enqueue_script( AEC_PLUGIN_SLUG.'-google-map' );
     50        wp_enqueue_script( AEC_PLUGIN_SLUG.'-markercluster' );
     51        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );     
     52        wp_enqueue_script( AEC_PLUGIN_SLUG );
     53       
    4954        // Vars
    5055        $general_settings = get_option( 'aec_general_settings' );
    5156        $events_settings = get_option( 'aec_events_settings' );
     57        $map_settings     = get_option( 'aec_map_settings' );
     58        $has_map          = empty( $map_settings['enabled'] ) ? 0 : 1;
    5259       
    5360        $has_header     = 1;
     
    8188        $tax_queries = array();
    8289       
    83         if( !empty( $_GET['venue'] ) ) {
     90        if( ! empty( $_GET['venue'] ) ) {
    8491            $meta_queries[] = array(
    8592                'key'     => 'venue_id',
     
    9198        }
    9299       
    93         if( !empty( $_GET['cat'] ) ) {
     100        if( ! empty( $_GET['cat'] ) ) {
    94101            $tax_queries[] = array(
    95102                'taxonomy' => 'aec_categories',
     
    133140            case 'event_start_date':
    134141                $args['meta_key'] = 'start_date_time';
    135                 $args['orderby'] = 'meta_value';
     142                $args['orderby']  = 'meta_value_datetime start_date_time';
    136143                break;
    137144        }
  • another-events-calendar/trunk/public/class-aec-public-tags.php

    r1601299 r1678088  
    4646        wp_enqueue_style( AEC_PLUGIN_SLUG );
    4747       
     48        wp_enqueue_script( AEC_PLUGIN_SLUG.'-google-map' );
     49        wp_enqueue_script( AEC_PLUGIN_SLUG.'-markercluster' );
     50        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );     
     51        wp_enqueue_script( AEC_PLUGIN_SLUG );
     52       
    4853        // Vars
    4954        $general_settings = get_option( 'aec_general_settings' );
    5055        $events_settings  = get_option( 'aec_events_settings' );
     56        $map_settings     = get_option( 'aec_map_settings' );
     57        $has_map          = empty( $map_settings['enabled'] ) ? 0 : 1;
    5158       
    5259        $atts = shortcode_atts(
     
    144151            case 'event_start_date':
    145152                $args['meta_key'] = 'start_date_time';
    146                 $args['orderby']  = 'meta_value';
     153                $args['orderby']  = 'meta_value_datetime start_date_time';
    147154                break;
    148155        }
  • another-events-calendar/trunk/public/class-aec-public-user.php

    r1601299 r1678088  
    513513                if( ! in_array( $date->format('w'), $meta['repeat_week_days'] ) ) continue;
    514514               
    515                 if( $date->format('U') > $initial_start_date->format('U') ) {
     515                if( $date->format('U') >= $initial_start_date->format('U') ) {
    516516                    $this->add_event( $main_event_id, $meta, $date );
    517517                   
     
    538538                foreach( $_period as $_date ) {
    539539                    if( ! in_array( $_date->format('w'), $meta['repeat_week_days'] ) ) continue;
    540                     if( $_date->format('U') > $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $main_event_id, $meta, $_date );
     540                    if( $_date->format('U') >= $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $main_event_id, $meta, $_date );
    541541                }
    542542               
     
    557557     * @param    int       $occurences       Number of Occurences.
    558558     */
    559     function process_monthly_events( $main_event_id, $meta, $start_date = '', $occurences = 0 ) {
     559    public function process_monthly_events( $main_event_id, $meta, $start_date = '', $occurences = 0 ) {
    560560       
    561561        if( '' == $start_date ) {
     
    575575                if( ! in_array($date->format('j'), (array) $meta['repeat_month_days'] ) ) continue;
    576576               
    577                 if( $date->format('U') > $initial_start_date->format('U') ) {
     577                if( $date->format('U') >= $initial_start_date->format('U') ) {
    578578                    $this->add_event( $main_event_id, $meta, $date );
    579579                   
     
    602602                foreach( $_period as $_date ) {
    603603                    if( ! in_array( $_date->format( 'j' ), (array) $meta['repeat_month_days'] ) ) continue;
    604                     if( $_date->format('U') > $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $main_event_id, $meta, $_date );
     604                    if( $_date->format('U') >= $initial_start_date->format('U') &&  $_date->format('U') <= $end->format('U') ) $this->add_event( $main_event_id, $meta, $_date );
    605605                }
    606606               
     
    664664        }   
    665665       
    666         // Load dependencies
    667         wp_enqueue_style( AEC_PLUGIN_SLUG );
    668        
    669         // Vars
    670666        $general_settings = get_option( 'aec_general_settings' );
    671667        $events_settings  = get_option( 'aec_events_settings' );
    672668        $page_settings    = get_option( 'aec_page_settings' );
    673669       
     670        if( empty( $general_settings['has_venues'] ) ) {
     671            return __( 'Event Venues disabled by the admin.', 'another-events-calendar' );
     672        }
     673       
     674        // Load dependencies
     675        wp_enqueue_style( AEC_PLUGIN_SLUG );
     676
    674677        // Build query
    675678        $paged = aec_get_page_number();     
     
    704707        }       
    705708       
     709        $general_settings = get_option( 'aec_general_settings' );
     710        $map_settings     = get_option( 'aec_map_settings' );
     711       
     712        if( empty( $general_settings['has_venues'] ) ) {
     713            return __( 'Event Venues disabled by the admin.', 'another-events-calendar' );
     714        }   
     715       
    706716        $venue_id = get_query_var( 'aec_id' ) ? (int) get_query_var( 'aec_id' ) : 0;
    707717        $has_permission = true;
     
    721731       
    722732        // Vars
    723         $general_settings = get_option( 'aec_general_settings' );
    724         $map_settings     = get_option( 'aec_map_settings' );
    725        
    726733        $countries        = aec_get_countries();
    727734        $default_location = $general_settings['default_location'];
     
    745752        }
    746753       
    747         // ... 
     754        // ...
    748755        ob_start();
    749756        include AEC_PLUGIN_DIR."public/partials/user/aec-public-edit-venue-display.php";
     
    818825        }   
    819826       
    820         // Load dependencies
    821         wp_enqueue_style( AEC_PLUGIN_SLUG );
    822        
    823         // Vars
    824827        $general_settings = get_option( 'aec_general_settings' );
    825828        $events_settings  = get_option( 'aec_events_settings' );
    826829        $page_settings    = get_option( 'aec_page_settings' );
    827830       
     831        if( empty( $general_settings['has_organizers'] ) ) {
     832            return __( 'Event Organizers disabled by the admin.', 'another-events-calendar' );
     833        }
     834       
     835        // Load dependencies
     836        wp_enqueue_style( AEC_PLUGIN_SLUG );
     837
    828838        // Build query
    829839        $paged = aec_get_page_number();     
     
    858868        }       
    859869       
     870        $general_settings = get_option( 'aec_general_settings' );
     871       
     872        if( empty( $general_settings['has_organizers'] ) ) {
     873            return __( 'Event Organizers disabled by the admin.', 'another-events-calendar' );
     874        }
     875       
    860876        $organizer_id = get_query_var( 'aec_id' ) ? get_query_var( 'aec_id' ) : 0;
    861877        $has_permission = true;
     
    871887        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap-validator' );
    872888       
    873         wp_enqueue_style( AEC_PLUGIN_SLUG );
     889        wp_enqueue_style( AEC_PLUGIN_SLUG );       
    874890       
    875891        // Vars
     
    888904        }
    889905       
    890         // ... 
     906        // ...     
    891907        ob_start();
    892908        include AEC_PLUGIN_DIR."public/partials/user/aec-public-edit-organizer-display.php";
     
    965981     */
    966982    public function ajax_callback_delete_attachment() {
    967    
     983       
    968984        if( isset( $_POST['attachment_id'] ) ) {
    969985       
  • another-events-calendar/trunk/public/class-aec-public-venues.php

    r1544926 r1678088  
    4545       
    4646        wp_enqueue_script( AEC_PLUGIN_SLUG.'-google-map' );
    47         wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );
    48         wp_enqueue_script( AEC_PLUGIN_SLUG );
     47        wp_enqueue_script( AEC_PLUGIN_SLUG.'-markercluster' );
     48        wp_enqueue_script( AEC_PLUGIN_SLUG.'-bootstrap' );     
     49        wp_enqueue_script( AEC_PLUGIN_SLUG );
    4950         
    5051        // Vars
     
    5354        $map_settings     = get_option( 'aec_map_settings' );
    5455       
     56        $view = isset( $events_settings['default_view'] ) ? $events_settings['default_view'] : '';
     57       
     58        if( "map" == $view )  {
     59            $view = $events_settings['view_options'][0];
     60        }
     61       
    5562        $atts = shortcode_atts(
    5663            array(
    5764                'header'      => 1,
    58                 'view'        => $events_settings['default_view'],
     65                'view'        => $view,
    5966                'venue'       => '',
    6067                'past_events' => empty( $general_settings['show_past_events'] ) ? 0 : 1,
     
    8087        if( $error ) return __( 'Sorry, no results matched your criteria.', 'another-events-calendar' );
    8188       
    82         $has_map   = empty( $map_settings['enabled'] ) ? false : true;
     89        $has_map   = empty( $map_settings['enabled'] ) ? 0 : 1;
    8390        $latitude  = get_post_meta( $venue->ID, 'latitude', true );
    8491        $longitude = get_post_meta( $venue->ID, 'longitude', true );
     
    8895       
    8996        $view_options = isset( $events_settings['view_options'] ) ? $events_settings['view_options'] : array();
     97        foreach( $view_options as $key => $value ) {
     98            if( strpos( $value, "map" ) !== false ) {
     99                unset( $view_options[ $key ] );
     100            }
     101        }       
    90102        $view_options[] = sanitize_text_field( $atts['view'] );
    91103        $view_options = array_unique( $view_options );
    92 
     104       
    93105        $view = isset( $_GET['view'] ) ? sanitize_text_field( $_GET['view'] ) : sanitize_text_field( $atts['view'] );
    94106       
     
    151163            case 'event_start_date':
    152164                $args['meta_key'] = 'start_date_time';
    153                 $args['orderby']  = 'meta_value';
     165                $args['orderby']  = 'meta_value_datetime start_date_time';
    154166                break;
    155167        }
  • another-events-calendar/trunk/public/class-aec-public.php

    r1544926 r1678088  
    5050     */
    5151    public function add_rewrites() {
    52 
     52 
    5353        $page_settings = get_option( 'aec_page_settings' );
    5454        $url = network_home_url();
     
    224224
    225225        wp_register_script( AEC_PLUGIN_SLUG, AEC_PLUGIN_URL.'public/js/aec-public.js', $deps, AEC_PLUGIN_VERSION, true );
    226 
     226       
    227227        wp_localize_script(
    228228            AEC_PLUGIN_SLUG,
    229             'aec',
     229            'aec', 
    230230            array(
    231                 'ajaxurl' => admin_url( 'admin-ajax.php' ),
    232                 'zoom'    => ! empty( $map_settings['zoom_level'] ) ? $map_settings['zoom_level'] : 5
     231                'plugin_url'     => AEC_PLUGIN_URL,
     232                'ajaxurl'        => admin_url( 'admin-ajax.php' ),
     233                'zoom'           => ! empty( $map_settings['zoom_level'] ) ? $map_settings['zoom_level'] : 5,
     234                'i18n_organizer' => __( 'Organizer', 'another-events-calendar' )
    233235            )
    234236        );
    235237       
     238        // Validator
    236239        wp_register_script( AEC_PLUGIN_SLUG.'-bootstrap-validator', AEC_PLUGIN_URL.'public/js/validator.js', array( 'jquery' ), AEC_PLUGIN_VERSION, false );
    237240       
     241        // Marker Cluster
     242        wp_register_script( AEC_PLUGIN_SLUG.'-markercluster', AEC_PLUGIN_URL.'public/js/markerclusterer.js', array( 'jquery' ), AEC_PLUGIN_VERSION, false );
     243       
     244        // Google Map
    238245        $api_key = ! empty( $map_settings['api_key'] ) ? '&key='.$map_settings['api_key'] : '';
    239246        wp_register_script( AEC_PLUGIN_SLUG.'-google-map', '//maps.googleapis.com/maps/api/js?v=3.exp'.$api_key ); 
     
    431438    }
    432439   
     440    /**
     441     * Change the current page title if applicable.
     442     *
     443     * @since    1.7.0
     444     * @access   public
     445     *
     446     * @param    string    $title          The document title.   
     447     * @param    string    $sep            Title separator.
     448     * @param    string    $seplocation    Location of the separator (left or right).       
     449     * @return   string                    The filtered title. 
     450     */
     451    public function wp_title( $title, $sep = '', $seplocation = '' ) {
     452       
     453        global $post;
     454       
     455        $page_settings = get_option( 'aec_page_settings' );
     456        $custom_title = '';
     457        $site_name = get_bloginfo( 'name' );
     458       
     459        // Change Recurring events page title
     460        if( $post->ID == $page_settings['events'] ) {
     461            if( $slug = get_query_var( 'aec_event' ) ) {
     462                $page = get_page_by_path( $slug, OBJECT, 'aec_recurring_events' );
     463                $custom_title = $page->post_title;
     464            }
     465        }
     466           
     467        // Change Category page title
     468        if( $post->ID == $page_settings['category'] ) {
     469            if( $slug = get_query_var( 'aec_category' ) ) {
     470                $term = get_term_by( 'slug', $slug, 'aec_categories' );
     471                $custom_title = $term->name;
     472            }
     473        }
     474                   
     475        // Change Tag page title   
     476        if( $post->ID == $page_settings['tag'] ) {
     477            if( $slug = get_query_var( 'aec_tag' ) ) {
     478                $term = get_term_by( 'slug', $slug, 'aec_tags' );
     479                $custom_title = $term->name;
     480            }
     481        }
     482                   
     483        // Change Venue page title 
     484        if( $post->ID == $page_settings['venue'] ) {
     485            if( $slug = get_query_var( 'aec_venue' ) ) {
     486                $page = get_page_by_path( $slug, OBJECT, 'aec_venues' );
     487                $custom_title = $page->post_title; 
     488            }
     489        }
     490           
     491        // Change Organizer page title
     492        if( $post->ID == $page_settings['organizer'] ) {
     493            if( $slug = get_query_var( 'aec_organizer' ) ) {
     494                $page = get_page_by_path( $slug, OBJECT, 'aec_organizers' );
     495                $custom_title = $page->post_title;
     496            }
     497        }
     498           
     499        // ...
     500        if( ! empty( $custom_title ) ) {
     501           
     502            $title = ( 'left' == $seplocation ) ? "$site_name $sep $custom_title" : "$custom_title $sep $site_name";
     503        }
     504       
     505        return $title;
     506   
     507    }
     508   
     509    /**
     510     * Fix conflict with the YOAST plugin when updating the post/page title.
     511     *
     512     * @since    1.7.0
     513     * @access   public
     514     *
     515     * @param    array    $title    The document title.
     516     * @return                      Filtered title.
     517     */
     518    public function pre_get_document_title( $title ) {
     519   
     520        global $post;
     521       
     522        if( ! isset( $post ) ) return $title;
     523       
     524        $page_settings = get_option( 'aec_page_settings' );
     525       
     526        $aec_pages = array(
     527            $page_settings['events'],
     528            $page_settings['category'],
     529            $page_settings['tag'],
     530            $page_settings['venue'],
     531            $page_settings['organizer']
     532        );
     533       
     534        if( in_array( $post->ID, $aec_pages ) ) {
     535            $title = '';
     536        }
     537       
     538        return $title;
     539   
     540    }
     541   
     542    /**
     543     * Override the default post/page title.
     544     *
     545     * @since    1.7.0
     546     * @access   public
     547     *
     548     * @param    array    $title    The document title parts.
     549     * @return                      Filtered title parts.
     550     */
     551    public function document_title_parts( $title ) {
     552   
     553        global $post;
     554       
     555        if( ! isset( $post ) ) return $title;
     556       
     557        $page_settings = get_option( 'aec_page_settings' );
     558       
     559        // Change Recurring events page title
     560        if( $post->ID == $page_settings['events'] ) {
     561            if( $slug = get_query_var( 'aec_event' ) ) {
     562                $page = get_page_by_path( $slug, OBJECT, 'aec_recurring_events' );
     563                $title['title'] = $page->post_title;
     564            }
     565        }
     566           
     567        // Change Category page title
     568        if( $post->ID == $page_settings['category'] ) {
     569            if( $slug = get_query_var( 'aec_category' ) ) {
     570                $term = get_term_by( 'slug', $slug, 'aec_categories' );
     571                $title['title'] = $term->name;
     572            }
     573        }
     574                   
     575        // Change Tag page title   
     576        if( $post->ID == $page_settings['tag'] ) {
     577            if( $slug = get_query_var( 'aec_tag' ) ) {
     578                $term = get_term_by( 'slug', $slug, 'aec_tags' );
     579                $title['title'] = $term->name;
     580            }
     581        }
     582                   
     583        // Change Venue page title 
     584        if( $post->ID == $page_settings['venue'] ) {
     585            if( $slug = get_query_var( 'aec_venue' ) ) {
     586                $page = get_page_by_path( $slug, OBJECT, 'aec_venues' );
     587                $title['title'] = $page->post_title;   
     588            }
     589        }
     590           
     591        // Change Organizer page title
     592        if( $post->ID == $page_settings['organizer'] ) {
     593            if( $slug = get_query_var( 'aec_organizer' ) ) {
     594                $page = get_page_by_path( $slug, OBJECT, 'aec_organizers' );
     595                $title['title'] = $page->post_title;
     596            }
     597        }
     598       
     599        // ...
     600        return $title;
     601   
     602    }
    433603       
    434604}
  • another-events-calendar/trunk/public/css/aec-public.css

    r1544926 r1678088  
    1919.aec-margin-right {
    2020    margin-right: 7px !important;
     21}
     22
     23.aec-margin-left {
     24    margin-left: 5px !important;
    2125}
    2226
     
    128132}
    129133
     134/* Organizer fields */
     135.aec-organizer-fields h3 {
     136    padding: 5px;
     137}
     138
    130139/* Socialshare buttons */
    131140.aec-social-btn {
     
    138147}
    139148
     149/* calendar page */
     150.aec-monthly-calendar a {
     151    display: inline-block;
     152    padding: 2px 4px;
     153    font-size: 10.998px;
     154    font-weight: bold;
     155    line-height: 14px;
     156    color: #fff;
     157    vertical-align: baseline;
     158    white-space: normal;
     159    text-shadow: 0 -1px 0 rgba(0,0,0,0.25);
     160    background-color: #3a87ad;
     161}
     162
    140163.aec-social-btn:hover {
    141164    color: #FFF;
     
    186209.aec-pinterest:active {
    187210    background: #bd081c;
     211}
     212
     213.aec img {
     214    width:100%;
    188215}
    189216
     
    248275        display:block;
    249276    }   
    250 }
     277   
     278    .aec img {
     279        width:100%;
     280    }
     281}
  • another-events-calendar/trunk/public/js/aec-public.js

    r1601299 r1678088  
    1010       
    1111        // var
    12         var $marker = $el.find('.marker');
     12        var $markers = $el.find('.marker');
    1313
    1414        // vars
     
    2323       
    2424        // add a marker reference
    25         map.marker = '';       
    26        
    27         // Add marker
    28         var latitude  = $('#aec-latitude').val();
    29         var longitude = $('#aec-longitude').val();
    30         var geocoder  = new google.maps.Geocoder();
    31        
    32         if( '' != latitude && '' != longitude ) {
     25        map.markers = [];
     26           
     27        if( $el.data('type') == 'normal' ) {
     28           
     29            // add markers
     30            $markers.each(function(){
     31               
     32                aec_add_marker( $(this), map );
     33                aec_center_map( map );
     34               
     35            });
     36       
     37        } else {
     38       
     39            // Add marker
     40            var latitude  = $('#aec-latitude').val();
     41            var longitude = $('#aec-longitude').val();
     42            var geocoder  = new google.maps.Geocoder();
     43   
     44            if( '' != latitude && '' != longitude ) {
    3345                   
    34             $marker.data( 'latitude', latitude );
    35             $marker.data( 'longitude', longitude );
    36             aec_add_marker( $marker, map );     
    37             aec_center_map( map );
    38 
    39         } else {
    40            
    41             var default_location = $el.data('default_location');
    42             geocoder.geocode( { 'address': default_location }, function( results, status ) {
    43                 if( status == google.maps.GeocoderStatus.OK ) {
    44                     aec_update_latlng( results[0].geometry.location.lat(), results[0].geometry.location.lng() );
    45                     $marker.data( 'latitude', results[0].geometry.location.lat() );
    46                     $marker.data( 'longitude', results[0].geometry.location.lng() );
    47                     aec_add_marker( $marker, map );     
    48                     aec_center_map( map );                 
    49                 }
    50             });
    51            
    52         };
     46                $markers.data( 'latitude', latitude );
     47                $markers.data( 'longitude', longitude );
     48                aec_add_marker( $markers, map );       
     49                aec_center_map( map );
     50   
     51            } else {
     52               
     53                var default_location = $el.data('default_location');
     54                geocoder.geocode( { 'address': default_location }, function( results, status ) {
     55                    if( status == google.maps.GeocoderStatus.OK ) {
     56                        aec_update_latlng( results[0].geometry.location.lat(), results[0].geometry.location.lng() );
     57                        $markers.data( 'latitude', results[0].geometry.location.lat() );
     58                        $markers.data( 'longitude', results[0].geometry.location.lng() );
     59                        aec_add_marker( $markers, map );       
     60                        aec_center_map( map );         
     61                    }
     62                });
     63               
     64            };
     65        }
    5366       
    5467        // Update marker position on address change
     
    6679            geocoder.geocode( { 'address': address}, function( results, status ) {
    6780                if( status == google.maps.GeocoderStatus.OK) {
    68                     map.marker.setPosition( results[0].geometry.location );
     81                    map.markers[0].setPosition( results[0].geometry.location );
    6982                    aec_update_latlng( results[0].geometry.location.lat(), results[0].geometry.location.lng() );
    7083                    aec_center_map( map );                 
     
    100113    *  @since   1.0.0
    101114    */ 
    102     function aec_add_marker( $marker, map ) {
    103    
    104         // var
    105         var latlng = new google.maps.LatLng( $marker.data('latitude'), $marker.data('longitude') );
    106    
     115    function aec_add_marker( $markers, map ) {
     116   
     117         // var
     118        var latlng = new google.maps.LatLng( $markers.data( 'latitude' ), $markers.data( 'longitude' ) );
     119       
     120        // check to see if any of the existing markers match the latlng of the new marker
     121        if( map.markers.length ) {
     122            for( var i = 0; i < map.markers.length; i++ ) {
     123                var existing_marker = map.markers[i];
     124                var pos = existing_marker.getPosition();
     125   
     126                // if a marker already exists in the same position as this marker
     127                if( latlng.equals( pos ) ) {
     128                    // update the position of the coincident marker by applying a small multipler to its coordinates
     129                    var latitude  = latlng.lat() + ( Math.random() - .5 ) / 1500; // * (Math.random() * (max - min) + min);
     130                    var longitude = latlng.lng() + ( Math.random() - .5 ) / 1500; // * (Math.random() * (max - min) + min);
     131                    latlng = new google.maps.LatLng( latitude, longitude );
     132                }
     133            }
     134        }
     135       
    107136        // create marker
    108137        var marker = new google.maps.Marker({
    109             position    : latlng,
    110             map         : map,
    111             draggable   : false
    112         });
    113    
    114         map.marker = marker;
    115        
     138            position  : latlng,
     139            map       : map,
     140            draggable : ( map.type == 'form' ) ? true : false
     141        });
     142   
     143        // add to array
     144        map.markers.push( marker );
     145   
    116146        // if marker contains HTML, add it to an infoWindow
    117         if( $marker.html() ) {
     147        if( $markers.html() ) {
    118148            // create info window
    119149            var infowindow = new google.maps.InfoWindow({
    120                 content     : $marker.html()
    121                                                        
     150                content : $markers.html()
    122151            });
    123152   
     
    128157   
    129158            });
    130            
    131         }
     159        };
     160       
     161        // update latitude and longitude values in the form when marker is moved
     162        if( map.type == 'form' ) {
     163            google.maps.event.addListener(marker, "dragend", function() {
     164                                                                 
     165                var point = marker.getPosition();
     166                map.panTo(point);
     167                update_latlng(point);
     168           
     169            });
     170        };
    132171   
    133172    }         
     
    139178     */
    140179    function aec_center_map( map ) {
    141    
    142         // vars
     180       
    143181        var bounds = new google.maps.LatLngBounds();
    144182   
    145         // loop through all markers and create bounds
    146         var latlng = new google.maps.LatLng( map.marker.position.lat(), map.marker.position.lng() );
    147         bounds.extend( latlng );
    148    
    149         map.setCenter( bounds.getCenter() );
     183        if( map.markers.length > 1 ) {
     184           
     185            // fit to bounds
     186             var listener = google.maps.event.addListener(map, 'idle', function() {
     187               
     188                // loop through all markers and create bounds
     189                $.each( map.markers, function( i, marker ){
     190                    var latlng = new google.maps.LatLng( marker.position.lat(), marker.position.lng() );
     191                    bounds.extend( latlng );
     192                });
     193       
     194                map.setZoom( parseInt( aec.zoom ) );
     195                map.fitBounds( bounds );
     196               
     197                // Marker Cluster
     198                var markerCluster = new MarkerClusterer( map, map.markers, { imagePath : aec.plugin_url+'public/images/m' } );
     199               
     200                google.maps.event.removeListener(listener);
     201               
     202            });
     203
     204        } else {           
     205       
     206            // loop through all markers and create bounds
     207                $.each( map.markers, function( i, marker ){
     208                    var latlng = new google.maps.LatLng( marker.position.lat(), marker.position.lng() );
     209                    bounds.extend( latlng );
     210                });
     211           
     212            map.setCenter( bounds.getCenter() );       
     213            map.setZoom( parseInt( aec.zoom ) );
     214
     215        }           
    150216   
    151217    }
     
    177243        // Add map in custom post type 'aec_venues'
    178244        $( '.aec-map' ).each(function() {
    179             aec_map( $(this) );
     245            var data = {
     246                'type' : $(this).data('type'), 
     247            };
     248            aec_map( $(this), data['type'] );
    180249        });
    181250       
     
    257326        $( '#aec-add-new-organizer' ).on( 'click', function() {
    258327
    259             $( '#aec-organizer-fields' ).find( '.aec-organizer-fields .aec-organizer-group-id' ).html( '#' + $( '.aec-organizer-fields' ).length );
     328            $( '#aec-organizer-fields' ).find( '.aec-organizer-fields .aec-organizer-group-id' ).html( aec.i18n_organizer + ' #' + $( '.aec-organizer-fields' ).length );
    260329            var $clone = $( '#aec-organizer-fields' ).find( '.aec-organizer-fields' ).clone( false );
    261330            $( '#aec-organizer-fields-container' ).append( $clone );
  • another-events-calendar/trunk/public/partials/calendar/aec-public-calendar-daily-display.php

    r1544926 r1678088  
    100100                        </small>
    101101                    <?php endif; ?>
    102                        
    103                     <?php $venue_id = get_post_meta( get_the_ID(), 'venue_id', true ); ?>
    104                     <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
    105                         <p class="aec-margin-top aec-no-margin-bottom text-muted">
    106                             <span class="glyphicon glyphicon-map-marker"></span>
    107                             <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
    108                         </p>
    109                     <?php endif; ?>
     102                   
     103                    <?php
     104                        if( ! empty( $general_settings['has_categories'] ) ) {
     105                            $categories = get_the_terms( get_the_ID(), 'aec_categories' );
     106                            if( ! empty( $categories ) ) {
     107                                $meta = array();
     108                                foreach( $categories as $category ) {
     109                                    $meta[] = sprintf( '<a class="text-primary aec-margin-left" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     110                                }
     111                                echo '<p class="aec-margin-top aec-no-margin-bottom text-muted"><span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta ).'</p>';
     112                            }
     113                        }
     114                    ?>
     115                   
     116                    <?php
     117                        if( ! empty( $general_settings['has_venues'] ) ) {
     118                            $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
     119                            if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
     120                                <p class="aec-margin-top aec-no-margin-bottom text-muted">
     121                                    <span class="glyphicon glyphicon-map-marker"></span>
     122                                    <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
     123                                </p>
     124                            <?php endif;
     125                        }
     126                    ?>
    110127                   
    111128                    <p class="aec-margin-top"><?php echo wp_kses_post( wp_trim_words( get_the_content(), 20 ) ); ?></p>
     
    131148</div>
    132149
    133 <?php wp_reset_postdata(); ?>
    134 <?php the_aec_socialshare_buttons(); ?> 
     150<?php
     151    wp_reset_postdata();
     152    the_footer_text();
     153    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/calendar/aec-public-calendar-monthly-display.php

    r1601299 r1678088  
    206206</div> 
    207207
    208 <?php the_aec_socialshare_buttons(); ?> 
     208<?php 
     209    the_footer_text();
     210    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/calendar/aec-public-calendar-weekly-display.php

    r1544926 r1678088  
    107107                        <?php endif; ?>
    108108                       
    109                         <?php $venue_id = get_post_meta( $event->ID, 'venue_id', true ); ?>
    110                         <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
    111                             <p class="aec-margin-top aec-no-margin-bottom text-muted">
    112                                 <span class="glyphicon glyphicon-map-marker"></span>
    113                                 <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
    114                             </p>
    115                         <?php endif; ?>
     109                         <?php
     110                            if( ! empty( $general_settings['has_categories'] ) ) {
     111                                $categories = get_the_terms( $event->ID, 'aec_categories' );
     112                                if( ! empty( $categories ) ) {
     113                                    $meta = array();
     114                                    foreach( $categories as $category ) {
     115                                        $meta[] = sprintf( '<a class="text-primary aec-margin-left" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     116                                    }
     117                                    echo '<p class="aec-margin-top aec-no-margin-bottom text-muted"><span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta ).'</p>';
     118                                }
     119                            }
     120                        ?>
     121                       
     122                        <?php
     123                            if( ! empty( $general_settings['has_venues'] ) ) {
     124                                $venue_id = get_post_meta( $event->ID, 'venue_id', true );
     125                                if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
     126                                    <p class="aec-margin-top aec-no-margin-bottom text-muted">
     127                                        <span class="glyphicon glyphicon-map-marker"></span>
     128                                        <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
     129                                    </p>
     130                                <?php endif;
     131                            }
     132                        ?>
    116133                       
    117134                        <p class="aec-margin-top"><?php echo wp_kses_post( wp_trim_words( $event->post_content, 20 ) ); ?></p>
     
    139156</div>
    140157
    141 <?php the_aec_socialshare_buttons(); ?> 
     158<?php
     159    the_footer_text();
     160    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/categories/aec-public-categories-display.php

    r1476408 r1678088  
    1010</div>
    1111
    12 <?php the_aec_socialshare_buttons(); ?> 
     12<?php
     13    the_footer_text();
     14    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/categories/aec-public-category-header-display.php

    r1476408 r1678088  
    88<?php if( ! empty( $category->description ) ) : ?>
    99    <p><?php echo $category->description; ?></p>
    10 <?php endif; ?>
     10<?php endif;
  • another-events-calendar/trunk/public/partials/events/aec-public-events-blog-display.php

    r1601299 r1678088  
    7272                        <?php echo aec_get_event_date( get_the_ID() ); ?>
    7373                    </p>
    74                        
     74                   
     75                     <!-- Event Category -->
     76                    <?php
     77                        if( ! empty( $general_settings['has_categories'] ) ) {
     78                            $categories = get_the_terms( get_the_ID(), 'aec_categories' );
     79                            if( ! empty( $categories ) ) {
     80                                $meta = array();
     81                                foreach( $categories as $category ) {
     82                                    $meta[] = sprintf( '<a class="text-primary aec-margin-left" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     83                                }
     84                                echo '<p class="aec-margin-top aec-no-margin-bottom text-muted"><span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta ).'</p>';
     85                            }
     86                        }
     87                    ?>
     88                                               
    7589                    <!-- Event Venue -->
    76                     <?php $venue_id = get_post_meta( get_the_ID(), 'venue_id', true ); ?>
    77                 <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
    78                         <p class="aec-margin-top aec-no-margin-bottom text-muted">
    79                             <span class="glyphicon glyphicon-map-marker"></span>
    80                             <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
    81                         </p>
    82                     <?php endif; ?>
     90                    <?php
     91                        if( ! empty( $general_settings['has_venues'] ) ) {
     92                            $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
     93                            if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
     94                                <p class="aec-margin-top aec-no-margin-bottom text-muted">
     95                                    <span class="glyphicon glyphicon-map-marker"></span>
     96                                    <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
     97                                </p>
     98                            <?php endif;
     99                        }
     100                    ?>
    83101                       
    84102                    <!-- Description -->
     
    102120</div>
    103121
    104 <?php wp_reset_postdata(); ?>
    105 <?php the_aec_socialshare_buttons(); ?>
     122<?php
     123    wp_reset_postdata();
     124    the_footer_text();
     125    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/events/aec-public-events-grid-display.php

    r1601299 r1678088  
    7070                        </p>
    7171                       
     72                        <!-- Event Category -->
     73                        <?php
     74                            if( ! empty( $general_settings['has_categories'] ) ) {
     75                                $categories = get_the_terms( get_the_ID(), 'aec_categories' );
     76                                if( ! empty( $categories ) ) {
     77                                    $meta = array();
     78                                    foreach( $categories as $category ) {
     79                                        $meta[] = sprintf( '<a class="text-primary aec-margin-left" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     80                                    }
     81                                    echo '<p class="aec-margin-top aec-no-margin-bottom text-muted"><span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta ).'</p>';
     82                                }
     83                            }
     84                        ?>
     85               
    7286                        <!-- Event Venue -->
    73                         <?php $venue_id = get_post_meta( get_the_ID(), 'venue_id', true ); ?>
    74                         <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
    75                             <p class="aec-margin-top aec-no-margin-bottom text-muted">
    76                                 <span class="glyphicon glyphicon-map-marker"></span>
    77                                 <a href=" <?php echo aec_venue_page_link( $venue_id ); ?> "><?php echo get_the_title( $venue_id ); ?> </a>
    78                             </p>
    79                         <?php endif; ?>
     87                        <?php
     88                            if( ! empty( $general_settings['has_venues'] ) ) {
     89                                $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
     90                                if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
     91                                    <p class="aec-margin-top aec-no-margin-bottom text-muted">
     92                                        <span class="glyphicon glyphicon-map-marker"></span>
     93                                        <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
     94                                    </p>
     95                                <?php endif;
     96                            }
     97                        ?>
    8098                       
    8199                        <!-- Description -->
     
    113131</div>
    114132
    115 <?php wp_reset_postdata(); ?>
    116 <?php the_aec_socialshare_buttons(); ?>
     133<?php
     134    wp_reset_postdata();
     135    the_footer_text();
     136    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/events/aec-public-events-table-display.php

    r1601299 r1678088  
    6969                    </small>
    7070                <?php endif; ?>
    71                        
    72                 <?php $venue_id = get_post_meta( get_the_ID(), 'venue_id', true ); ?>
    73                 <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
    74                     <p class="aec-margin-top aec-no-margin-bottom text-muted">
    75                         <span class="glyphicon glyphicon-map-marker"></span>
    76                         <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
    77                     </p>
    78                 <?php endif; ?>
     71                     
     72                <?php
     73                    if( ! empty( $general_settings['has_categories'] ) ) {
     74                        $categories = get_the_terms( get_the_ID(), 'aec_categories' );
     75                        if( ! empty( $categories ) ) {
     76                            $meta = array();
     77                            foreach( $categories as $category ) {
     78                                $meta[] = sprintf( '<a class="text-primary aec-margin-left" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     79                            }
     80                            echo '<p class="aec-margin-top aec-no-margin-bottom text-muted"><span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta ).'</p>';
     81                        }
     82                    }
     83                ?>
     84               
     85                <?php
     86                    if( ! empty( $general_settings['has_venues'] ) ) {     
     87                        $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
     88                        if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
     89                            <p class="aec-margin-top aec-no-margin-bottom text-muted">
     90                                <span class="glyphicon glyphicon-map-marker"></span>
     91                                <a href="<?php echo aec_venue_page_link( $venue_id ); ?>"><?php echo get_the_title( $venue_id ); ?></a>
     92                            </p>
     93                        <?php endif;
     94                    }
     95                ?>
    7996               
    8097                <p class="aec-margin-top"><?php echo wp_kses_post( wp_trim_words( get_the_content(), 20 ) ); ?></p>
     
    100117</div>
    101118
    102 <?php wp_reset_postdata(); ?>
    103 <?php the_aec_socialshare_buttons(); ?>
     119<?php
     120    wp_reset_postdata();
     121    the_footer_text();
     122    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/events/aec-public-single-event-display.php

    r1601299 r1678088  
    4545                    <?php endif; ?>
    4646               
    47                     <?php if( $categories ) : ?>
     47                    <?php if( ! empty( $general_settings['has_categories'] ) && ! empty( $categories) ) : ?>
    4848                        <p class="aec-no-margin"><strong><?php _e( 'Event Categories', 'another-events-calendar' ); ?></strong>
    4949                        <?php
     
    5757                    <?php endif; ?>
    5858                   
    59                     <?php if( $tags ) :?>
     59                    <?php if( ! empty( $general_settings['has_tags'] ) && ! empty( $tags ) ) :?>
    6060                        <p class="aec-no-margin"><strong><?php _e( 'Event Tags', 'another-events-calendar' ); ?></strong>
    6161                        <?php
     
    7272           
    7373            <!-- Organizer meta box -->
    74             <?php if( ! empty( $organizers ) ) : ?>
     74            <?php if( ! empty( $general_settings['has_organizers'] ) && ! empty( $organizers ) ) : ?>
    7575                <div class="panel panel-default">
    7676                    <div class="panel-heading">
     
    9999           
    100100            <!-- Venue meta box -->
    101             <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
    102                 <div class="panel panel-default">
    103                     <div class="panel-heading">
    104                         <?php _e( 'Venue', 'another-events-calendar' ); ?>
    105                     </div>
    106                     <div class="panel-body">
    107                         <?php the_aec_address( $venue_id ); ?>
    108                         <?php if( $has_map ) : ?>
    109                             <span class="glyphicon glyphicon-map-marker" aria-hidden="true"></span>
    110                             <a href="" data-toggle="modal" data-target="#aec-map-modal"><?php _e( 'Show map', 'another-events-calendar' ); ?></a>
    111                            
    112                             <!-- Modal -->
    113                             <div class="modal" id="aec-map-modal">
    114                                 <div class="modal-dialog"> 
    115                                     <div class="modal-content">
    116                                         <div class="modal-body">
    117                                             <div class="embed-responsive embed-responsive-16by9">
    118                                                 <div class="aec-map embed-responsive-item">
    119                                                     <div class="marker" data-latitude="<?php echo $latitude; ?>" data-longitude="<?php echo $longitude; ?>">
    120                                                         <?php the_aec_address( $venue_id ); ?>
    121                                                     </div>
    122                                                 </div>
     101            <?php if( ! empty( $general_settings['has_venues'] ) ) { ?>
     102                <?php if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) : ?>
     103                    <div class="panel panel-default">
     104                        <div class="panel-heading">
     105                            <?php _e( 'Venue', 'another-events-calendar' ); ?>
     106                        </div>
     107                        <div class="panel-body">
     108                            <?php the_aec_address( $venue_id ); ?>
     109                            <?php if( $has_map ) : ?>
     110                                <span class="glyphicon glyphicon-map-marker" aria-hidden="true"></span>
     111                                <a href="" data-toggle="modal" data-target="#aec-map-modal"><?php _e( 'Show map', 'another-events-calendar' ); ?></a>
     112                               
     113                                <!-- Modal -->
     114                                <div class="modal" id="aec-map-modal">
     115                                    <div class="modal-dialog"> 
     116                                        <div class="modal-content">
     117                                            <div class="modal-body">
     118                                                <div class="embed-responsive embed-responsive-16by9">
     119                                                    <div class="aec-map embed-responsive-item">
     120                                                        <div class="marker" data-latitude="<?php echo $latitude; ?>" data-longitude="<?php echo $longitude; ?>">
     121                                                            <?php the_aec_address( $venue_id ); ?>
     122                                                        </div>
     123                                                    </div>
     124                                                </div>
    123125                                            </div>
    124                                         </div>
    125                                     </div>
    126                                 </div>
    127                             </div>
    128                         <?php endif; ?>
    129                     </div>
    130                 </div>
    131             <?php endif; ?>
    132            
     126                                        </div>
     127                                    </div>
     128                                </div>
     129                            <?php endif; ?>
     130                        </div>
     131                    </div>
     132                <?php endif; ?>
     133            <?php } ?>             
    133134        </div>
    134135    </div>     
    135136</div>
    136137
    137 <?php if( ! empty( $general_settings['show_credit_link'] ) ) : ?>
    138     <p style="font-size:12px; margin-top:10px;">Powered by <a href="https://yendif.com/wordpress/item/another-events-calendar.html" target="_blank">Another Events Calendar</a></p>
    139 <?php endif; ?>
    140 
    141 <?php the_aec_socialshare_buttons(); ?>
     138<?php
     139    the_footer_text();
     140    the_aec_socialshare_buttons();
  • another-events-calendar/trunk/public/partials/tags/aec-public-tag-header-display.php

    r1476408 r1678088  
    88<?php if( ! empty( $tag->description ) ) : ?>
    99    <p><?php echo $tag->description; ?></p>
    10 <?php endif; ?>
     10<?php endif;
  • another-events-calendar/trunk/public/partials/user/aec-public-edit-event-display.php

    r1601299 r1678088  
    4040           
    4141            <div class="panel-body">
    42            
    43                 <div class="form-group">
    44                     <label class="col-sm-3 control-label"><?php _e( 'Select Category', 'another-events-calendar' ); ?></label>
    45                     <div class="col-sm-9">
    46                         <div class="aec-multi-checkbox">
    47                             <?php
    48                                 $terms = get_terms( 'aec_categories', array( 'hide_empty' => false ) );
    49                                 foreach( $terms as $term ) {
    50                                     $checked = isset( $categories ) && in_array( $term->term_id, $categories ) ? 'checked="checked"' : '';
    51                                     printf( '<label><input type="checkbox" name="categories[]" value="%s" %s/>%s</label>', $term->name, $checked, $term->name );
    52                                 }                               
    53                             ?>
    54                          </div>
    55                     </div>
    56                 </div>
     42                <?php  if( ! empty( $general_settings['has_categories'] ) && aec_current_user_can( 'edit_aec_event' ) ) : ?>
     43                    <div class="form-group">
     44                        <label class="col-sm-3 control-label"><?php _e( 'Select Category', 'another-events-calendar' ); ?></label>
     45                        <div class="col-sm-9">
     46                            <div class="aec-multi-checkbox">
     47                                <?php
     48                                    $terms = get_terms( 'aec_categories', array( 'hide_empty' => false ) );
     49                                    foreach( $terms as $term ) {
     50                                        $checked = isset( $categories ) && in_array( $term->term_id, $categories ) ? 'checked="checked"' : '';
     51                                        printf( '<label><input type="checkbox" name="categories[]" value="%s" %s/>%s</label>', $term->name, $checked, $term->name );
     52                                    }                               
     53                                ?>
     54                             </div>
     55                        </div>
     56                    </div>
     57                <?php endif; ?>
    5758               
    5859                <div class="form-group">
     
    149150                    </div>
    150151                </div>
    151            
    152                 <?php if( ! $event_id ) : ?>
     152               
     153                <?php if( ! $event_id && ! empty( $general_settings['has_recurring_events'] ) && aec_current_user_can( 'edit_aec_event' ) ) : ?>
    153154                    <div class="form-group">
    154155                        <label for="aec-recurring-event" class="col-sm-3 control-label"><?php _e( 'This is a recurring event', 'another-events-calendar' )?></label>
     
    250251               
    251252        <!-- Event Venue -->
    252         <?php if( aec_current_user_can( 'edit_aec_venue' ) ) : ?>
     253        <?php if( ! empty( $general_settings['has_venues'] ) && aec_current_user_can( 'edit_aec_venue' ) ) : ?>
    253254            <div class="panel panel-default form-horizontal">
    254255                <div class="panel-heading"><?php _e( 'Venue Details', 'another-events-calendar' ); ?></div>
     
    262263                                <option value="-1"><?php _e( 'Create New Venue', 'another-events-calendar' ); ?></option>
    263264                                <?php
    264                                     $venues   = get_posts( array( 'post_type' => 'aec_venues', 'posts_per_page' => -1 ) );
     265                                    $venues   = get_posts( array( 'post_type' => 'aec_venues', 'posts_per_page' => -1 ,'orderby' => 'title', 'order' => 'ASC' ) );
    265266                                    $venue_id = isset( $venue_id ) ? $venue_id : 0;
    266267                                    foreach( $venues as $venue ) { 
     
    342343                                <div class="col-sm-9">
    343344                                    <div class="embed-responsive embed-responsive-16by9">
    344                                         <div class="aec-map embed-responsive-item" data-default_location="<?php echo $default_location; ?>">
     345                                        <div class="aec-map embed-responsive-item" data-default_location="<?php echo $default_location; ?>" data-type="form">
    345346                                            <div class="marker"></div>
    346347                                        </div>
     
    375376               
    376377        <!-- Event Organizer -->
    377         <?php if( aec_current_user_can( 'edit_aec_organizer' ) ) : ?>
     378        <?php if( ! empty( $general_settings['has_organizers'] ) && aec_current_user_can( 'edit_aec_organizer' ) ) : ?>
    378379            <div class="panel panel-default form-horizontal">
    379380                <div class="panel-heading"><?php _e( 'Organizer Details', 'another-events-calendar' ); ?></div>
     
    386387                            <div class="aec-multi-checkbox">
    387388                                <?php
    388                                     $organizers_list = get_posts( array( 'post_type' => 'aec_organizers' ) );
     389                                    $organizers_list = get_posts( array( 'post_type' => 'aec_organizers', 'posts_per_page' => -1 ,'orderby' => 'title', 'order' => 'ASC' ) );
    389390                                    $organizers      = isset( $organizers ) ? $organizers : array();
    390391                                    foreach( $organizers_list as $organizer ) {
     
    409410                                <label class="col-sm-3 control-label"></label>
    410411                                <div class="col-sm-9">
    411                                    <h3 class="aec-organizer-group-id"></h3>
     412                                   <h3 class="aec-organizer-group-id bg-success"></h3>
    412413                                </div>
    413414                            </div>
     
    461462    </form>
    462463</div>
     464
     465<?php
     466    the_footer_text();
  • another-events-calendar/trunk/public/partials/user/aec-public-edit-organizer-display.php

    r1544926 r1678088  
    8585    </form>
    8686</div>
     87
     88<?php
     89    the_footer_text();
  • another-events-calendar/trunk/public/partials/user/aec-public-edit-venue-display.php

    r1601299 r1678088  
    9898                        <div class="col-sm-9">
    9999                            <div class="embed-responsive embed-responsive-16by9">
    100                                 <div class="aec-map embed-responsive-item" data-default_location="<?php echo $default_location; ?>">
     100                                <div class="aec-map embed-responsive-item" data-default_location="<?php echo $default_location; ?>" data-type="form">
    101101                                    <div class="marker"></div>
    102102                                </div>
     
    142142    </form>
    143143</div>
     144
     145<?php
     146    the_footer_text();
  • another-events-calendar/trunk/public/partials/user/aec-public-manage-events-display.php

    r1544926 r1678088  
    5656                           
    5757                            // Categories
    58                             $categories = get_the_terms( get_the_ID(), 'aec_categories' );
    59                             $meta_categories = array();
    60                             if( $categories ) {
    61                                 foreach( $categories as $category ) {
    62                                     $meta_categories[] = sprintf( '<a class="text-primary" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
    63                                 }
    64                                 if( count( $meta_categories ) ) $meta[] = '<span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta_categories );
    65                             }
     58                            if( ! empty( $general_settings['has_categories'] ) ) {
     59                                $categories = get_the_terms( get_the_ID(), 'aec_categories' );
     60                                if( ! empty( $categories ) ) {
     61                                    $meta_categories = array();
     62                                    foreach( $categories as $category ) {
     63                                        $meta_categories[] = sprintf( '<a class="text-primary" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     64                                    }
     65                                    if( count( $meta_categories ) ) $meta[] = '<span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta_categories );
     66                                }
     67                            }
    6668                           
    6769                            // Venue
    68                             $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
    69                             if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) {
    70                                 $meta[] =  sprintf( '<span class="glyphicon glyphicon-map-marker"></span> <a href="%s">%s</a>', aec_venue_page_link( $venue_id ), get_the_title( $venue_id ) );
    71                             }
     70                            if( ! empty( $general_settings['has_venues'] ) ) {
     71                                $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
     72                                if( $venue_id > 0 && is_string( get_post_status( $venue_id ) ) ) {
     73                                    $meta[] =  sprintf( '<span class="glyphicon glyphicon-map-marker"></span> <a href="%s">%s</a>', aec_venue_page_link( $venue_id ), get_the_title( $venue_id ) );
     74                                }
     75                            }
    7276                           
    7377                            // ...
     
    104108   
    105109</div>
     110
     111<?php
     112    the_footer_text();
  • another-events-calendar/trunk/public/partials/user/aec-public-manage-organizers-display.php

    r1544926 r1678088  
    8282 
    8383</div>
     84
     85<?php
     86    the_footer_text();
  • another-events-calendar/trunk/public/partials/user/aec-public-manage-venues-display.php

    r1544926 r1678088  
    8282   
    8383</div>
     84
     85<?php
     86    the_footer_text();
  • another-events-calendar/trunk/public/partials/venues/aec-public-venue-header-display.php

    r1476408 r1678088  
    1717            <div class="col-md-8">
    1818                <div class="embed-responsive embed-responsive-16by9">
    19                     <div class="aec-map embed-responsive-item">
     19                    <div class="aec-map embed-responsive-item" data-type="form">
    2020                        <div class="marker" data-latitude="<?php echo $latitude; ?>" data-longitude="<?php echo $longitude; ?>"></div>
    2121                    </div>
  • another-events-calendar/trunk/uninstall.php

    r1601299 r1678088  
    1818
    1919// Delete all the Custom Post Types
    20 $post_types = array( 'aec_events', 'aec_venues', 'aec_organizers' );
     20$post_types = array( 'aec_events', 'aec_recurring_events', 'aec_venues', 'aec_organizers' );
    2121
    2222foreach( $post_types as $post_type ) {
  • another-events-calendar/trunk/widgets/mini-calender/mini-calendar.php

    r1476408 r1678088  
    4848     * @since    1.0.0
    4949     */
    50     function enqueue_styles_scripts() {
     50    public function enqueue_styles_scripts() {
    5151   
    5252        if( is_active_widget( false, false, $this->id_base, true ) ) {
  • another-events-calendar/trunk/widgets/search/search.php

    r1476408 r1678088  
    4646     * @since    1.0.0
    4747     */
    48     function enqueue_styles_scripts() {
     48    public function enqueue_styles_scripts() {
    4949   
    5050        if( is_active_widget( false, false, $this->id_base, true ) ) {
     
    8383        // Get Search page id
    8484        $page_settings = get_option( 'aec_page_settings' );
    85         $search_id     = $page_settings['search'];
     85        $general_settings = get_option( 'aec_general_settings' );
     86       
     87        $search_id = $page_settings['search'];
    8688       
    8789        // Get Categories
     
    9698                    'post_type'      => 'aec_venues',
    9799                    'post_status'    => 'publish',
    98                     'posts_per_page' => '-1'
     100                    'posts_per_page' => '-1',
     101                    'orderby'        => 'title',
     102                    'order'          => 'ASC'
    99103                )
    100104            );
     
    115119     */
    116120    public function form( $instance ) {
     121   
     122        $general_settings = get_option( 'aec_general_settings' );
    117123       
    118124        $title                 = isset( $instance['title'] )   ? $instance['title']   : __( 'Search Events', 'another-events-calendar' );
  • another-events-calendar/trunk/widgets/search/views/form.php

    r1476408 r1678088  
    1919</p>
    2020
    21 <p>
    22     <input class="checkbox" type="checkbox" <?php checked( $search_by_category, 1 ); ?> id="<?php echo $this->get_field_id( 'search_by_category' ); ?>" name="<?php echo $this->get_field_name( 'search_by_category' ); ?>" value="1" />
    23     <label for="<?php echo $this->get_field_id( 'search_by_category' ); ?>"><?php _e( 'Search by Categories', 'another-events-calendar' ); ?></label>
    24 </p>
     21<?php if( ! empty( $general_settings['has_categories'] ) ) : ?>
     22    <p>
     23        <input class="checkbox" type="checkbox" <?php checked( $search_by_category, 1 ); ?> id="<?php echo $this->get_field_id( 'search_by_category' ); ?>" name="<?php echo $this->get_field_name( 'search_by_category' ); ?>" value="1" />
     24        <label for="<?php echo $this->get_field_id( 'search_by_category' ); ?>"><?php _e( 'Search by Categories', 'another-events-calendar' ); ?></label>
     25    </p>
     26<?php endif; ?>
    2527
    2628<p>
  • another-events-calendar/trunk/widgets/search/views/widget.php

    r1544926 r1678088  
    1717        </div>
    1818       
    19         <?php if( $search_by_category ) : ?>
     19        <?php if( ! empty( $general_settings['has_categories'] ) && $search_by_category ) : ?>
    2020            <div class="form-group">
    2121                <select name="cat" class="form-control">
     
    3131        <?php endif; ?>
    3232       
    33         <?php if( $search_by_venue ) : ?>
     33        <?php if( ! empty( $general_settings['has_venues'] ) && $search_by_venue ) : ?>
    3434            <div class="form-group">
    3535                <select name="venue" class="form-control">
  • another-events-calendar/trunk/widgets/upcoming-events/upcoming-events.php

    r1514741 r1678088  
    4646     * @since    1.0.0
    4747     */
    48     function enqueue_styles_scripts() {
     48    public function enqueue_styles_scripts() {
    4949   
    5050        if( is_active_widget( false, false, $this->id_base, true ) ) {
     
    6969        $events_settings  = get_option( 'aec_events_settings' );
    7070       
    71         $show_image         = isset( $instance['show_image'] ) ? $instance['show_image']  : 0;
    72         $show_date          = isset( $instance['show_date'] )  ? $instance['show_date']   : 0;
    73         $show_venue         = isset( $instance['show_venue'] ) ? $instance['show_venue']  : 0;
    74         $limit              = ! empty( $instance['limit'] )    ? (int) $instance['limit'] : -1;
     71        $show_image         = isset( $instance['show_image'] ) ? $instance['show_image'] : 0;
     72        $show_date          = isset( $instance['show_date'] ) ? $instance['show_date'] : 0;
     73        $show_category      = isset( $instance['show_category'] ) ? $instance['show_category'] : 0;
     74        $show_venue         = isset( $instance['show_venue'] ) ? $instance['show_venue'] : 0;
     75        $limit              = ! empty( $instance['limit'] ) ? (int) $instance['limit'] : -1;   
    7576        $has_recurring_link = ! empty( $general_settings['has_recurring_events'] ) ? 1 : 0;
    7677       
     
    8586            'posts_per_page' => $limit,
    8687            'meta_key'       => 'start_date_time',
    87             'orderby'        => 'meta_value',
     88            'orderby'        => 'meta_value_datetime start_date_time',
    8889            'order'          => 'asc',
    8990            'post_status'    => 'publish',
     
    129130    public function form( $instance ) {
    130131   
     132        $general_settings = get_option( 'aec_general_settings' );
     133       
    131134        $title = isset( $instance['title'] ) ? $instance['title'] : __( 'Upcoming Events', 'another-events-calendar' );
    132135       
    133         $show_image = isset( $instance['show_image'] ) ? $instance['show_image'] : 1;
    134         $show_date  = isset( $instance['show_date'] )  ? $instance['show_date']  : 1;
    135         $show_venue = isset( $instance['show_venue'] ) ? $instance['show_venue'] : 1;   
    136         $limit      = isset( $instance['limit'] )      ? $instance['limit']      : 5;   
     136        $show_image    = isset( $instance['show_image'] ) ? $instance['show_image'] : 1;
     137        $show_date     = isset( $instance['show_date'] ) ? $instance['show_date'] : 1;
     138        $show_category = isset( $instance['show_category'] ) ? $instance['show_category'] : 1; 
     139        $show_venue    = isset( $instance['show_venue'] ) ? $instance['show_venue'] : 1;   
     140        $limit         = isset( $instance['limit'] ) ? $instance['limit'] : 5; 
    137141       
    138142        include AEC_PLUGIN_DIR.'widgets/upcoming-events/views/form.php';     
     
    150154        $instance = array();
    151155       
    152         $instance['title']      = isset( $new_instance['title'] )      ? strip_tags( $new_instance['title'] ) : '';
    153         $instance['show_image'] = isset( $new_instance['show_image'] ) ? 1 : 0;
    154         $instance['show_date']  = isset( $new_instance['show_date'] )  ? 1 : 0;
    155         $instance['show_venue'] = isset( $new_instance['show_venue'] ) ? 1 : 0;
    156         $instance['limit']      = isset( $new_instance['limit'] ) ? (int) $new_instance['limit'] : '';
     156        $instance['title']          = isset( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
     157        $instance['show_image']     = isset( $new_instance['show_image'] ) ? 1 : 0;
     158        $instance['show_date']      = isset( $new_instance['show_date'] ) ? 1 : 0;
     159        $instance['show_category']  = isset( $new_instance['show_category'] ) ? 1 : 0;
     160        $instance['show_venue']     = isset( $new_instance['show_venue'] ) ? 1 : 0;
     161        $instance['limit']          = isset( $new_instance['limit'] ) ? (int) $new_instance['limit'] : '';
    157162       
    158163        return $instance;
  • another-events-calendar/trunk/widgets/upcoming-events/views/form.php

    r1476408 r1678088  
    2121</p>
    2222
     23<?php if( ! empty( $general_settings['has_categories'] ) ) : ?>
     24    <p>
     25        <input class="checkbox" type="checkbox" <?php checked( $show_category, 1 ); ?> id="<?php echo $this->get_field_id( 'show_category' ); ?>" name="<?php echo $this->get_field_name( 'show_category' ); ?>" value="1" />
     26        <label for="<?php echo $this->get_field_id( 'show_category' ); ?>"><?php _e( 'Show Category', 'another-events-calendar' ); ?></label>
     27    </p>
     28<?php endif; ?>
     29
    2330<p>
    2431    <input class="checkbox" type="checkbox" <?php checked( $show_venue, 1 ); ?> id="<?php echo $this->get_field_id( 'show_venue' ); ?>" name="<?php echo $this->get_field_name( 'show_venue' ); ?>" value="1" />
  • another-events-calendar/trunk/widgets/upcoming-events/views/widget.php

    r1601299 r1678088  
    4242                <?php endif; ?>
    4343               
    44                 <?php $venue_id = get_post_meta( get_the_ID(), 'venue_id', true ); ?>
    45                 <?php if( $show_venue && $venue_id > 0 ) : ?>
    46                     <p class="aec-no-margin text-muted">
    47                         <span class="glyphicon glyphicon-map-marker"></span>
    48                         <a href="<?php echo aec_venue_page_link( $venue_id );?>"><?php echo get_the_title( $venue_id ); ?> </a>
    49                     </p>
    50                 <?php endif; ?>
     44                <?php
     45                    if( ! empty( $general_settings['has_categories'] ) && $show_category ) {
     46                        $categories = get_the_terms( get_the_ID(), 'aec_categories' );
     47                        $meta = array();
     48                        if( ! empty( $categories ) ) {
     49                            foreach( $categories as $category ) {
     50                                $meta[] = sprintf( '<a class="text-primary aec-margin-left" href="%s">%s</a>', aec_category_page_link( $category ), $category->name );
     51                            }
     52                            echo '<p class="aec-no-margin-bottom text-muted"><span class="glyphicon glyphicon-folder-open"></span> '.implode( ', ', $meta ).'</p>';
     53                        }
     54                    }
     55                ?>
     56               
     57                <?php
     58                    if( ! empty( $general_settings['has_venues'] ) ) {
     59                        $venue_id = get_post_meta( get_the_ID(), 'venue_id', true );
     60                        if( $show_venue && $venue_id > 0 ) : ?>
     61                            <p class="aec-no-margin text-muted">
     62                                <span class="glyphicon glyphicon-map-marker"></span>
     63                                <a href="<?php echo aec_venue_page_link( $venue_id );?>"><?php echo get_the_title( $venue_id ); ?></a>
     64                            </p>
     65                        <?php endif;
     66                    }
     67                ?>
    5168            </div>
    5269        </div>
Note: See TracChangeset for help on using the changeset viewer.