本文整理匯總了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();
}