https://github.com/truongwp/gallery-meta-box
Simple gallery meta box for WordPress
https://github.com/truongwp/gallery-meta-box
gallery gallery-plugin meta-box wordpress wordpress-plugin
Last synced: 7 months ago
JSON representation
Simple gallery meta box for WordPress
- Host: GitHub
- URL: https://github.com/truongwp/gallery-meta-box
- Owner: truongwp
- Created: 2017-07-02T05:41:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T04:22:12.000Z (almost 8 years ago)
- Last Synced: 2025-02-25T00:38:39.205Z (8 months ago)
- Topics: gallery, gallery-plugin, meta-box, wordpress, wordpress-plugin
- Language: PHP
- Size: 6.84 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Gallery Meta Box
This is a library for including in plugin, not a WordPress plugin.
### How to use
If you use composer, run `composer require truongwp/gallery-meta-box`.
Or you can include file `gallery-meta-box.php`.
### Hooks reference
```php
/**
* Fires after saving gallery data.
*
* @var int $post_id Post ID.
* @var WP_Post $post Post object.
* @var bool $update Whether this is an existing post being updated or not.
*/
do_action( 'gallery_meta_box_save', $post_id, $post, $update );
``````php
/**
* Filters supported post types.
*
* @var array $post_types List supported post types.
*/
apply_filters( 'gallery_meta_box_post_types', $post_types );
``````php
/**
* Filters meta key to store the gallery.
*
* @var string $meta_key Meta key.
*/
apply_filters( 'gallery_meta_box_meta_key', $meta_key );
```