當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FrmFieldsHelper::replace_content_shortcodes方法代碼示例

本文整理匯總了PHP中FrmFieldsHelper::replace_content_shortcodes方法的典型用法代碼示例。如果您正苦於以下問題:PHP FrmFieldsHelper::replace_content_shortcodes方法的具體用法?PHP FrmFieldsHelper::replace_content_shortcodes怎麽用?PHP FrmFieldsHelper::replace_content_shortcodes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FrmFieldsHelper的用法示例。


在下文中一共展示了FrmFieldsHelper::replace_content_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;
 }
開發者ID:wp-pay-extensions,項目名稱:formidable-forms,代碼行數:22,代碼來源:PaymentData.php

示例2: replace_content_shortcodes

 public static function replace_content_shortcodes($content, $entry, $shortcodes)
 {
     return FrmFieldsHelper::replace_content_shortcodes($content, $entry, $shortcodes);
 }
開發者ID:swc-dng,項目名稱:swcsandbox,代碼行數:4,代碼來源:FrmFormsController.php

示例3: replace_shortcodes

 public static function replace_shortcodes($content, $entry, $shortcodes, $display = false, $show = 'one', $odd = '', $args = array())
 {
     global $post;
     if ($display) {
         $param_value = $display->frm_type == 'id' ? $entry->id : $entry->item_key;
         if ($entry->post_id) {
             $args['detail_link'] = get_permalink($entry->post_id);
         } else {
             $param = isset($display->frm_param) && !empty($display->frm_param) ? $display->frm_param : 'entry';
             if ($post) {
                 $args['detail_link'] = esc_url_raw(add_query_arg($param, $param_value, get_permalink($post->ID)));
             } else {
                 $args['detail_link'] = esc_url_raw(add_query_arg($param, $param_value));
             }
             //if( FrmProAppHelper::rewriting_on() && $frmpro_settings->permalinks )
             //    $args['detail_link'] = get_permalink($post->ID) .$param_value .'/';
         }
     }
     $args['odd'] = $odd;
     $args['show'] = $show;
     foreach ($shortcodes[0] as $short_key => $tag) {
         self::replace_single_shortcode($shortcodes, $short_key, $tag, $entry, $display, $args, $content);
     }
     if (empty($shortcodes[0])) {
         return $content;
     }
     return FrmFieldsHelper::replace_content_shortcodes($content, $entry, $shortcodes);
 }
開發者ID:swc-dng,項目名稱:swcsandbox,代碼行數:28,代碼來源:FrmProFieldsHelper.php


注:本文中的FrmFieldsHelper::replace_content_shortcodes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。