本文整理汇总了PHP中TribeEvents::debug方法的典型用法代码示例。如果您正苦于以下问题:PHP TribeEvents::debug方法的具体用法?PHP TribeEvents::debug怎么用?PHP TribeEvents::debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TribeEvents
的用法示例。
在下文中一共展示了TribeEvents::debug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doField
/**
* Determines how to handle this field's creation
* either calls a callback function or runs this class' course of action
* logs an error if it fails
*
* @since 2.0.5
* @author jkudish
* @return void
*/
public function doField()
{
if ($this->conditional) {
if ($this->display_callback && is_callable($this->display_callback)) {
// if there's a callback, run it
call_user_func($this->display_callback);
} elseif (in_array($this->type, $this->valid_field_types)) {
// the specified type exists, run the appropriate method
$field = call_user_func(array($this, $this->type));
// filter the output
$field = apply_filters('tribe_field_output_' . $this->type, $field, $this->id, $this);
echo apply_filters('tribe_field_output_' . $this->type . '_' . $this->id, $field, $this->id, $this);
} else {
// fail, log the error
TribeEvents::debug(__('Invalid field type specified', 'tribe-events-calendar'), $this->type, 'notice');
}
}
}
示例2: addSupportForm
public function addSupportForm()
{
if (class_exists('Debug_Bar')) {
TribeEvents::debug(self::supportForm());
}
}
示例3: getLegacyEvents
/**
* Search for legacy events
*
* @param int $number max event count to look up
* @return query of posts
*/
private static function getLegacyEvents($number = -1)
{
// TODO: needs to account for either v1 posts or v2 'sp_events'
$query = new WP_Query(array('post_status' => 'any', 'posts_per_page' => $number, 'meta_key' => '_EventStartDate', 'category_name' => 'Events'));
if (count($query->posts)) {
TribeEvents::debug(__('Install has 1 or more legacy event!', 'tribe-events-calendar'), false, 'warning');
}
return $query->posts;
}