• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP espresso_version函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中espresso_version函数的典型用法代码示例。如果您正苦于以下问题:PHP espresso_version函数的具体用法?PHP espresso_version怎么用?PHP espresso_version使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: espresso_ical

 function espresso_ical()
 {
     do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
     $name = $_REQUEST['event_summary'] . ".ics";
     $output = "BEGIN:VCALENDAR\n" . "VERSION:2.0\n" . "PRODID:-//" . $_REQUEST['organization'] . " - Event Espresso Version " . espresso_version() . "//NONSGML v1.0//EN\n" . "METHOD:PUBLISH\n" . "X-WR-CALNAME:" . $_REQUEST['organization'] . "\n" . "X-ORIGINAL-URL:" . $_REQUEST['eereg_url'] . "\n" . "X-WR-CALDESC:" . $_REQUEST['organization'] . "\n" . "X-WR-TIMEZONE:" . get_option('timezone_string') . "\n" . "BEGIN:VEVENT\n" . "DTSTAMP:" . $_REQUEST['currentyear'] . $_REQUEST['currentmonth'] . $_REQUEST['currentday'] . "T" . $_REQUEST['currenttime'] . "\n" . "UID:" . $_REQUEST['registration_id'] . "@" . $_REQUEST['eereg_url'] . "\n" . "ORGANIZER:MAILTO:" . $_REQUEST['contact_email'] . "\n" . "DTSTART:" . $_REQUEST['startyear'] . $_REQUEST['startmonth'] . $_REQUEST['startday'] . "T" . $_REQUEST['starttime'] . "\n" . "DTEND:" . $_REQUEST['endyear'] . $_REQUEST['endmonth'] . $_REQUEST['endday'] . "T" . $_REQUEST['endtime'] . "\n" . "STATUS:CONFIRMED\n" . "URL:" . $_REQUEST['eereg_url'] . "\n" . "SUMMARY:" . $_REQUEST['event_summary'] . "\n" . "LOCATION:" . $_REQUEST['location'] . "\n" . "END:VEVENT\n" . "END:VCALENDAR";
     if (ob_get_length()) {
         echo 'Some data has already been output, can\'t send iCal file';
     }
     header('Content-Type: application/x-download');
     if (headers_sent()) {
         echo 'Some data has already been output, can\'t send iCal file';
     }
     header('Content-Length: ' . strlen($output));
     header('Content-Disposition: attachment; filename="' . $name . '"');
     header('Cache-Control: private, max-age=0, must-revalidate');
     header('Pragma: public');
     header('Content-Type: application/octet-stream');
     header('Content-Type: application/force-download');
     header('Content-type: application/pdf');
     header("Cache-Control: no-cache, must-revalidate");
     // HTTP/1.1
     header("Content-Transfer-Encoding: binary");
     header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
     // Date in the past
     ini_set('zlib.output_compression', '0');
     echo $output;
     die;
 }
开发者ID:sriram911,项目名称:pls,代码行数:28,代码来源:ical.php


示例2: espresso_social_load_admin_file

/**
 * load admin file
 * @author Sidney Harrell
 * @since 1.1.4
 * conditionally loads the admin screen based on the current version of Event Espresso
 * this will be obsolete after we drop support for 3.1.x
 */
function espresso_social_load_admin_file()
{
    if (function_exists('espresso_version') && espresso_version() >= '3.2') {
        require_once 'social_admin.php';
    } else {
        require_once 'social_admin_classic.php';
    }
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:15,代码来源:espresso-social.php


示例3: test_ensure_current_database_state_is_set

 public function test_ensure_current_database_state_is_set()
 {
     $this->_pretend_current_code_state_is_at(espresso_version());
     $this->_pretend_current_db_state_is_at();
     $db_state = EE_Data_Migration_Manager::instance()->ensure_current_database_state_is_set();
     $this->assertArrayHasKey('Core', $db_state);
     $this->assertEquals(espresso_version(), $db_state['Core']);
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:8,代码来源:EE_Data_Migration_Manager_Test.php


示例4: register

 /**
  *    Method for registering new EE_Addons.
  * Should be called AFTER AHEE__EE_System__load_espresso_addons but BEFORE AHEE__EE_System___detect_if_activation_or_upgrade__begin in order to register all its components.
  * However, it may also be called after the 'activate_plugin' action (when an addon is activated),
  * because an activating addon won't be loaded by WP until after AHEE__EE_System__load_espresso_addons has fired.
  * If its called after 'activate_plugin', it registers the addon still, but its components are not registered
  * (they shouldn't be needed anyways, because it's just an activation request and they won't have a chance to do anything anyways). Instead, it just sets the newly-activated addon's activation indicator wp option and returns
  * (so that we can detect that the addon has activated on the subsequent request)
  *
  * @since    4.3.0
  * @param string $addon_name 		the EE_Addon's name. Required.
  * @param  array $setup_args { 			An array of arguments provided for registering the message type.
  * @type  string $class_name the addon's main file name. If left blank, generated from the addon name, changes something like "calendar" to "EE_Calendar"
  *			@type string $min_core_version  the minimum version of EE Core that the addon will work with. eg "4.8.1.rc.084"
  *			@type string $version the "software" version for the addon. eg "1.0.0.p" for a first stable release, or "1.0.0.rc.043" for a version in progress
  *			@type string $main_file_path the full server path to the main file loaded directly by WP
  *          @type string $admin_path 	full server path to the folder where the addon\'s admin files reside
  *			@type string $admin_callback a method to be called when the EE Admin is first invoked, can be used for hooking into any admin page
  *			@type string $config_section the section name for this addon's configuration settings section (defaults to "addons")
  *			@type string $config_class the class name for this addon's configuration settings object
  *			@type string $config_name the class name for this addon's configuration settings object
  * 			@type string $autoloader_paths an array of class names and the full server paths to those files. Required.
  *			@type string $autoloader_folders  an array of  "full server paths" for any folders containing classes that might be invoked by the addon
  * 			@type string $dms_paths 				an array of full server paths to folders that contain data migration scripts. Required.
  * 			@type string $module_paths 	an array of full server paths to any EED_Modules used by the addon
  * 			@type string $shortcode_paths 	an array of full server paths to folders that contain EES_Shortcodes
  * 			@type string $widget_paths 					an array of full server paths to folders that contain WP_Widgets
  *			@type string $pue_options
  * 			@type array $capabilities  {
  * 			      	an array indexed by role name (i.e. administrator,author ) and the values are an array of caps to add to the role.
  * 			      	'administrator' => array('read_addon', 'edit_addon' etc.).
  * 	         		}
  * 	        @type EE_Meta_Capability_Map[] $capability_maps an array of EE_Meta_Capability_Map object for any addons that need to register any special meta mapped capabilities.  Should be indexed where the key is the EE_Meta_Capability_Map class name and the values are the arguments sent to the class.
  *			@type array $model_paths array of folders containing DB models @see EE_Register_Model
  *			@type array $class_paths array of folders containing DB classes @see EE_Register_Model
  *			@type array $model_extension_paths array of folders containing DB model extensions @see EE_Register_Model_Extension
  *			@type array $class_extension_paths array of folders containing DB class extensions @see EE_Register_Model_Extension
  * 			@type array message_types {
  *       		 An array of message types with the key as the message type name and the values as below:
  *        		@type string $mtfilename The filename of the message type being registered.  This will be the main
  *                                       EE_{Messagetype_Name}_message_type class. (eg. EE_Declined_Registration_message_type.class.php). Required.
  *               @type array $autoloadpaths An array of paths to add to the messages autoloader for the new message type. Required.
  *               @type array $messengers_to_activate_with An array of messengers that this message
  *                           type should activate with. Each value in the array should match the name property of a EE_messenger. Optional.
  *               @type array $messengers_to_validate_with An array of messengers that this message
  *                          type should validate with. Each value in the array should match the name property of an EE_messenger. Optional.
  *       	}
  *			@type array $custom_post_types
  *			@type array $custom_taxonomies
  *			@type array $payment_method_paths each element is the folder containing the EE_PMT_Base child class
  *				(eg, 'public_html/wp-content/plugins/my_plugin/Payomatic/' which contains the files
  *				EE_PMT_Payomatic.pm.php)
  *			@type array $default_terms
  * 	}
  *
  * @throws EE_Error
  * @return void
  */
 public static function register($addon_name = '', $setup_args = array())
 {
     // required fields MUST be present, so let's make sure they are.
     if (empty($addon_name) || !is_array($setup_args)) {
         throw new EE_Error(__('In order to register an EE_Addon with EE_Register_Addon::register(), you must include the "addon_name" (the name of the addon), and an array of arguments.', 'event_espresso'));
     }
     if (!isset($setup_args['main_file_path']) || empty($setup_args['main_file_path'])) {
         throw new EE_Error(sprintf(__('When registering an addon, you didn\'t provide the "main_file_path", which is the full path to the main file loaded directly by Wordpress. You only provided %s', 'event_espresso'), implode(",", array_keys($setup_args))));
     }
     // check that addon has not already been registered with that name
     if (isset(self::$_settings[$addon_name]) && !did_action('activate_plugin')) {
         throw new EE_Error(sprintf(__('An EE_Addon with the name "%s" has already been registered and each EE_Addon requires a unique name.', 'event_espresso'), $addon_name));
     }
     // no class name for addon?
     if (empty($setup_args['class_name'])) {
         // generate one by first separating name with spaces
         $class_name = str_replace(array('-', '_'), ' ', trim($addon_name));
         //capitalize, then replace spaces with underscores
         $class_name = str_replace(' ', '_', ucwords($class_name));
     } else {
         $class_name = $setup_args['class_name'];
     }
     $class_name = strpos($class_name, 'EE_') === 0 ? $class_name : 'EE_' . $class_name;
     //setup $_settings array from incoming values.
     $addon_settings = array('class_name' => $class_name, 'plugin_slug' => isset($setup_args['plugin_slug']) ? (string) $setup_args['plugin_slug'] : '', 'plugin_action_slug' => isset($setup_args['plugin_action_slug']) ? (string) $setup_args['plugin_action_slug'] : '', 'version' => isset($setup_args['version']) ? (string) $setup_args['version'] : '', 'min_core_version' => isset($setup_args['min_core_version']) ? (string) $setup_args['min_core_version'] : '', 'main_file_path' => isset($setup_args['main_file_path']) ? (string) $setup_args['main_file_path'] : '', 'admin_path' => isset($setup_args['admin_path']) ? (string) $setup_args['admin_path'] : '', 'admin_callback' => isset($setup_args['admin_callback']) ? (string) $setup_args['admin_callback'] : '', 'config_section' => isset($setup_args['config_section']) ? (string) $setup_args['config_section'] : 'addons', 'config_class' => isset($setup_args['config_class']) ? (string) $setup_args['config_class'] : '', 'config_name' => isset($setup_args['config_name']) ? (string) $setup_args['config_name'] : '', 'autoloader_paths' => isset($setup_args['autoloader_paths']) ? (array) $setup_args['autoloader_paths'] : array(), 'autoloader_folders' => isset($setup_args['autoloader_folders']) ? (array) $setup_args['autoloader_folders'] : array(), 'dms_paths' => isset($setup_args['dms_paths']) ? (array) $setup_args['dms_paths'] : array(), 'module_paths' => isset($setup_args['module_paths']) ? (array) $setup_args['module_paths'] : array(), 'shortcode_paths' => isset($setup_args['shortcode_paths']) ? (array) $setup_args['shortcode_paths'] : array(), 'widget_paths' => isset($setup_args['widget_paths']) ? (array) $setup_args['widget_paths'] : array(), 'pue_options' => isset($setup_args['pue_options']) ? (array) $setup_args['pue_options'] : array(), 'message_types' => isset($setup_args['message_types']) ? (array) $setup_args['message_types'] : array(), 'capabilities' => isset($setup_args['capabilities']) ? (array) $setup_args['capabilities'] : array(), 'capability_maps' => isset($setup_args['capability_maps']) ? (array) $setup_args['capability_maps'] : array(), 'model_paths' => isset($setup_args['model_paths']) ? (array) $setup_args['model_paths'] : array(), 'class_paths' => isset($setup_args['class_paths']) ? (array) $setup_args['class_paths'] : array(), 'model_extension_paths' => isset($setup_args['model_extension_paths']) ? (array) $setup_args['model_extension_paths'] : array(), 'class_extension_paths' => isset($setup_args['class_extension_paths']) ? (array) $setup_args['class_extension_paths'] : array(), 'custom_post_types' => isset($setup_args['custom_post_types']) ? (array) $setup_args['custom_post_types'] : array(), 'custom_taxonomies' => isset($setup_args['custom_taxonomies']) ? (array) $setup_args['custom_taxonomies'] : array(), 'payment_method_paths' => isset($setup_args['payment_method_paths']) ? (array) $setup_args['payment_method_paths'] : array(), 'default_terms' => isset($setup_args['default_terms']) ? (array) $setup_args['default_terms'] : array(), 'plugins_page_row' => isset($setup_args['plugins_page_row']) ? $setup_args['plugins_page_row'] : '');
     // if plugin_action_slug is NOT set, but an admin page path IS set, then let's just use the plugin_slug since that will be used for linking to the admin page
     $addon_settings['plugin_action_slug'] = empty($addon_settings['plugin_action_slug']) && !empty($addon_settings['admin_path']) ? $addon_settings['plugin_slug'] : $addon_settings['plugin_action_slug'];
     // full server path to main file (file loaded directly by WP)
     $addon_settings['plugin_basename'] = plugin_basename($addon_settings['main_file_path']);
     //check whether this addon version is compatible with EE core
     if (isset(EE_Register_Addon::$_incompatible_addons[$addon_name]) && !self::_meets_min_core_version_requirement(EE_Register_Addon::$_incompatible_addons[$addon_name], $addon_settings['version'])) {
         $incompatibility_message = sprintf(__('The Event Espresso "%1$s" addon was deactivated because it is incompatible with this version of core.%2$s Only version %3$s or higher of "%1$s" can run with this version of core. This can happen when attempting to run beta versions or release candidates with older versions of core, or running old versions of addons with a newer version of core.%2$sPlease upgrade Event Espresso Core and the "%1$s" addon, then re-attempt activating it.', 'event_espresso'), $addon_name, '<br />', EE_Register_Addon::$_incompatible_addons[$addon_name]);
     } else {
         if (!self::_meets_min_core_version_requirement($setup_args['min_core_version'], espresso_version())) {
             $incompatibility_message = sprintf(__('The Event Espresso "%1$s" addon could not be activated because it requires Event Espresso Core version "%2$s" or higher in order to run.%4$sYour version of Event Espresso Core is currently at "%3$s". Please upgrade Event Espresso Core first and then re-attempt activating "%1$s".', 'event_espresso'), $addon_name, self::_effective_version($setup_args['min_core_version']), self::_effective_version(espresso_version()), '<br />');
         } else {
             $incompatibility_message = '';
         }
     }
     if (!empty($incompatibility_message)) {
         //remove 'activate' from the REQUEST so WP doesn't erroneously tell the user the
         //plugin activated fine when it didn't
//.........这里部分代码省略.........
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:101,代码来源:EE_Register_Addon.lib.php


示例5: core_version

 /**
  * Gets the major and minor version of EE core's version string
  * @return string
  */
 public static function core_version()
 {
     return apply_filters('FHEE__EED_Core_REST_API__core_version', implode('.', array_slice(explode('.', espresso_version()), 0, 3)));
 }
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:8,代码来源:EED_Core_Rest_Api.module.php


示例6: espresso_ticket_config_mnu


//.........这里部分代码省略.........
"><?php 
            _e('Delete', 'event_espresso');
            ?>
</a></span></div>
								</td>
								<?php 
            if (function_exists('espresso_is_admin') && espresso_is_admin() == true && $espresso_premium == true) {
                $user_company = espresso_user_meta($wp_user, 'company') != '' ? espresso_user_meta($wp_user, 'company') : '';
                $user_organization = espresso_user_meta($wp_user, 'organization') != '' ? espresso_user_meta($wp_user, 'organization') : '';
                $user_co_org = $user_company != '' ? $user_company : $user_organization;
                ?>
									<td class="date"><?php 
                echo espresso_user_meta($wp_user, 'user_firstname') != '' ? espresso_user_meta($wp_user, 'user_firstname') . ' ' . espresso_user_meta($wp_user, 'user_lastname') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)' : espresso_user_meta($wp_user, 'display_name') . ' (<a href="user-edit.php?user_id=' . $wp_user . '">' . espresso_user_meta($wp_user, 'user_nicename') . '</a>)';
                echo $user_co_org != '' ? '<br />[' . espresso_user_meta($wp_user, 'company') . ']' : '';
                ?>
									</td>
							<?php 
            }
            ?>
								<td><a href="admin.php?page=event_tickets&action=edit_ticket&id=<?php 
            echo $ticket_id;
            ?>
">
							<?php 
            _e('Edit Ticket Template', 'event_espresso');
            ?>
									</a></td>
							</tr>
		<?php 
        }
    }
    ?>
				</tbody>
			</table>
			<p>

				<input type="checkbox" name="sAll" onclick="selectAll(this)" />
				<strong>
		<?php 
    _e('Check All', 'event_espresso');
    ?>
				</strong>
				<input name="delete_ticket" type="submit" class="button-secondary" id="delete_ticket" value="<?php 
    _e('Delete Selected', 'event_espresso');
    ?>
" style="margin-left:100px;" onclick="return confirmDelete();"> <?php 
    echo '<a href="admin.php?page=event_tickets&amp;action=add_new_ticket" style="margin-left:5px"class="button-primary">' . __('Add New', 'event_espresso') . '</a>';
    ?>
			</p>
		</form>
		<?php 
    $main_post_content = ob_get_clean();
    if (function_exists('espresso_version') && espresso_version() >= '3.2') {
        ob_start();
        do_meta_boxes('event-espresso_page_event_tickets', 'side', null);
        $sidebar_content = ob_get_clean();
        espresso_choose_layout($main_post_content, $sidebar_content);
    } else {
        espresso_choose_layout($main_post_content, event_espresso_display_right_column());
    }
    ?>
	</div>
	<?php 
    include_once 'tickets_help.php';
    ?>
	<script>
		jQuery(document).ready(function($) {

			/* show the table data */
			var mytable = $('#table').dataTable( {
				"bStateSave": true,
				"sPaginationType": "full_numbers",

				"oLanguage": {	"sSearch": "<strong><?php 
    _e('Live Search Filter', 'event_espresso');
    ?>
:</strong>",
					"sZeroRecords": "<?php 
    _e('No Records Found!', 'event_espresso');
    ?>
" },
				"aoColumns": [
					{ "bSortable": false },
					null,
					null,
	<?php 
    echo function_exists('espresso_is_admin') && espresso_is_admin() == true ? 'null,' : '';
    ?>
					null

				]

			} );

		} );
	</script>

	<?php 
    //echo event_espresso_custom_ticket_info();
}
开发者ID:sriram911,项目名称:pls,代码行数:101,代码来源:index.php


示例7: update_current_database_state_to

 /**
  * Updates the wordpress option that keeps track of which which EE version the database
  * is at (ie, the code may be at 4.1.0, but the database is still at 3.1.35)
  * @param array $slug_and_version {
  *	@type string $slug like 'Core' or 'Calendar',
  *	@type string $version like '4.1.0'
  * }
  * @return void
  */
 public function update_current_database_state_to($slug_and_version = null)
 {
     if (!$slug_and_version) {
         //no version was provided, assume it should be at the current code version
         $slug_and_version = array('slug' => 'Core', 'version' => espresso_version());
     }
     $current_database_state = get_option(self::current_database_state);
     $current_database_state[$slug_and_version['slug']] = $slug_and_version['version'];
     update_option(self::current_database_state, $current_database_state);
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:19,代码来源:EE_Data_Migration_Manager.core.php


示例8: str_replace

        }
    }
}
if (isset($_REQUEST['page_id']) || is_admin()) {
    $this_is_a_reg_page = TRUE;
}
//This will (should) make sure everything is loaded via SSL
//So that the "..not everything is secure.." message doesn't appear
//Still will be a problem if other themes and plugins do not implement ssl correctly
$wp_plugin_url = WP_PLUGIN_URL;
$wp_content_url = WP_CONTENT_URL;
if (is_ssl()) {
    $wp_plugin_url = str_replace('http://', 'https://', WP_PLUGIN_URL);
    $wp_content_url = str_replace('http://', 'https://', WP_CONTENT_URL);
}
define("EVENT_ESPRESSO_VERSION", espresso_version());
define('EVENT_ESPRESSO_POWERED_BY', 'Event Espresso - ' . EVENT_ESPRESSO_VERSION);
//Define the plugin directory and path
define("EVENT_ESPRESSO_PLUGINPATH", "/" . plugin_basename(dirname(__FILE__)) . "/");
define("EVENT_ESPRESSO_PLUGINFULLPATH", WP_PLUGIN_DIR . EVENT_ESPRESSO_PLUGINPATH);
define("EVENT_ESPRESSO_PLUGINFULLURL", $wp_plugin_url . EVENT_ESPRESSO_PLUGINPATH);
//End - Define the plugin directory and path
//Define dierectory structure for uploads
if (!defined('WP_CONTENT_DIR')) {
    define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
}
$upload_path = WP_CONTENT_DIR . "/uploads";
$event_espresso_upload_dir = "{$upload_path}/espresso/";
$event_espresso_template_dir = "{$event_espresso_upload_dir}templates/";
$includes_directory = EVENT_ESPRESSO_PLUGINFULLPATH . 'includes/';
define("EVENT_ESPRESSO_INCLUDES_DIR", $includes_directory);
开发者ID:sriram911,项目名称:pls,代码行数:31,代码来源:espresso.php


示例9: test_model_version_info_is_up_to_date

 /**
  * Helps us to remember to update the model version info every time we add something 
  * that would require it to change. AT this point I know something will come up in 4.9
  * so when that comes, we will need to update the model changes array in Model_Version_Info
  */
 function test_model_version_info_is_up_to_date()
 {
     $this->assertTrue(espresso_version() < '4.9.0');
 }
开发者ID:teemuoksanen,项目名称:event-espresso-core,代码行数:9,代码来源:Model_Version_Info_Test.php


示例10:

 **/
//month, basicWeek, basicDay, agendaWeek, agendaDay
$espresso_calendar_widget .= 'defaultView: \'month\',';
//Defines the buttons and title at the top of the calendar.
$espresso_calendar_widget .= 'header: { left: \'prev\', center: \'title\', right: \'next\' },';
// setting this to a blank value so no title/buttons appear
/**
 * Theme Settings
 *
 * Once you enable theming with true, you still need to include the CSS file for the theme you want.
 * For example, if you just downloaded a theme from the jQuery UI Themeroller, you need to put a <link> tag in your page's <head>.
 **/
//jQuery UI Themeroller
//Enables/disables use of jQuery UI theming.
//Settings: http://arshaw.com/fullcalendar/docs/display/theme/
if (!empty($org_options['style_settings']['enable_default_style']) && $org_options['style_settings']['enable_default_style'] == 'Y' || function_exists('espresso_version') && espresso_version() >= '3.2.P' && !empty($org_options['style_settings']['enable_default_style']) && $org_options['style_settings']['enable_default_style'] == true) {
    $espresso_calendar_widget .= 'theme: true,';
}
//This option only applies to calendars that have jQuery UI theming enabled with the theme option.
/*buttonIcons:{ //Settings: http://arshaw.com/fullcalendar/docs/display/buttonIcons/
			prev: 'circle-triangle-w',
			next: 'circle-triangle-e'
		},*/
//The day that each week begins.
//The value must be a number that represents the day of the week.
//Sunday=0, Monday=1, Tuesday=2, etc.
$espresso_calendar_widget .= 'firstDay: ' . $espresso_calendar['espresso_calendar_firstday'] . ',';
//Settings: http://arshaw.com/fullcalendar/docs/display/firstDay/
//Displays the calendar in right-to-left mode.
$espresso_calendar_widget .= 'isRTL: false,';
//Whether to include Saturday/Sunday columns in any of the calendar views.
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:espresso-calendar-widget.php


示例11: test_detect_activation_or_upgrade__downgrade_upon_normal_request

 function test_detect_activation_or_upgrade__downgrade_upon_normal_request()
 {
     $pretend_previous_version = $this->_add_to_version(espresso_version(), '0.1.0.0.0');
     $this->_pretend_espresso_db_update_is(array($pretend_previous_version => array(current_time('mysql'))));
     $this->assertEquals(EE_System::req_type_downgrade, EE_System::reset()->detect_req_type());
     $current_activation_history = get_option('espresso_db_update');
     $this->assertArrayHasKey($pretend_previous_version, $current_activation_history);
     $this->assertTimeIsAbout(current_time('timestamp'), $current_activation_history[$pretend_previous_version][0]);
     $this->assertArrayHasKey(espresso_version(), $current_activation_history);
     $this->assertTimeIsAbout(current_time('timestamp'), $current_activation_history[espresso_version()][0]);
     $this->assertWPOptionDoesNotExist('ee_espresso_activation');
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:12,代码来源:EE_System_Test.php


示例12: write_metadata_to_csv

 /**
  * Writes some meta data to the CSV as a bunch of columns. Initially we're only
  * mentioning the version and timezone
  * @param resource $filehandle
  */
 public function write_metadata_to_csv($filehandle)
 {
     EE_Registry::instance()->load_helper('DTT_Helper');
     $data_row = array(EE_CSV::metadata_header);
     //do NOT translate because this exact string is used when importing
     $this->fputcsv2($filehandle, $data_row);
     EE_Registry::instance()->load_helper('DTT_Helper');
     $meta_data = array(0 => array('version' => espresso_version(), 'timezone' => EEH_DTT_Helper::get_timezone(), 'time_of_export' => current_time('mysql'), 'site_url' => site_url()));
     $this->write_data_array_to_csv($filehandle, $meta_data);
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:15,代码来源:EE_CSV.class.php


示例13: setUp

 /**
  * Registers the mock addon so it can be used for testing
  */
 public function setUp()
 {
     parent::setUp();
     $this->_pretend_addon_hook_time();
     $mock_addon_path = EE_TESTS_DIR . 'mocks/addons/eea-new-addon/';
     EE_Register_Addon::register($this->_addon_name, array('version' => '1.0.0.dev.000', 'min_core_version' => '4.0.0', 'main_file_path' => $mock_addon_path . 'eea-new-addon.php', 'dms_paths' => $mock_addon_path . 'core/data_migration_scripts'));
     //double-check that worked fine
     $this->assertAttributeNotEmpty('EE_New_Addon', EE_Registry::instance()->addons);
     $DMSs_available = EE_Data_Migration_Manager::reset()->get_all_data_migration_scripts_available();
     $this->assertArrayHasKey('EE_DMS_New_Addon_1_0_0', $DMSs_available);
     //ensure this is the only addon
     $this->assertEquals(1, count(EE_Registry::instance()->addons));
     $this->_addon = EE_Registry::instance()->addons->EE_New_Addon;
     $this->assertTrue($this->_addon instanceof EE_New_Addon);
     $this->_addon_classname = get_class($this->_addon);
     $this->_addon_activation_history = $this->_addon->get_activation_history();
     $this->_current_db_state = get_option(EE_Data_Migration_Manager::current_database_state);
     delete_option(EE_Data_Migration_Manager::current_database_state);
     update_option(EE_Data_Migration_Manager::current_database_state, array('Core' => espresso_version()));
     add_filter('FHEE__EEH_Activation__create_table__short_circuit', array($this, 'dont_short_circuit_new_addon_table'), 20, 3);
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:24,代码来源:EE_System_Test_With_Addons.php


示例14: doing_it_wrong

 /**
  * This basically mimics the WordPress _doing_it_wrong() function except adds our own messaging etc.
  * Very useful for providing helpful messages to developers when the method of doing something has been deprecated,
  * or we want to make sure they use something the right way.
  *
  * @access public
  * @param string $function      The function that was called
  * @param string $message       A message explaining what has been done incorrectly
  * @param string $version       The version of Event Espresso where the error was added
  * @param string  $applies_when a version string for when you want the doing_it_wrong notice to begin appearing
  *                              for a deprecated function. This allows deprecation to occur during one version,
  *                              but not have any notices appear until a later version. This allows developers
  *                              extra time to update their code before notices appear.
  * @param int     $error_type
  * @uses   trigger_error()
  */
 public function doing_it_wrong($function, $message, $version, $applies_when = '', $error_type = null)
 {
     $applies_when = !empty($applies_when) ? $applies_when : espresso_version();
     $error_type = $error_type !== null ? $error_type : E_USER_NOTICE;
     // because we swapped the parameter order around for the last two params,
     // let's verify that some third party isn't still passing an error type value for the third param
     if (is_int($applies_when)) {
         $error_type = $applies_when;
         $applies_when = espresso_version();
     }
     // if not displaying notices yet, then just leave
     if (version_compare(espresso_version(), $applies_when, '<')) {
         return;
     }
     do_action('AHEE__EEH_Debug_Tools__doing_it_wrong_run', $function, $message, $version);
     $version = $version === null ? '' : sprintf(__('(This message was added in version %s of Event Espresso)', 'event_espresso'), $version);
     $error_message = sprintf(esc_html__('%1$s was called %2$sincorrectly%3$s. %4$s %5$s', 'event_espresso'), $function, '<strong>', '</strong>', $message, $version);
     //don't trigger error if doing ajax, instead we'll add a transient EE_Error notice that in theory should show on the next request.
     if (defined('DOING_AJAX') && DOING_AJAX) {
         $error_message .= ' ' . esc_html__('This is a doing_it_wrong message that was triggered during an ajax request.  The request params on this request were: ', 'event_espresso');
         $error_message .= '<ul><li>';
         $error_message .= implode('</li><li>', EE_Registry::instance()->REQ->params());
         $error_message .= '</ul>';
         EE_Error::add_error($error_message, 'debug::doing_it_wrong', $function, '42');
         //now we set this on the transient so it shows up on the next request.
         EE_Error::get_notices(false, true);
     } else {
         trigger_error($error_message, $error_type);
     }
 }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:46,代码来源:EEH_Debug_Tools.helper.php


示例15: espresso_enqueue_admin_ticketing_menu_css

 function espresso_enqueue_admin_ticketing_menu_css()
 {
     if (is_admin() && function_exists('espresso_version') && espresso_version() >= '3.2.P') {
         wp_enqueue_style('espresso_ticketing_menu', ESPRESSO_TICKETING_FULL_URL . 'css/admin-menu-styles.css');
     }
     if (isset($_REQUEST['page']) && $_REQUEST['page'] == 'event_tickets') {
         wp_enqueue_style('espresso_ticketing', ESPRESSO_TICKETING_FULL_URL . 'css/admin-styles.css');
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:9,代码来源:espresso-ticketing.php


示例16: espresso_version

<?php

$version = espresso_version();
?>
<div class="metabox-holder">
        <div class="postbox">
<h3>Premium Feature</h3>
          <div class="inside">
          <div class="padding">
            <h2 style="color:#F00; text-align:center;">This feature is included in the premium version of Event Espresso. </h2>
            <h4 style=" text-align:center;">Upgrade Now!</h4>
 <style> 
   
  
        
    #pricing-table {
        margin: 20px auto 20px auto;
        text-align: center;
        width: 892px; /* total computed width = 222 x 3 + 226 */
    }

    #pricing-table .plan {
        font: 12px 'Lucida Sans', 'trebuchet MS', Arial, Helvetica;
        text-shadow: 0 1px rgba(255,255,255,.8);        
        background: #fff;      
        border: 1px solid #ddd;
        color: #333;
        padding: 20px;
        width: 180px; /* plan width = 180 + 20 + 20 + 1 + 1 = 222px */      
        float: left;
        position: relative;
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:pricing_table.php


示例17: edit_event_ticket


//.........这里部分代码省略.........
    ?>
" />
		  							<input id="upload_image_button" type="button" value="Upload Image" />
		 							 <?php 
    if ($ticket_logo) {
        ?>
		  							<p class="ticket-logo-thumb"><img src="<?php 
        echo $ticket_logo;
        ?>
" alt="" /></p>
										<a id='remove-image' href='#' title='<?php 
        _e('Remove this image', 'event_espresso');
        ?>
' onclick='return false;'><?php 
        _e('Remove Image', 'event_espresso');
        ?>
</a>
		  						<?php 
    }
    ?>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
						
						<div id="descriptiondivrich" class="postarea">
						<label for="ticket_content">
							<strong><?php 
    _e('Ticket Description/Instructions ', 'event_espresso');
    ?>
</strong> 
							<?php 
    if (function_exists('espresso_version') && espresso_version() >= '3.2.P') {
        echo apply_filters('filter_hook_espresso_help', 'ticket_description_info');
    } else {
        echo '<a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=ticket_description_info" target="_blank"><img src="' . EVENT_ESPRESSO_PLUGINFULLURL . '/images/question-frame.png" width="16" height="16" /></a>';
    }
    ?>
						</label>
						<div class="postbox">
						<?php 
    wp_editor(stripslashes_deep($ticket_content), 'ticket_content', array('media_buttons' => true, 'tab_index' => 3));
    ?>
						<table id="manage-event-ticket-form" cellspacing="0">
							<tbody>
								<tr>
									<td class="aer-word-count"></td>
									<td class="autosave-info"><span> <?php 
    /*?><a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_ticket_info">
    			<?php _e('View Custom Ticket Tags', 'event_espresso'); ?>
    				</a> | <a class="thickbox" href="#TB_inline?height=300&width=400&inlineId=custom_ticket_example">
    			<?php _e('Ticket Example','event_espresso'); ?></a> 
    		| <a class="thickbox" href="<?php echo ESPRESSO_TICKETING_FULL_URL.'templates/'.$css_file; ?>?TB_iframe=true&height=200&width=630">
    			<?php _e('Preview','event_espresso'); ?>
    			</a><?php */
    ?>
 </span></td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>

				<p>
					<input class="button-primary" type="submit" name="Submit" value="<?php 
开发者ID:sriram911,项目名称:pls,代码行数:67,代码来源:edit_ticket.php


示例18: _maintenance

 /**
  * default maintenance page. If we're in maintenance mode level 2, then we need to show
  * the migration scripts and all that UI.
  */
 public function _maintenance()
 {
     //it all depends if we're in maintenance model level 1 (frontend-only) or
     //level 2 (everything except maintenance page)
     try {
         //get the current maintenance level and check if
         //we are removed
         $mm = EE_Maintenance_Mode::instance()->level();
         $placed_in_mm = EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
         if ($mm == EE_Maintenance_Mode::level_2_complete_maintenance && !$placed_in_mm) {
             //we just took the site out of maintenance mode, so notify the user.
             //unfortunately this message appears to be echoed on the NEXT page load...
             //oh well, we should really be checking for this on addon deactivation anyways
             EE_Error::add_attention(__('Site taken out of maintenance mode because no data migration scripts are required', 'event_espresso'));
             $this->_process_notices(array('page' => 'espresso_maintenance_settings'), false);
         }
         //in case an exception is thrown while trying to handle migrations
         switch (EE_Maintenance_Mode::instance()->level()) {
             case EE_Maintenance_Mode::level_0_not_in_maintenance:
             case EE_Maintenance_Mode::level_1_frontend_only_maintenance:
                 $show_maintenance_switch = true;
                 $show_backup_db_text = false;
                 $show_migration_progress = false;
                 $script_names = array();
                 $addons_should_be_upgraded_first = false;
                 break;
             case EE_Maintenance_Mode::level_2_complete_maintenance:
                 $show_maintenance_switch = false;
                 $show_migration_progress = true;
                 if (isset($this->_req_data['continue_migration'])) {
                     $show_backup_db_text = false;
                 } else {
                     $show_backup_db_text = true;
                 }
                 $scripts_needing_to_run = EE_Data_Migration_Manager::instance()->check_for_applicable_data_migration_scripts();
                 $addons_should_be_upgraded_first = EE_Data_Migration_Manager::instance()->addons_need_updating();
                 $script_names = array();
                 $current_script = NULL;
                 foreach ($scripts_needing_to_run as $script) {
                     if ($script instanceof EE_Data_Migration_Script_Base) {
                         if (!$current_script) {
                             $current_script = $script;
                             $current_script->migration_page_hooks();
                         }
                         $script_names[] = $script->pretty_name();
                     }
                 }
                 break;
         }
         $most_recent_migrati 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP esquerda函数代码示例发布时间:2022-05-15
下一篇:
PHP espresso_user_meta函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap