Skip to content

Commit

Permalink
Merge pull request #4 from ramphor/release/v1.5
Browse files Browse the repository at this point in the history
Update readme and change version
  • Loading branch information
puleeno authored Sep 15, 2020
2 parents 8a1072f + 5f8a840 commit c771bde
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/SECURITY.md export-ignore
/config.rb export-ignore
47 changes: 46 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# wallery
Ramphor Wallary
=

WordPress gallery for meta box and frontend post

# Installing

```
composer require ramphor/wallery
```

# Setup

## Use Wallery classes

```
<?php
use Ramphor\Wallery\Wallery;
use Ramphor\Wallery\Factory\MetaboxFactory;
````
## Create metabox
```
<?php
if ( class_exists( Wallery::class ) ) {
$wallaryFactory = new MetaboxFactory();
$walleryInstance = new Wallery( $wallaryFactory );
$walleryInstance->setId( 'the_key_name_to_store_gallary_to_database' );
}
```

## Render wallery metabox

```
<?php
add_action('add_meta_boxes', 'wallery_register_metabox');
function wallery_register_metabox() {
add_meta_box(
'metabox_id',
( 'Metabox Wallery Title', 'cominovel' ),
array( $walleryInstance, 'render' ),
'chapter'
);
}
```
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ramphor/wallery",
"description": "WordPress gallery for meta box and frontend post",
"version": "1.0.5",
"version": "1.5.0",
"type": "library",
"license": "MIT",
"authors": [
Expand Down

0 comments on commit c771bde

Please sign in to comment.