Last active
June 14, 2022 16:47
-
-
Save dboutote/2f6cd014f8df60018abc3f3aedea934a to your computer and use it in GitHub Desktop.
Revisions
-
dboutote revised this gist
Sep 22, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ <?php add_action( 'rest_endpoints', function( $endpoints ){ if( isset( $endpoints[ '/wp/v2/posts' ] ) ){ foreach( $endpoints[ '/wp/v2/posts' ] as &$post_endpoint ){ -
dboutote revised this gist
Sep 22, 2017 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ add_action( 'rest_endpoints', function( $endpoints ){ if( isset( $endpoints[ '/wp/v2/posts' ] ) ){ foreach( $endpoints[ '/wp/v2/posts' ] as &$post_endpoint ){ if( ! empty( $post_endpoint[ 'methods' ] ) && 'GET' == $post_endpoint[ 'methods' ] ){ $post_endpoint[ 'args' ][ 'type' ] = array( 'description' => 'Post types', 'type' => 'array', 'required' => false, 'default' => 'post' ); } } } return $endpoints; }, 15 ); -
dboutote revised this gist
Sep 22, 2017 . 1 changed file with 12 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ add_action( 'rest_endpoints', function( $endpoints ){ if( isset( $endpoints[ '/wp/v2/posts' ] ) ){ foreach( $endpoints[ '/wp/v2/posts' ] as &$post_endpoint ){ if( ! empty( $post_endpoint[ 'methods' ] ) && 'GET' == $post_endpoint[ 'methods' ] ){ $post_endpoint[ 'args' ][ 'type' ] = array( 'description' => 'Post types', 'type' => 'array', 'required' => false, 'default' => 'post' ); } } } return $endpoints; }, 15 ); -
dboutote revised this gist
Sep 22, 2017 . 1 changed file with 13 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ add_action( 'rest_endpoints', function( $endpoints ){ if( isset( $endpoints[ '/wp/v2/posts' ] ) ){ foreach( $endpoints[ '/wp/v2/posts' ] as &$post_endpoint ){ if( ! empty( $post_endpoint[ 'methods' ] ) && 'GET' == $post_endpoint[ 'methods' ] ){ $post_endpoint[ 'args' ][ 'type' ] = array( 'description' => 'Post types', 'type' => 'array', 'required' => false, 'default' => 'post' ); } } } return $endpoints; }, 15 ); -
dboutote created this gist
Sep 22, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ add_action( 'rest_endpoints', function( $endpoints ){ if( isset( $endpoints[ '/wp/v2/posts' ] ) ){ foreach( $endpoints[ '/wp/v2/posts' ] as &$post_endpoint ){ if( ! empty( $post_endpoint[ 'methods' ] ) && 'GET' == $post_endpoint[ 'methods' ] ){ $post_endpoint[ 'args' ][ 'type' ] = array( 'description' => 'Post types', 'type' => 'array', 'required' => false, 'default' => 'post' ); } } } return $endpoints; }, 15 );