当前位置: 首页>>代码示例>>PHP>>正文


PHP TribeEvents::getLink方法代码示例

本文整理汇总了PHP中TribeEvents::getLink方法的典型用法代码示例。如果您正苦于以下问题:PHP TribeEvents::getLink方法的具体用法?PHP TribeEvents::getLink怎么用?PHP TribeEvents::getLink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TribeEvents的用法示例。


在下文中一共展示了TribeEvents::getLink方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

$tec = TribeEvents::instance();
$generalTab = array('priority' => 10, 'fields' => apply_filters('tribe_general_settings_tab_fields', array('info-start' => array('type' => 'html', 'html' => '<div id="modern-tribe-info"><img src="' . plugins_url('resources/images/modern-tribe@2x.png', dirname(__FILE__)) . '" alt="Modern Tribe Inc." title="Modern Tribe Inc.">'), 'upsell-heading' => array('type' => 'heading', 'label' => __('Finding & extending your calendar.', 'tribe-events-calendar'), 'conditional' => !defined('TRIBE_HIDE_UPSELL') || !TRIBE_HIDE_UPSELL), 'finding-heading' => array('type' => 'heading', 'label' => __('Finding your calendar.', 'tribe-events-calendar'), 'conditional' => defined('TRIBE_HIDE_UPSELL') && TRIBE_HIDE_UPSELL), 'view-calendar-link' => array('type' => 'html', 'html' => '<p>' . __('Where\'s my calendar?', 'tribe-events-calendar') . ' <a href="' . TribeEvents::getLink() . '">' . __('Right here', 'tribe-events-calendar') . '</a>.</p>'), 'upsell-info' => array('type' => 'html', 'html' => '<p>' . __('Looking for additional functionality including recurring events, custom meta, community events, ticket sales and more?', 'tribe-events-calendar') . ' <a href="' . self::$tribeUrl . 'products/?utm_source=generaltab&utm_medium=plugin-tec&utm_campaign=in-app' . '">' . __('Check out the available add-ons', 'tribe-events-calendar') . '</a>.</p>', 'conditional' => !defined('TRIBE_HIDE_UPSELL') || !TRIBE_HIDE_UPSELL), 'donate-link-heading' => array('type' => 'heading', 'label' => __('We hope our plugin is helping you out.', 'tribe-events-calendar')), 'donate-link-info' => array('type' => 'html', 'html' => '<p>' . __('Are you thinking "Wow, this plugin is amazing! I should say thanks to Modern Tribe for all their hard work." The greatest thanks we could ask for is recognition. Add a small text-only link at the bottom of your calendar pointing to The Events Calendar project.', 'tribe-events-calendar') . '<br><a href="' . plugins_url('resources/images/donate-link-screenshot.jpg', dirname(__FILE__)) . '" class="thickbox">' . __('See an example of the link', 'tribe-events-calendar') . '</a>.</p>', 'conditional' => !class_exists('TribeEventsPro')), 'donate-link-pro-info' => array('type' => 'html', 'html' => '<p>' . __('Are you thinking "Wow, this plugin is amazing! I should say thanks to Modern Tribe for all their hard work." The greatest thanks we could ask for is recognition. Add a small text only link at the bottom of your calendar pointing to The Events Calendar project.', 'tribe-events-calendar') . '<br><a href="' . plugins_url('resources/images/donate-link-pro-screenshot.jpg', dirname(__FILE__)) . '" class="thickbox">' . __('See an example of the link', 'tribe-events-calendar') . '</a>.</p>', 'conditional' => class_exists('TribeEventsPro')), 'donate-link' => array('type' => 'checkbox_bool', 'label' => __('Show The Events Calendar link', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'info-end' => array('type' => 'html', 'html' => '</div>'), 'tribe-form-content-start' => array('type' => 'html', 'html' => '<div class="tribe-settings-form-wrap">'), 'tribeEventsDisplayThemeTitle' => array('type' => 'html', 'html' => '<h3>' . __('General Settings', 'tribe-events-calendar') . '</h3>'), 'postsPerPage' => array('type' => 'text', 'label' => __('Number of events to show per page', 'tribe-events-calendar'), 'size' => 'small', 'default' => get_option('posts_per_page'), 'validation_type' => 'positive_int'), 'liveFiltersUpdate' => array('type' => 'checkbox_bool', 'label' => __('Use Javascript to control date filtering', 'tribe-events-calendar'), 'tooltip' => tribe_get_option('tribeDisableTribeBar', false) == true ? __('This option is disabled when "Disable the Event Search Bar" is checked on the Display settings tab.', 'tribe-events-calendar') : __('Enable live ajax for datepicker on front end (User submit not required).', 'tribe-events-calendar'), 'attributes' => tribe_get_option('tribeDisableTribeBar', false) == true ? array('disabled' => 'disabled') : null, 'default' => true, 'validation_type' => 'boolean', 'class' => tribe_get_option('tribeDisableTribeBar', false) == true ? 'tribe-fieldset-disabled' : null), 'showComments' => array('type' => 'checkbox_bool', 'label' => __('Show comments', 'tribe-events-calendar'), 'tooltip' => __('Enable comments on event pages.', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'showEventsInMainLoop' => array('type' => 'checkbox_bool', 'label' => __('Include events in main blog loop', 'tribe-events-calendar'), 'tooltip' => __('Show events with the site\'s other posts. When this box is checked, events will also continue to appear on the default events page.', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'unprettyPermalinksUrl' => array('type' => 'html', 'label' => __('Events URL slug', 'tribe-events-calendar'), 'html' => '<p>' . sprintf(__('You cannot edit the slug for your events page as you do not have pretty permalinks enabled. The current URL for your events page is <a href="%s">%s</a>. In order to edit the slug here, <a href="%soptions-permalink.php">enable pretty permalinks</a>.', 'tribe-events-calendar'), $tec->getLink('home'), $tec->getLink('home '), trailingslashit(get_admin_url())) . '</p>', 'conditional' => '' == get_option('permalink_structure')), 'eventsSlug' => array('type' => 'text', 'label' => __('Events URL slug', 'tribe-events-calendar'), 'default' => 'events', 'validation_type' => 'slug', 'conditional' => '' != get_option('permalink_structure')), 'current-events-slug' => array('type' => 'html', 'html' => '<p class="tribe-field-indent tribe-field-description description">' . __('The slug used for building the events URL.', 'tribe-events-calendar') . sprintf(__('Your current events URL is: %s', 'tribe-events-calendar'), '<code><a href="' . tribe_get_events_link() . '">' . tribe_get_events_link() . '</a></code>') . '</p>', 'conditional' => '' != get_option('permalink_structure')), 'ical-info' => array('type' => 'html', 'display_callback' => function_exists('tribe_get_ical_link') ? '<p id="ical-link" class="tribe-field-indent tribe-field-description description">' . __('Here is the iCal feed URL for your events:', 'tribe-events-calendar') . ' ' . '<code>' . tribe_get_ical_link() . '</code></p>' : '', 'conditional' => function_exists('tribe_get_ical_link')), 'singleEventSlug' => array('type' => 'text', 'label' => __('Single event URL slug', 'tribe-events-calendar'), 'default' => 'event', 'validation_type' => 'slug', 'conditional' => '' != get_option('permalink_structure')), 'current-single-event-slug' => array('type' => 'html', 'html' => '<p class="tribe-field-indent tribe-field-description description">' . sprintf(__('The above should ideally be plural, and this singular.<br />Your single event URL is: %s', 'tribe-events-calendar'), '<code>' . trailingslashit(home_url()) . tribe_get_option('singleEventSlug', 'event') . '/single-post-name/' . '</code>') . '</p>', 'conditional' => '' != get_option('permalink_structure')), 'multiDayCutoff' => array('type' => 'dropdown', 'label' => __('End of day cutoff', 'tribe-events-calendar'), 'validation_type' => 'options', 'size' => 'small', 'default' => '12:00', 'options' => array('12:00' => '12:00 am', '12:30' => '12:30 am', '01:00' => '01:00 am', '01:30' => '01:30 am', '02:00' => '02:00 am', '02:30' => '02:30 am', '03:00' => '03:00 am', '03:30' => '03:30 am', '04:00' => '04:00 am', '04:30' => '04:30 am', '05:00' => '05:00 am', '05:30' => '05:30 am', '06:00' => '06:00 am', '06:30' => '06:30 am', '07:00' => '07:00 am', '07:30' => '07:30 am', '08:00' => '08:00 am', '08:30' => '08:30 am', '09:00' => '09:00 am', '09:30' => '09:30 am', '10:00' => '10:00 am', '10:30' => '10:30 am', '11:00' => '11:00 am', '11:30' => '11:30 am')), 'multiDayCutoffHelper' => array('type' => 'html', 'html' => '<p class="tribe-field-indent tribe-field-description description">' . sprintf(__("Have an event that runs past midnight? Select a time after that event's end to avoid showing the event on the next day's calendar.", 'tribe-events-calendar')) . '</p>', 'conditional' => '' != get_option('permalink_structure')), 'defaultCurrencySymbol' => array('type' => 'text', 'label' => __('Default currency symbol', 'tribe-events-calendar'), 'tooltip' => __('Set the default currency symbol for event costs. Note that this only impacts future events, and changes made will not apply retroactively.', 'tribe-events-calendar'), 'validation_type' => 'textarea', 'size' => 'small', 'default' => '$'), 'reverseCurrencyPosition' => array('type' => 'checkbox_bool', 'label' => __('Currency symbol follows value', 'tribe-events-calendar'), 'tooltip' => __('The currency symbol normally precedes the value. Enabling this option positions the symbol after the value.', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'tribeEventsDisplayTitle' => array('type' => 'html', 'html' => '<h3>' . __('Map Settings', 'tribe-events-calendar') . '</h3>'), 'embedGoogleMaps' => array('type' => 'checkbox_bool', 'label' => __('Enable Google Maps', 'tribe-events-calendar'), 'tooltip' => __('Check to enable maps for events and venues.', 'tribe-events-calendar'), 'default' => true, 'class' => 'google-embed-size', 'validation_type' => 'boolean'), 'embedGoogleMapsZoom' => array('type' => 'text', 'label' => __('Google Maps default zoom level', 'tribe-events-calendar'), 'tooltip' => __('0 = zoomed out; 21 = zoomed in.', 'tribe-events-calendar'), 'size' => 'small', 'default' => 10, 'class' => 'google-embed-field', 'validation_type' => 'number_or_percent'), 'tribeEventsMiscellaneousTitle' => array('type' => 'html', 'html' => '<h3>' . __('Miscellaneous Settings', 'tribe-events-calendar') . '</h3>'), 'amalgamateDuplicates' => array('type' => 'html', 'html' => '<fieldset class="tribe-field tribe-field-html"><legend>' . __('Duplicate Venues &amp; Organizers', 'tribe-events-calendar') . '</legend><div class="tribe-field-wrap">' . Tribe_Amalgamator::migration_button(__('Merge Duplicates', 'tribe-events-calendar')) . '<p class="tribe-field-indent description">' . __('You might find duplicate venues and organizers when updating The Events Calendar from a pre-3.0 version. Click this button to automatically merge identical venues and organizers.', 'tribe-events-calendar') . '</p></div></fieldset><div class="clear"></div>', 'conditional' => $tec->getOption('organizer_venue_amalgamation', 0) < 1), 'debugEvents' => array('type' => 'checkbox_bool', 'label' => __('Debug mode', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'debugEventsHelper' => array('type' => 'html', 'html' => '<p class="tribe-field-indent tribe-field-description description" style="max-width:400px;">' . sprintf(__('Enable this option to log debug information. By default this will log to your server PHP error log. If you\'d like to see the log messages in your browser, then we recommend that you install the %s and look for the "Tribe" tab in the debug output.', 'tribe-events-calendar'), '<a href="http://wordpress.org/extend/plugins/debug-bar/" target="_blank">' . __('Debug Bar Plugin', 'tribe-events-calendar') . '</a>') . '</p>', 'conditional' => '' != get_option('permalink_structure')), 'tribe-form-content-end' => array('type' => 'html', 'html' => '</div>'))));
开发者ID:robertark,项目名称:the-events-calendar,代码行数:4,代码来源:tribe-options-general.php

示例2: tribe_get_option

<?php

$displayPressTrendsDialogue = tribe_get_option('displayedPressTrendsDialogue', false);
$displayPressTrendsDialogueValue = $displayPressTrendsDialogue == false ? '1' : '0';
if ($displayPressTrendsDialogue == false) {
    tribe_update_option('displayedPressTrendsDialogue', true);
}
$generalTab = array('priority' => 10, 'fields' => apply_filters('tribe_general_settings_tab_fields', array('info-start' => array('type' => 'html', 'html' => '<div id="modern-tribe-info"><img src="' . plugins_url('resources/images/modern-tribe.png', dirname(__FILE__)) . '" alt="Modern Tribe Inc." title="Modern Tribe Inc.">'), 'upsell-heading' => array('type' => 'heading', 'label' => __('Finding & extending your calendar.', 'tribe-events-calendar'), 'conditional' => !defined('TRIBE_HIDE_UPSELL') || !TRIBE_HIDE_UPSELL), 'finding-heading' => array('type' => 'heading', 'label' => __('Finding your calendar.', 'tribe-events-calendar'), 'conditional' => defined('TRIBE_HIDE_UPSELL') && TRIBE_HIDE_UPSELL), 'view-calendar-link' => array('type' => 'html', 'html' => '<p>' . __('Where\'s my calendar?', 'tribe-events-calendar') . '<br /><a href="' . TribeEvents::getLink() . '">' . __('Right here', 'tribe-events-calendar') . '</a>.</p>'), 'upsell-info' => array('type' => 'html', 'html' => '<p>' . __('Looking for additional functionality including recurring events, custom meta, community events, ticket sales and more?', 'tribe-events-calendar') . '<br><a href="' . self::$tribeUrl . 'shop/?utm_source=generaltab&utm_medium=promolink&utm_campaign=plugin' . '">' . __('Check out the available Add-Ons', 'tribe-events-calendar') . '</a>.</p>', 'conditional' => !defined('TRIBE_HIDE_UPSELL') || !TRIBE_HIDE_UPSELL), 'donate-link-heading' => array('type' => 'heading', 'label' => __('We hope our plugin is helping you out.', 'tribe-events-calendar')), 'donate-link-info' => array('type' => 'html', 'html' => '<p>' . __('Are you thinking "Wow, this plugin is amazing! I should say thanks to Modern Tribe for all their hard work." The greatest thanks we could ask for is recognition. Add a small text only link at the bottom of your calendar pointing to The Events Calendar project.', 'tribe-events-calendar') . '<br><a href="' . plugins_url('resources/images/donate-link-screenshot.jpg', dirname(__FILE__)) . '" class="thickbox">' . __('See an example of the link', 'tribe-events-calendar') . '</a>.</p>', 'conditional' => !class_exists('TribeEventsPro')), 'donate-link-pro-info' => array('type' => 'html', 'html' => '<p>' . __('Are you thinking "Wow, this plugin is amazing! I should say thanks to Modern Tribe for all their hard work." The greatest thanks we could ask for is recognition. Add a small text only link at the bottom of your calendar pointing to The Events Calendar project.', 'tribe-events-calendar') . '<br><a href="' . plugins_url('resources/images/donate-link-pro-screenshot.jpg', dirname(__FILE__)) . '" class="thickbox">' . __('See an example of the link', 'tribe-events-calendar') . '</a>.</p>', 'conditional' => class_exists('TribeEventsPro')), 'donate-link' => array('type' => 'checkbox_bool', 'label' => __('Show Events Calendar Link', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'info-end' => array('type' => 'html', 'html' => '</div>'), 'viewOption' => array('type' => 'radio', 'label' => __('Default view for the Events', 'tribe-events-calendar'), 'default' => 'month', 'options' => array('month' => 'Calendar', 'upcoming' => 'Event List'), 'validation_type' => 'options'), 'unprettyPermalinksUrl' => array('type' => 'html', 'label' => __('Events URL slug', 'tribe-events-calendar'), 'html' => '<p class="tribe-field-indent tribe-field-description description">' . __('You cannot edit the slug for your events page as you do not have pretty permalinks enabled. The current URL for your events page is <a href=" ' . TribeEvents::getLink('home') . '">' . TribeEvents::getLink('home ') . '</a>. In order to edit the slug here, enable pretty permalinks.', 'tribe-events-calendar') . '</p>', 'conditional' => '' == get_option('permalink_structure')), 'eventsSlug' => array('type' => 'text', 'label' => __('Events URL slug', 'tribe-events-calendar'), 'default' => 'events', 'validation_type' => 'slug', 'conditional' => '' != get_option('permalink_structure')), 'current-events-slug' => array('type' => 'html', 'html' => '<p class="tribe-field-indent tribe-field-description description">' . __('The slug used for building the events URL.', 'tribe-events-calendar') . sprintf(__('Your current Events URL is %s', 'tribe-events-calendar'), '<code><a href="' . tribe_get_events_link() . '">' . tribe_get_events_link() . '</a></code>') . '</p>', 'conditional' => '' != get_option('permalink_structure')), 'ical-info' => array('type' => 'html', 'display_callback' => function_exists('tribe_get_ical_link') ? '<p id="ical-link" class="tribe-field-indent tribe-field-description description">' . __('Here is the iCal feed URL for your events:', 'tribe-events-calendar') . ' ' . '<code>' . tribe_get_ical_link() . '</code></p>' : '', 'conditional' => function_exists('tribe_get_ical_link')), 'singleEventSlug' => array('type' => 'text', 'label' => __('Single Event URL slug', 'tribe-events-calendar'), 'default' => 'event', 'validation_type' => 'slug', 'conditional' => '' != get_option('permalink_structure')), 'current-single-event-slug' => array('type' => 'html', 'html' => '<p class="tribe-field-indent tribe-field-description description">' . sprintf(__('You <strong>cannot</strong> use the same slug as above. The above should ideally be plural, and this singular.<br />Your single Event URL is like: %s', 'tribe-events-calendar'), '<code>' . trailingslashit(home_url()) . tribe_get_option('singleEventSlug', 'event') . '/single-post-name/' . '</code>') . '</p>', 'conditional' => '' != get_option('permalink_structure')), 'postsPerPage' => array('type' => 'text', 'label' => __('Number of events to show per page', 'tribe-events-calendar'), 'size' => 'small', 'default' => get_option('posts_per_page'), 'validation_type' => 'positive_int'), 'showComments' => array('type' => 'checkbox_bool', 'label' => __('Show Comments', 'tribe-events-calendar'), 'tooltip' => __('Enable commenting on an event.', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'multiDayCutoff' => array('type' => 'dropdown', 'label' => __('Multiday Event Cutoff', 'tribe-events-calendar'), 'tooltip' => __('Hide final day from grid view if multi-day event ends before this time.', 'tribe-events-calendar'), 'validation_type' => 'options', 'size' => 'small', 'default' => '12:00', 'options' => array('12:00' => '12:00 am', '12:30' => '12:30 am', '01:00' => '01:00 am', '01:30' => '01:30 am', '02:00' => '02:00 am', '02:30' => '02:30 am', '03:00' => '03:00 am', '03:30' => '03:30 am', '04:00' => '04:00 am', '04:30' => '04:30 am', '05:00' => '05:00 am', '05:30' => '05:30 am', '06:00' => '06:00 am', '06:30' => '06:30 am', '07:00' => '07:00 am', '07:30' => '07:30 am', '08:00' => '08:00 am', '08:30' => '08:30 am', '09:00' => '09:00 am', '09:30' => '09:30 am', '10:00' => '10:00 am', '10:30' => '10:30 am', '11:00' => '11:00 am', '11:30' => '11:30 am')), 'embedGoogleMaps' => array('type' => 'checkbox_bool', 'label' => __('Enable Google Maps', 'tribe-events-calendar'), 'tooltip' => __('Turn on to enable backend map preview and frontend map.', 'tribe-events-calendar'), 'default' => true, 'class' => 'google-embed-size', 'validation_type' => 'boolean'), 'embedGoogleMapsHeight' => array('type' => 'text', 'label' => __('Google Maps Embed Height', 'tribe-events-calendar'), 'size' => 'small', 'default' => 350, 'tooltip' => __('Enter a number.', 'tribe-events-calendar'), 'class' => 'google-embed-field', 'validation_type' => 'positive_int'), 'embedGoogleMapsWidth' => array('type' => 'text', 'label' => __('Google Maps Embed Width', 'tribe-events-calendar'), 'size' => 'small', 'tooltip' => __('Enter a number or %.', 'tribe-events-calendar'), 'default' => '100%', 'class' => 'google-embed-field', 'validation_type' => 'number_or_percent'), 'embedGoogleMapsZoom' => array('type' => 'text', 'label' => __('Google Maps Default Zoom Level', 'tribe-events-calendar'), 'tooltip' => __('0 = zoomed out; 21 = zoomed in.', 'tribe_events_calendar'), 'size' => 'small', 'default' => 10, 'class' => 'google-embed-field', 'validation_type' => 'number_or_percent'), 'sendPressTrendsData' => array('type' => 'checkbox_bool', 'label' => __('Send PressTrends Data', 'tribe-events-calendar'), 'tooltip' => __('Help us out by sending analytics data about your usage of The Events Calendar.', 'tribe-events-calendar'), 'default' => false, 'validation_type' => 'boolean'), 'debugEvents' => array('type' => 'checkbox_bool', 'label' => __('Debug Mode', 'tribe-events-calendar'), 'tooltip' => sprintf(__('Enable this option to log debug information. By default this will log to your server PHP error log. If you\'d like to see the log messages in your browser, then we recommend that you install the %s and look for the "Tribe" tab in the debug output.', 'tribe-events-calendar'), '<a href="http://wordpress.org/extend/plugins/debug-bar/" target="_blank">' . __('Debug Bar Plugin', 'tribe-events-calendar') . '</a>'), 'default' => false, 'validation_type' => 'boolean'), 'maybeDisplayPressTrendsDialogue' => array('type' => 'html', 'html' => '<input type="hidden" name="maybeDisplayPressTrendsDialogue" value="' . $displayPressTrendsDialogueValue . '"></input>'), 'pressTrendsDialogue' => array('type' => 'html', 'html' => '<div id="presstrends-dialog" title="Send PressTrends Data" style="display: none;">' . __('Would you like to help us out and send analytics about your usage of The Events Calendar?', 'tribe-events-calendar') . '<br/></div>'))));
开发者ID:mpaskew,项目名称:isc-dev,代码行数:8,代码来源:tribe-options-general.php


注:本文中的TribeEvents::getLink方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。