inc2734/wp-pure-css-gallery

A library to change WordPress gallery to pure css gallery.

3.0.0 2020-07-17 06:40 UTC

This package is auto-updated.

Last update: 2020-11-17 07:35:43 UTC


README

Build Status Latest Stable Version License

Install

$ composer require inc2734/wp-pure-css-gallery

How to use

<?php
new Inc2734\WP_Pure_CSS_Gallery\Bootstrap();

Shortcode

/**
 * @param ids      Attachment IDs
 * @param link
 *   @var file     Lightbox
 *   @var none     No link
 *   @var (blank)  Attachment page
 * @param size     Thubmnail Size
 * @param columns  Column size
 * @param order    ASC or DESC
 * @param orderby
 */

[gallery ids="1,2,3" columns="3"]

Filter hooks

inc2734_wp_pure_css_gallery_close_label

/**
 * Customize close label
 *
 * @param string $label
 * @return string
 */
add_filter(
	'inc2734_wp_pure_css_gallery_close_label',
	function( $label ) {
		return $label;
	}
);

inc2734_wp_pure_css_gallery_prev_label

/**
 * Customize prev label
 *
 * @param string $label
 * @return string
 */
add_filter(
	'inc2734_wp_pure_css_gallery_prev_label',
	function( $label ) {
		return $label;
	}
);

inc2734_wp_pure_css_gallery_next_label

/**
 * Customize next label
 *
 * @param string $label
 * @return string
 */
add_filter(
	'inc2734_wp_pure_css_gallery_next_label',
	function( $label ) {
		return $label;
	}
);