-
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.
nextwp-toolkit plugin: add logo / add headless templates creator / or…
…ganize functions / cleanup
- Loading branch information
1 parent
a6936f6
commit 7bb18e3
Showing
8 changed files
with
286 additions
and
107 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
wordpress/plugins/nextwp-toolkit/acf/acf-prepare-revision.php
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,9 @@ | ||
<?php | ||
// Includes the ACF fields in the REST API response for post revisions | ||
add_filter( 'rest_prepare_revision', function( $response, $post ) { | ||
$data = $response->get_data(); | ||
|
||
$data['acf'] = get_fields( $post->ID ); | ||
|
||
return rest_ensure_response( $data ); | ||
}, 10, 2 ); |
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,11 @@ | ||
<?php | ||
|
||
function nextwp_acf_google_map_api( $api ){ | ||
$apiKey = get_field('nextwp_google_maps_api_key', 'options'); | ||
if ($apiKey) { | ||
$api['key'] = $apiKey; | ||
} | ||
return $api; | ||
} | ||
add_filter('acf/fields/google_map/api', 'nextwp_acf_google_map_api'); | ||
|
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.
7bb18e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nextwp-starter – ./apps/next-wordpress-starter
nextwp-starter.vercel.app
nextwp-starter-git-main-calebbarnes.vercel.app
nextwp-starter-calebbarnes.vercel.app