-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ramphor/release/v1.5
Update readme and change version
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/SECURITY.md export-ignore | ||
/config.rb export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters