当前位置: 首页>>代码示例>>PHP>>正文


PHP Browser::isHTML5方法代码示例

本文整理汇总了PHP中Browser::isHTML5方法的典型用法代码示例。如果您正苦于以下问题:PHP Browser::isHTML5方法的具体用法?PHP Browser::isHTML5怎么用?PHP Browser::isHTML5使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Browser的用法示例。


在下文中一共展示了Browser::isHTML5方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wp_media_upload_button

 public static function wp_media_upload_button($data = array())
 {
     $default = array('name' => 'front_media_uploader', 'class' => 'listing-images-uploads', 'value' => __('Upload', 'framework'), 'thumbnail_container' => 'photoList');
     $data = $default + $data;
     $data_button = '';
     if (is_user_logged_in()) {
         if (Browser::isHTML5() && self::check_file_input_method() == 0) {
             $data_button .= '<input class="listing-images-uploads" type="file" name="images[]" id="photoimg" multiple accept="image/*" />';
         } else {
             $data_button .= '<div class="' . $data['class'] . '">';
             $data_button .= '<input id="cbafu_button" data-container="' . $data['thumbnail_container'] . '" ';
             $data_button .= ' class="' . $data['class'] . '"';
             $data_button .= ' name="' . $data['name'] . '" type="button" value="' . $data['value'] . '" /></div>';
         }
     } else {
         $data_button .= '<input type="file" name="images[]" disabled="disabled" multiple accept="image/*" />';
     }
     echo $data_button;
 }
开发者ID:zruiz,项目名称:NG,代码行数:19,代码来源:wp_media_custom.php

示例2: elseif

     $step = 2;
 } elseif ($steps == "listing-add-form-three") {
     $step = 3;
 } elseif ($steps == "listing-add-form-four") {
     $step = 4;
 } elseif ($steps == "listing-add-form-five") {
     $step = 5;
 }
 $already_step = get_post_meta($pid, 'imic_plugin_ads_steps', true);
 if ($already_step < $step) {
     //update_post_meta($pid,'imic_plugin_ads_steps',$step);
 }
 $i = 1;
 ////////// check input method and browser //////////////
 $files = array();
 if (Browser::isHTML5() && FRONT_MEDIA_ALLOW::check_file_input_method() == 0) {
     $files = isset($_FILES['images']) ? $_FILES['images'] : '';
 } else {
     $list_photo = $_REQUEST['listing_photos'];
     foreach ($list_photo as $photo) {
         if (!in_array($photo, $attached_images)) {
             if ($i == 1) {
                 update_post_meta($pid, '_thumbnail_id', $photo);
             }
             add_post_meta($pid, 'imic_plugin_vehicle_images', $photo, false);
         }
         $i++;
     }
 }
 /////////////////////////
 if (!empty($files)) {
开发者ID:zruiz,项目名称:NG,代码行数:31,代码来源:template-image-by-ajax-back.php


注:本文中的Browser::isHTML5方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。