You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,14 +15,14 @@ WordPress Helpers
15
15
#### Installation
16
16
17
17
Add `layered/wp-helpers` as a require dependency in your `composer.json` file:
18
-
```bash
18
+
```bash
19
19
$ composer require layered/wp-helpers
20
20
```
21
21
22
22
#### Register post type
23
23
24
24
Example of adding a Post Type, create a `CustomPostType` instance with name as first argument:
25
-
```
25
+
```php
26
26
CustomPostType::add('idea', [
27
27
'labels' => [
28
28
'name' => __('Ideas', 'my-theme-or-plugin')
@@ -40,7 +40,7 @@ CustomPostType::add('idea', [
40
40
#### Meta Fields
41
41
42
42
Meta Fields are custom fields that can be easily added to Posts, Terms, Comments and Users. They are registered with default WordPress flow, showing up as columns in list views, editable fields on edit pages, editable fields for Quick/Bulk edit screens and REST Api:
Q adds support for asynchronous actions for WordPress plugins and themes. It has a simple API, only include the file and switch from `do_action()` to `queue_action()`. Processing is handled in background, making requests load qicker. Example:
59
-
```
60
-
// keeps the request hanging until actions is complete
58
+
Q adds support for asynchronous actions in plugins and themes. Simple use, only include the file and switch from `do_action()` to `queue_action()`. Processing is handled in background, making web requests load qicker. Example:
0 commit comments