本文整理匯總了PHP中GVCommon::decode_shortcodes方法的典型用法代碼示例。如果您正苦於以下問題:PHP GVCommon::decode_shortcodes方法的具體用法?PHP GVCommon::decode_shortcodes怎麽用?PHP GVCommon::decode_shortcodes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GVCommon
的用法示例。
在下文中一共展示了GVCommon::decode_shortcodes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: apply_filters
*/
$field_settings['content'] = apply_filters('gravityview/fields/custom/content_before', $field_settings['content']);
$field_settings['content'] = trim(rtrim($field_settings['content']));
// No custom content
if (empty($field_settings['content'])) {
return;
}
// Replace the variables
$content = GravityView_API::replace_variables($field_settings['content'], $form, $entry);
/**
* @filter `gravityview/fields/custom/decode_shortcodes` Decode brackets in shortcodes
* @since 1.16.5
* @param boolean $decode Enable/Disable decoding of brackets in the content (default: false)
* @param string $content HTML content of field
*/
if (apply_filters('gravityview/fields/custom/decode_shortcodes', false, $content)) {
$content = GVCommon::decode_shortcodes($content);
}
// Add paragraphs?
if (!empty($field_settings['wpautop'])) {
$content = wpautop($content);
}
/**
* @filter `gravityview/fields/custom/content_after` Modify Custom Content field output after Merge Tag variables get replaced, before shortcodes get processed
* @since 1.6.2
* @param string $content HTML content of field
*/
$content = apply_filters('gravityview/fields/custom/content_after', $content);
// Enqueue scripts needed for Gravity Form display, if form shortcode exists.
// Also runs `do_shortcode()`
echo GFCommon::gform_do_shortcode($content);