本文整理汇总了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);