本文整理汇总了PHP中FrmFieldsHelper::get_shortcodes方法的典型用法代码示例。如果您正苦于以下问题:PHP FrmFieldsHelper::get_shortcodes方法的具体用法?PHP FrmFieldsHelper::get_shortcodes怎么用?PHP FrmFieldsHelper::get_shortcodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrmFieldsHelper
的用法示例。
在下文中一共展示了FrmFieldsHelper::get_shortcodes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_description
/**
* Get description
*
* @see Pronamic_Pay_PaymentDataInterface::get_description()
* @return string
*/
public function get_description()
{
// Description template
$description_template = $this->action->post_content['pronamic_pay_transaction_description'];
// Find shortcode
// @see https://github.com/wp-premium/formidable/blob/2.0.22/classes/helpers/FrmFieldsHelper.php#L684-L696
$shortcodes = FrmFieldsHelper::get_shortcodes($description_template, $this->form_id);
// Replace shortcodes
// @see https://github.com/wp-premium/formidable/blob/2.0.22/classes/helpers/FrmFieldsHelper.php#L715-L821
$description = FrmFieldsHelper::replace_content_shortcodes($description_template, $this->entry, $shortcodes);
// Check if there was a replacement to make sure the description has a dynamic part
if ($description_template === $description) {
$description .= $this->entry_id;
}
return $description;
}
示例2: filter_content
public static function filter_content($content, $form, $entry = false)
{
self::get_entry_by_param($entry);
if (!$entry) {
return $content;
}
if (is_object($form)) {
$form = $form->id;
}
$shortcodes = FrmFieldsHelper::get_shortcodes($content, $form);
$content = apply_filters('frm_replace_content_shortcodes', $content, $entry, $shortcodes);
return $content;
}
示例3: get_shortcodes
public static function get_shortcodes($content, $form_id)
{
_deprecated_function(__FUNCTION__, '2.0', 'FrmFieldsHelper::get_shortcodes');
return FrmFieldsHelper::get_shortcodes($content, $form_id);
}