本文整理汇总了PHP中FrmAppHelper::use_wpautop方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmAppHelper::use_wpautop方法的具体用法?PHP FrmAppHelper::use_wpautop怎么用?PHP FrmAppHelper::use_wpautop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmAppHelper
的用法示例。
在下文中一共展示了FrmAppHelper::use_wpautop方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: replace_shortcodes
public static function replace_shortcodes($html, $form, $title = false, $description = false, $values = array())
{
foreach (array('form_name' => $title, 'form_description' => $description, 'entry_key' => true) as $code => $show) {
if ($code == 'form_name') {
$replace_with = $form->name;
} else {
if ($code == 'form_description') {
$replace_with = FrmAppHelper::use_wpautop($form->description);
} else {
if ($code == 'entry_key' && isset($_GET) && isset($_GET['entry'])) {
$replace_with = FrmAppHelper::simple_get('entry');
} else {
$replace_with = '';
}
}
}
FrmFieldsHelper::remove_inline_conditions(FrmAppHelper::is_true($show) && $replace_with != '', $code, $replace_with, $html);
}
//replace [form_key]
$html = str_replace('[form_key]', $form->form_key, $html);
//replace [frmurl]
$html = str_replace('[frmurl]', FrmFieldsHelper::dynamic_default_values('frmurl'), $html);
if (strpos($html, '[button_label]')) {
add_filter('frm_submit_button', 'FrmFormsHelper::submit_button_label', 1);
$replace_with = apply_filters('frm_submit_button', $title, $form);
$html = str_replace('[button_label]', $replace_with, $html);
}
$html = apply_filters('frm_form_replace_shortcodes', $html, $form, $values);
if (strpos($html, '[if back_button]')) {
$html = preg_replace('/(\\[if\\s+back_button\\])(.*?)(\\[\\/if\\s+back_button\\])/mis', '', $html);
}
if (strpos($html, '[if save_draft]')) {
$html = preg_replace('/(\\[if\\s+save_draft\\])(.*?)(\\[\\/if\\s+save_draft\\])/mis', '', $html);
}
if (apply_filters('frm_do_html_shortcodes', true)) {
$html = do_shortcode($html);
}
return $html;
}
示例2: edit_description
public static function edit_description()
{
check_ajax_referer('frm_ajax', 'nonce');
FrmAppHelper::permission_check('frm_edit_forms', 'hide');
$form_id = FrmAppHelper::get_post_param('form_id', '', 'absint');
$value = FrmAppHelper::get_post_param('update_value', '', 'wp_filter_post_kses');
FrmForm::update($form_id, array('description' => $value));
$description = FrmAppHelper::use_wpautop(stripslashes($value));
echo $description;
wp_die();
}
示例3: edit_description
public static function edit_description()
{
$values = self::edit_in_place_value('description');
echo wp_kses_post(FrmAppHelper::use_wpautop(stripslashes($values['description'])));
wp_die();
}