-
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.
ACF, and API endpoints that were in Axe
- Loading branch information
1 parent
dd76eae
commit 00f16c6
Showing
6 changed files
with
52 additions
and
10 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,6 @@ | ||
/_design/ | ||
/.idea | ||
.sass-cache | ||
/vendor | ||
/assets/vendor | ||
/node_modules |
Empty file.
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,5 @@ | ||
{ | ||
"require": { | ||
|
||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
namespace Axe; | ||
|
||
class AxeAPI | ||
{ | ||
|
||
public function __construct() | ||
{ | ||
// http://v2.wp-api.org/extending/adding/ | ||
add_action('rest_api_init', function () { | ||
register_rest_route('axe', '/sample', array( | ||
'methods' => 'GET', | ||
'callback' => array( | ||
$this, | ||
'sampleEndPoint' | ||
), | ||
)); | ||
}); | ||
} | ||
|
||
public function sampleEndPoint() | ||
{ | ||
return ['one', 'two']; | ||
} | ||
} | ||
|
||
new AxeAPI; |