'{slug}', 'name' => __( '{name}', '{plugin_slug}'), 'preview_support' => true, 'preview_css' => {constant}_URL . 'css/gallery-{slug}.css', 'admin_js' => {constant}_URL . 'js/admin-gallery-{slug}.js', 'fields' => array( array( 'id' => 'thumbnail_dimensions', 'title' => __('Thumbnail Size', '{plugin_slug}'), 'desc' => __('Choose the size of your thumbs.', '{plugin_slug}'), 'type' => 'thumb_size', 'default' => array( 'width' => get_option( 'thumbnail_size_w' ), 'height' => get_option( 'thumbnail_size_h' ), 'crop' => true ) ), array( 'id' => 'thumbnail_link', 'title' => __('Thumbnail Link', '{plugin_slug}'), 'default' => 'image' , 'type' => 'thumb_link', 'spacer' => '', 'desc' => __('You can choose to either link each thumbnail to the full size image or to the image\'s attachment page.', '{plugin_slug}') ), array( 'id' => 'lightbox', 'title' => __('Lightbox', '{plugin_slug}'), 'desc' => __('Choose which lightbox you want to use in the gallery.', '{plugin_slug}'), 'type' => 'lightbox' ), array( 'id' => 'alignment', 'title' => __('Gallery Alignment', '{plugin_slug}'), 'desc' => __('The horizontal alignment of the thumbnails inside the gallery.', '{plugin_slug}'), 'default' => 'alignment-center', 'type' => 'select', 'choices' => array( 'alignment-left' => __( 'Left', '{plugin_slug}' ), 'alignment-center' => __( 'Center', '{plugin_slug}' ), 'alignment-right' => __( 'Right', '{plugin_slug}' ) ) ) //available field types available : html, checkbox, select, radio, textarea, text, checkboxlist, icon //an example of a icon field used in the default gallery template //array( // 'id' => 'border-style', // 'title' => __('Border Style', '{plugin_slug}'), // 'desc' => __('The border style for each thumbnail in the gallery.', '{plugin_slug}'), // 'type' => 'icon', // 'default' => 'border-style-square-white', // 'choices' => array( // 'border-style-square-white' => array('label' => 'Square white border with shadow', 'img' => {constant}_URL . 'assets/border-style-icon-square-white.png'), // 'border-style-circle-white' => array('label' => 'Circular white border with shadow', 'img' => {constant}_URL . 'assets/border-style-icon-circle-white.png'), // 'border-style-square-black' => array('label' => 'Square Black', 'img' => {constant}_URL . 'assets/border-style-icon-square-black.png'), // 'border-style-circle-black' => array('label' => 'Circular Black', 'img' => {constant}_URL . 'assets/border-style-icon-circle-black.png'), // 'border-style-inset' => array('label' => 'Square Inset', 'img' => {constant}_URL . 'assets/border-style-icon-square-inset.png'), // 'border-style-rounded' => array('label' => 'Plain Rounded', 'img' => {constant}_URL . 'assets/border-style-icon-plain-rounded.png'), // '' => array('label' => 'Plain', 'img' => {constant}_URL . 'assets/border-style-icon-none.png'), // ) //), ) ); return $gallery_templates; } /** * Build up the arguments needed for rendering the gallery template * * @param $args * @return array */ function build_gallery_template_arguments( $args ) { $args = foogallery_gallery_template_setting( 'thumbnail_dimensions', array() ); $args['crop'] = '1'; //we now force thumbs to be cropped $args['link'] = foogallery_gallery_template_setting( 'thumbnail_link', 'image' ); return $args; } } } new {package}();