WordPress.org

Plugin Directory

Changeset 1821506


Ignore:
Timestamp:
02/13/18 17:05:54 (6 days ago)
Author:
bastho
Message:

Adds Gutenberg block support for events_list shortcode

Location:
event-post/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • event-post/trunk/eventpost.php

    r1820365 r1821506  
    4949        load_plugin_textdomain('event-post', false, 'event-post/languages'); 
    5050 
    51           add_action('widgets_init', array(&$this,'init'), 1); 
     51        add_action('widgets_init', array(&$this,'init'), 1); 
    5252        add_action('save_post', array(&$this, 'save_postdata')); 
    5353        add_action('admin_menu', array(&$this, 'manage_options')); 
     
    106106        include_once ($inc_path . 'children.php'); 
    107107 
     108        $block_path = plugin_dir_path(__FILE__).'blocks/'; 
     109        include_once ($block_path . 'eventslist.php'); 
    108110    } 
    109111 
     
    135137 
    136138        $this->maps = $this->get_maps(); 
    137     $this->settings = $this->get_settings(); 
     139        $this->settings = $this->get_settings(); 
    138140 
    139141        do_action('evenpost_init', $this); 
  • event-post/trunk/inc/shortcodes.php

    r1699751 r1821506  
    99    function __construct() { 
    1010        //Shortcodes 
    11     add_action('init', array(&$this,'init')); 
     11        add_action('init', array(&$this,'init')); 
    1212        add_shortcode('events_list', array(&$this, 'shortcode_list')); 
    1313        add_shortcode('events_map', array(&$this, 'shortcode_map')); 
     
    2828        global $EventPost; 
    2929        $this->EP = $EventPost; 
    30     $this->shortcode_ui(); 
     30        $this->shortcode_ui(); 
    3131    } 
    3232 
     
    241241        return; 
    242242    } 
     243    // In gutenberg, prefers native integration 
     244    if(function_exists('gutenberg_pre_init')){ 
     245        return; 
     246    } 
    243247    $shortcodes_list_atts=array( 
    244248            'label' => __('Events list','event-post'), 
Note: See TracChangeset for help on using the changeset viewer.