示例#1
0
 /**
  * @since 2.0.8
  */
 private static function get_other_shortcode_values($args)
 {
     $atts = shortcode_parse_atts(stripslashes($args['matches'][3][$args['match_key']]));
     if (isset($atts['return_array'])) {
         $args['allow_array'] = $atts['return_array'];
     }
     $args['shortcode_atts'] = $atts;
     switch ($args['shortcode']) {
         case 'user_meta':
             if (isset($atts['key'])) {
                 $new_value = FrmProAppHelper::get_current_user_value($atts['key'], false);
             }
             break;
         case 'post_meta':
             if (isset($atts['key'])) {
                 $new_value = FrmProAppHelper::get_current_post_value($atts['key']);
             }
             break;
         case 'get':
             $new_value = self::do_get_shortcode($args);
             break;
         case 'auto_id':
             $new_value = self::do_auto_id_shortcode($args);
             break;
         case 'server':
             if (isset($atts['param'])) {
                 $new_value = FrmAppHelper::get_server_value($atts['param']);
             }
             break;
         case 'date':
             $new_value = FrmProAppHelper::get_date(isset($atts['format']) ? $atts['format'] : '');
             break;
         case 'time':
             $new_value = FrmProAppHelper::get_time($atts);
             break;
         default:
             $new_value = self::check_posted_item_meta($args['matches'][0][$args['match_key']], $args['shortcode'], $atts, $args['allow_array']);
             break;
     }
     return $new_value;
 }