Skip to content

Commit

Permalink
load gforms from pronamic github mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebBarnes committed Jan 9, 2024
1 parent 98dd743 commit 7d3b055
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

add_action( 'tgmpa_register', 'nextwp_headless_theme_register_required_plugins' );
add_action('tgmpa_register', 'nextwp_headless_theme_register_required_plugins');

/**
* Register the required plugins for this theme.
Expand All @@ -19,66 +19,52 @@
*
* This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10.
*/
function nextwp_headless_theme_register_required_plugins() {
function nextwp_headless_theme_register_required_plugins()
{
/*
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$plugins = array(
// array(
// 'name' => 'NextWP - Headless Toolkit',
// 'slug' => 'nextwp-toolkit',
// 'source' => 'https://github.com/CalebBarnes/nextwp/@nextwp/wp-plugin/archive/main.zip',
// 'required' => true
// ),

array(
'name' => 'Custom Templates Creator',
'slug' => 'custom-templates-creator',
'source' => 'https://github.com/CalebBarnes/custom-templates-creator/archive/main.zip',
'required' => false
'name' => 'NextWP - Headless Toolkit',
'slug' => 'nextwp-toolkit',
'source' => 'https://www.nextwp.org/api/download/nextwp-toolkit',
'required' => true
),

array(
'name' => 'Advanced Custom Fields Pro',
'slug' => 'advanced-custom-fields-pro',
'source' => 'https://github.com/pronamic/advanced-custom-fields-pro/archive/main.zip',
'required' => false
'required' => false
),

array(
'name' => 'JAMstack Deployments',
'slug' => 'wp-jamstack-deployments',
'required' => false
'required' => false
),
array(
'name' => 'Next.js On-Demand Revalidation',
'slug' => 'on-demand-revalidation',
'required' => false
'required' => false
),
array(
'name' => 'Classic Editor',
'slug' => 'classic-editor',
'required' => false
'required' => false
),

// This is an example of the use of 'is_callable' functionality. A user could - for instance -
// have WPSEO installed *or* WPSEO Premium. The slug would in that last case be different, i.e.
// 'wordpress-seo-premium'.
// By setting 'is_callable' to either a function from that plugin or a class method
// `array( 'class', 'method' )` similar to how you hook in to actions and filters, TGMPA can still
// recognize the plugin as being installed.
array(
'name' => 'Gravity Forms',
'slug' => 'gravityforms',
'source' => get_template_directory() . '/lib/plugins/gravityforms_2.7.17.1.zip',
'is_callable' => 'gform_loaded',
'required' => false
'source' => 'https://github.com/pronamic/gravityforms/archive/main.zip',
'required' => false
),
array(
'name' => 'Yoast SEO',
'slug' => 'wordpress-seo',
'is_callable' => 'wpseo_init',
'is_callable' => 'wpseo_init', // using is_callable here allows us to use the Pro version or Free version
'required' => false
),
);
Expand All @@ -105,5 +91,5 @@ function nextwp_headless_theme_register_required_plugins() {
'message' => '', // Message to output right before the plugins table.
);

tgmpa( $plugins, $config );
tgmpa($plugins, $config);
}
Binary file not shown.

1 comment on commit 7d3b055

@vercel
Copy link

@vercel vercel bot commented on 7d3b055 Jan 9, 2024

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-git-main-calebbarnes.vercel.app
nextwp-starter-calebbarnes.vercel.app
nextwp-starter.vercel.app

Please sign in to comment.