-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
127 additions
and
13 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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
display: flex; | ||
flex-flow: column; | ||
gap: var(--wpifycf-gap-2); | ||
user-select: none; | ||
} | ||
|
||
&__item { | ||
|
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1 @@ | ||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => '55d8d4d53b65263e901a'); | ||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => '982933421b6e7c4cb5ad'); |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,50 @@ | ||
# Comments Metabox | ||
|
||
Comments metabox integrates custom fields into comment edit screen: | ||
|
||
Example URL: `/wp-admin/comment.php?action=editcomment&c=1` | ||
|
||
## Preview | ||
|
||
![Integration of custom fields into comment metabox.](../images/integration-comment.png) | ||
|
||
## Example | ||
|
||
```php | ||
wpify_custom_fields()->create_comment_metabox( | ||
array( | ||
'id' => 'example_comment_metabox', | ||
'title' => 'Example Comment Metabox', | ||
'items' => array( /* fields definitions */ ), | ||
/* other arguments */ | ||
), | ||
); | ||
``` | ||
|
||
## Arguments | ||
|
||
#### `$id` *string* | ||
|
||
Meta box ID (used in the 'id' attribute for the meta box). | ||
|
||
#### `$title` *string* | ||
|
||
Title of the meta box. | ||
|
||
#### `$callback_args` *array* | ||
|
||
Data that should be set as the `$args` property of the box array (which is the second parameter passed to your | ||
callback). | ||
|
||
#### `$meta_key` *string* | ||
|
||
Meta key used to store the custom fields values. If meta key is empty, the individual fields will be stored as separate | ||
meta. | ||
|
||
#### `$tabs` *array* | ||
|
||
Tabs used for the custom fields. | ||
|
||
#### `$items` *array* | ||
|
||
List of the fields to be shown. |
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,46 @@ | ||
# Metabox | ||
|
||
## Example | ||
|
||
```php | ||
wpify_custom_fields()->create_metabox( | ||
array( | ||
'id' => 'example_metabox', | ||
'title' => 'Example Metabox', | ||
'items' => array( /* fields definitions */ ), | ||
/* other arguments */ | ||
), | ||
); | ||
``` | ||
|
||
## Arguments | ||
|
||
#### `$id` *string* | ||
|
||
Meta box ID (used in the 'id' attribute for the meta box). | ||
|
||
#### `$title` *string* | ||
|
||
Title of the meta box. | ||
|
||
#### `$priority` *string* | ||
|
||
The priority within the context where the box should show. | ||
You can use constants: | ||
|
||
```php | ||
\Wpify\CustomFields\Integrations\Comment::PRIORITY_HIGH = 'high' | ||
\Wpify\CustomFields\Integrations\Comment::PRIORITY_CORE = 'core' | ||
\Wpify\CustomFields\Integrations\Comment::PRIORITY_LOW = 'low' | ||
\Wpify\CustomFields\Integrations\Comment::PRIORITY_DEFAULT = 'default' | ||
``` | ||
|
||
#### `$callback_args` *array* | ||
|
||
Data that should be set as the `$args` property of the box array (which is the second parameter passed to your | ||
callback). | ||
|
||
#### `$meta_key` *string* | ||
|
||
Meta key used to store the custom fields values. If meta key is empty, the individual fields will be stored as separate | ||
meta. |
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