// SYSTEM PANEL //
[ROOT]
/
home
/
salvufkx
/
homedir
/
public_html
/
wp-content
/
plugins
/
gallery-images-ape
/
libs
/
fields
/
gallery
[ PARENT ]
EDIT :: wpape-gallery-manage.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 */ define( 'WPAPE_GALLERY_MANAGE_URL', plugin_dir_url( __FILE__ ) ); function wpape_gallery_manage_field( $field, $meta ) { wp_enqueue_script( 'wpape_gallery_manage_init', WPAPE_GALLERY_MANAGE_URL.'js/script.js', array( 'jquery' ), null ); wp_enqueue_style( 'wpape_gallery_manage_style', WPAPE_GALLERY_MANAGE_URL.'css/style.css', array(), '', 'all' ); if ( empty( $meta ) || $meta == ' ' || $meta == '' || !is_array($meta) ) $meta = ' '; else $meta = implode( ',', $meta ); echo '<div class="wpape-gallery-manage wpape_block ">'; echo ' <input type="hidden" class="wpape-gallery-manage-value" id="' . $field->args( 'id' ) . '" name="' . $field->args( 'id' ) . '" value="' . $meta . '" />'; echo ' <button class="btn btn-success btn-lg "><span class="glyphicon glyphicon glyphicon-th" aria-hidden="true"></span> ' . __( 'Gallery Resources', 'wpape_gallery' ) . ' </button>'; echo '</div>'; echo '<p class="cmb2-metabox-description">'.__('Open gallery resources by click on Images button. Upload and configure gallery images here.', 'wpape_gallery' ) . '</p>'; } add_filter( 'cmb2_render_wpape_gallery_manage', 'wpape_gallery_manage_field', 10, 2 ); function wpape_gallery_manage_field_sanitise( $meta_value, $field ) { if ( empty( $meta_value ) ) { $meta_value = ''; } else { $meta_value = explode( ',', $meta_value ); } return $meta_value; }
SAVE
CANCEL