// SYSTEM PANEL //
[ROOT]
/
home
/
salvufkx
/
homedir
/
public_html
/
wp-content
/
plugins
/
gallery-images-ape
/
libs
/
fields
[ PARENT ]
EDIT :: multisize.php
<?php /* * Ape Gallery http://wpape.net * Version: 1.2.4 - 61253 * Author: Wp Ape (c) * Author URI: http://wpape.net * License: GPL-2.0+ * License URI: http://www.gnu.org/licenses/gpl-2.0.txt * Date: Thu, 08 Dec 2016 16:31:35 GMT */ function wpape_multisize_field( $metakey, $post_id = 0 ) { echo wpape_get_multisize_field( $metakey, $post_id ); } function wpape_multisize_field_callback( $field, $value, $object_id, $object_type, $field_type_object ) { $default = $field->args('default'); if(!is_array($default)) $default = array(); if(!isset($default['width'])) $default['width'] = '100'; if(!isset($default['widthType'])) $default['widthType'] = ''; $value = wp_parse_args( $value, array( 'width' => $default['width'], 'widthType' => $default['widthType'], )); ?> <div class="form-horizontal"> <div class="form-group"> <label class="col-xs-4 col-sm-2 control-label" for="<?php echo $field_type_object->_id(); ?>"><?php echo esc_html( $field->args('name') ); ?></label> <div class="col-xs-3 col-sm-2"> <?php echo $field_type_object->input( array( 'name' => $field_type_object->_name('[width]' ), 'id' => $field_type_object->_id('[width]' ), 'value' => $value['width'], 'class' => 'form-control '.$field->args('class') , )); ?> </div> <div class="col-xs-3 col-sm-2"> <?php echo '<input type="checkbox" data-toggle="toggle" data-on="px" data-off="%" data-onstyle="primary" data-offstyle="success" ' .'name="'.$field_type_object->_name( '[widthType]' ).'" ' .'id="'. $field_type_object->_id( 'widthType' ).'" ' .( $value['widthType']==1 ?' checked ':'') .'value="1" ' .'>'; ?> </div> </div> </div> <?php echo $field_type_object->_desc( true ); } add_filter( 'cmb2_render_multisize', 'wpape_multisize_field_callback', 10, 5 );
SAVE
CANCEL