Plugin Directory

Changeset 1486755


Ignore:
Timestamp:
08/30/2016 10:01:53 PM (10 years ago)
Author:
zubaka
Message:

Added zbp_native_mobile key in player admin section

Location:
zbplayer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • zbplayer/trunk/templates/zbPlayer.admin.tpl

    r1338500 r1486755  
    4343                  <td>
    4444                    <input type="text" name="zbp_initialvolume" id="zbp_initialvolume" value="<?php echo get_option('zbp_initialvolume'); ?>" size="3" maxlength="3"/>
    45                     <br />
    4645                    <span call="explanatory-text">Set here default value for volume of sound.</span>
    4746                  </td>
     
    108107                  <td>
    109108                    <input type="text" name="zbp_width" id="zbp_width" value="<?php echo get_option('zbp_width'); ?>" size="5" maxlength="5"/>
    110                     <br />
    111109                    <span call="explanatory-text">Full width of player</span>
     110                  </td>
     111                </tr>
     112                <tr valign="top" id="zbp_native_mobile">
     113                <th scope="row">Native mobile player</th>
     114                  <td>
     115                    <input type="checkbox" name="zbp_native_mobile" id="zbp_native_mobile" <?php if (get_option('zbp_native_mobile') == 'true') echo "checked";?>/>
     116                    <label for="zbp_native_mobile">Always show native (HTML5) player on mobile devices</label>
    112117                  </td>
    113118                </tr>
     
    163168
    164169
    165     <div style="width:34%; float:right;" class="postbox-container">
     170    <div class="postbox-container zbPlayerRightBox">
    166171      <div class="postbox" style="min-width:200px; padding-bottom: 0px;">
    167172        <h3 class="hndle ui-sortable-handle"><?php _e('Our ads', 'zbplayer'); ?></h3>
     
    182187    </div>
    183188
    184     <div style="width:34%; float:right;">
     189    <div class="zbPlayerRightBox">
    185190      <div class="postbox" style="min-width:200px; padding-bottom: 0px;">
    186191        <h3 class="hndle ui-sortable-handle"><?php _e('Help us', 'zbplayer'); ?></h3>
  • zbplayer/trunk/zbPlayer.admin.php

    r1485222 r1486755  
    180180            'zbp_initialvolume',
    181181            isset($_POST['zbp_initialvolume']) ? intval($_POST['zbp_initialvolume']) : ZBPLAYER_DEFAULT_INITIALVOLUME
     182        );
     183
     184        update_option(
     185            'zbp_native_mobile',
     186            isset($_POST['zbp_native_mobile']) ? 'true' : 'false'
    182187        );
    183188
  • zbplayer/trunk/zbPlayer.php

    r1338499 r1486755  
    1414define('ZBPLAYER_DEFAULT_INITIALVOLUME', "60");
    1515define('ZBPLAYER_DEFAULT_SHOW_NAME', "Y");
     16define('ZBPLAYER_DEFAULT_NATIVE_MOBILE', 'false');
    1617define('ZBPLAYER_DEFAULT_ANIMATION', 'true');
    1718define('ZBPLAYER_DEFAULT_COLLECT_FIELD', "[zbplayer]");
     
    5556    if (get_option('zbp_collect_field') == '') {
    5657        update_option('zbp_collect_field', ZBPLAYER_DEFAULT_COLLECT_FIELD);
     58    }
     59    if (get_option('zbp_native_mobile') == '') {
     60        update_option('zbp_native_mobile', ZBPLAYER_DEFAULT_NATIVE_MOBILE);
    5761    }
    5862    if (get_option('zbp_share') == '') {
Note: See TracChangeset for help on using the changeset viewer.