<?php
/**
 * Tattoopress albums
 *
 * @package WordPress
 * @subpackage Tattoopress
 * @version 3.3.4
 */

defined( 'ABSPATH' ) || exit;

/**
 * Set gallery mods
 *
 * @param array $mods Array of mods.
 * @return array
 */
function tattoopress_set_gallery_mods( $mods ) {

	if ( class_exists( 'Wolf_Albums' ) ) {
		$mods['wolf_albums'] = array(
			'priority' => 45,
			'id'       => 'wolf_albums',
			'title'    => esc_html__( 'Albums', 'tattoopress' ),
			'icon'     => 'images-alt2',
			'options'  => array(

				'gallery_layout'       => array(
					'id'        => 'gallery_layout',
					'label'     => esc_html__( 'Layout', 'tattoopress' ),
					'type'      => 'select',
					'choices'   => array(
						'standard'  => esc_html__( 'Standard', 'tattoopress' ),
						'fullwidth' => esc_html__( 'Full width', 'tattoopress' ),
					),
					'transport' => 'postMessage',
				),

				'gallery_display'      => array(
					'id'      => 'gallery_display',
					'label'   => esc_html__( 'Albums Display', 'tattoopress' ),
					'type'    => 'select',
					'choices' => apply_filters(
						'tattoopress_gallery_display_options',
						array(
							'grid' => esc_html__( 'Grid', 'tattoopress' ),
						)
					),
				),

				'gallery_grid_padding' => array(
					'id'        => 'gallery_grid_padding',
					'label'     => esc_html__( 'Padding', 'tattoopress' ),
					'type'      => 'select',
					'choices'   => array(
						'yes' => esc_html__( 'Yes', 'tattoopress' ),
						'no'  => esc_html__( 'No', 'tattoopress' ),
					),
					'transport' => 'postMessage',
				),

				'gallery_pagination'   => array(
					'id'          => 'gallery_pagination',
					'label'       => esc_html__( 'Albums Archive Pagination', 'tattoopress' ),
					'type'        => 'select',
					'choices'     => array(
						'none'                => esc_html__( 'None', 'tattoopress' ),
						'standard_pagination' => esc_html__( 'Numeric Pagination', 'tattoopress' ),
						'load_more'           => esc_html__( 'Load More Button', 'tattoopress' ),
					),
					'description' => esc_html__( 'You must set a number of posts per page below. The category filter will not be disabled.', 'tattoopress' ),
				),

				'gallerys_per_page'    => array(
					'label'       => esc_html__( 'Albums per Page', 'tattoopress' ),
					'id'          => 'gallerys_per_page',
					'type'        => 'text',
					'placeholder' => 6,
				),
			),
		);
	}

	return $mods;
}
add_filter( 'tattoopress_customizer_mods', 'tattoopress_set_gallery_mods' );
