/** * This function scans the connector plugins directory and adds the plugin to the plugin helper * */ function install_plugins() { global $ai1ec_importer_plugin_helper; // Scan the plugin directory for php files foreach (glob(AI1EC_IMPORT_PLUGIN_PATH . "/*.php") as $filename) { // The class name should be the same as the php file $class_name = Ai1ec_String_Utility::classify($filename); // If the class exist if (class_exists($class_name) && is_subclass_of($class_name, 'Ai1ec_Connector_Plugin')) { // Instantiate a new object and add it as a plugin. // In the constructor the plugin will add his hooks. $ai1ec_importer_plugin_helper->add_plugin(new $class_name()); } } $ai1ec_importer_plugin_helper->sort_plugins(); }
</sy:updatePeriod> <sy:updateFrequency><?php echo apply_filters('rss_update_frequency', '1'); ?> </sy:updateFrequency> <?php foreach ($event_results['events'] as $event) { $title = htmlspecialchars(apply_filters('the_title', $event->post->post_title, $event->post_id)); $permalink = htmlspecialchars(get_permalink($event->post_id)); $date = date('d M Y H:i:s', $event->start); $user_info = get_userdata($event->post->post_author); $location = str_replace("\n", ', ', rtrim($event->get_location())); $use_excerpt = Ai1ec_Meta::get_option('rss_use_excerpt'); $description = apply_filters('the_content', $event->post->post_content); if ($use_excerpt) { $description = Ai1ec_String_Utility::truncate_string_if_longer_than_x_words($description, 50, " <a href='{$permalink}' >" . __('Read more...', AI1EC_PLUGIN_NAME) . "</a>"); } $args = array('timespan' => $event->get_timespan_html(), 'location' => $location, 'permalink' => $permalink, 'description' => wpautop($description)); // Load the RSS specific template ob_start(); $ai1ec_view_helper->display_theme('event-feed-description.php', $args); $content = ob_get_contents(); ob_end_clean(); $user = $user_info->user_login; $guid = htmlspecialchars(get_the_guid($event->post_id)); $comments = esc_url(get_post_comments_feed_link($event->post_id, 'rss2')); $comments_number = get_comments_number($event->post_id); echo <<<FEED <item> \t<title>{$title}</title> \t<link>{$permalink}{$event->instance_id}</link>