本文整理汇总了PHP中FrmForm::get_current_form方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmForm::get_current_form方法的具体用法?PHP FrmForm::get_current_form怎么用?PHP FrmForm::get_current_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmForm
的用法示例。
在下文中一共展示了FrmForm::get_current_form方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_current_form
public static function get_current_form($form_id = 0)
{
_deprecated_function(__FUNCTION__, '2.0.9', 'FrmForm::get_current_form');
return FrmForm::get_current_form($form_id);
}
示例2: display_list
public static function display_list($message = '', $errors = array())
{
global $wpdb, $frm_vars;
$form = FrmForm::get_current_form();
$params = FrmForm::get_admin_params($form);
if ($form) {
$params['form'] = $form->id;
$frm_vars['current_form'] = $form;
if ('trash' == $form->status) {
$delete_timestamp = time() - DAY_IN_SECONDS * EMPTY_TRASH_DAYS;
$time_to_delete = FrmAppHelper::human_time_diff($delete_timestamp, isset($form->options['trash_time']) ? $form->options['trash_time'] : time());
$errors['trash'] = sprintf(__('This form is in the trash and is scheduled to be deleted permanently in %s along with any entries.', 'formidable'), $time_to_delete);
unset($time_to_delete, $delete_timestamp);
}
}
$table_class = apply_filters('frm_entries_list_class', 'FrmEntriesListHelper');
$wp_list_table = new $table_class(array('params' => $params));
$pagenum = $wp_list_table->get_pagenum();
$wp_list_table->prepare_items();
$total_pages = $wp_list_table->get_pagination_arg('total_pages');
if ($pagenum > $total_pages && $total_pages > 0) {
$url = add_query_arg('paged', $total_pages);
if (headers_sent()) {
echo FrmAppHelper::js_redirect($url);
} else {
wp_redirect(esc_url_raw($url));
}
die;
}
if (empty($message) && isset($_GET['import-message'])) {
$message = __('Your import is complete', 'formidable');
}
require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php';
}