NovaStream Theme Helper
Plugin for all reusable functionality for the NovaStream theme
by NovaStream · github.com/novastreamca/novastream-theme-helper · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/novastreamca/novastream-theme-helper/archive/refs/heads/main.zipNovaStream Theme Helper contains reusable WordPress behavior shared by NovaStream sites. It is deliberately independent of theme presentation so a fix can be deployed across the fleet by updating one plugin.
Requirements
- WordPress 6.5 or newer
- PHP 8.0 or newer
- ACF Pro for the Site Options page and featured-image crop interface
- ACF Image Aspect Ratio Crop for strict-ratio featured-image cropping
The plugin degrades safely when optional integrations such as ACF, WPForms, Yoast, or WooCommerce are unavailable.
Modules
includes/media/: upload optimization, WebP output, social fallbacks, featured-image cropping, and video URL parsingincludes/admin/: dashboard branding and native admin-menu organizationincludes/content/: shared search, privacy, comment, and registration policyincludes/integrations/: analytics, WPForms, and Yoast integrationincludes/acf/: stable Site Options page registrationincludes/seo/: ACF SEO settings, per-entry overrides, social metadata, and basic JSON-LD structured dataincludes/updates/: updates from public GitHub Releases
The bootstrap delays module loading until after_setup_theme priority 100.
This permits rolling deployments alongside older themes that still declare the
same public functions.
Site-specific ACF fields
The plugin owns the stable Site Options page, while the active theme owns the fields placed on it. A site or child theme can add any fields it needs without changing this plugin.
The preferred workflow is:
- Create a field group in ACF.
- Set its location rule to Options Page is equal to Site Options.
- Save the group into the site's or child theme's
acf-json/directory.
This keeps site-specific schema with the site implementation while the stable
options-page slug remains general-settings.
Fields can also be registered from a theme in PHP:
add_action('acf/init', function () {
if (! function_exists('acf_add_local_field_group')) {
return;
}
acf_add_local_field_group(array(
'key' => 'group_example_site_options',
'title' => 'Example Site Options',
'fields' => array(
array(
'key' => 'field_example_phone',
'label' => 'Contact phone',
'name' => 'contact_phone',
'type' => 'text',
),
),
'location' => array(
array(
array(
'param' => 'options_page',
'operator' => '==',
'value' => 'general-settings',
),
),
),
));
}, 30);
The page definition can be adjusted before registration:
add_filter('novastream_site_options_page_args', function ($args) {
$args['capability'] = 'manage_options';
return $args;
});
Extension API
Site and child themes should customize behavior with hooks rather than copying plugin modules. Important filters include:
novastream_theme_helper_modulesnovastream_site_options_page_argsnovastream_disable_commentsnovastream_redirect_registrationnovastream_google_analytics_codesnovastream_google_analytics_enablednovastream_admin_help_logo_urlnovastream_admin_menu_sectionsnovastream_admin_menu_groupnovastream_admin_menu_ranknovastream_nested_pages_confirmation_redirect_enablednovastream_nested_pages_confirmation_redirect_urlnovastream_featured_image_crop_enablednovastream_featured_image_crop_rationovastream_seo_enablednovastream_seo_metadatanovastream_seo_image_dimensionsnovastream_seo_twitter_cardnovastream_seo_external_json_ld_provider_activenovastream_seo_json_ld_enablednovastream_seo_json_ld_graphnovastream_seo_json_ld_datanovastream_seo_json_ld_organizationnovastream_seo_json_ld_websitenovastream_seo_json_ld_imagenovastream_seo_json_ld_webpage_typenovastream_seo_json_ld_webpagenovastream_seo_json_ld_article_post_typesnovastream_seo_json_ld_article_typenovastream_seo_json_ld_articlenovastream_seo_json_ld_breadcrumb_itemsnovastream_seo_json_ld_logo_urlnovastream_seo_options_page_argsnovastream_seo_field_groups
novastream_site_options_page_registered fires after the ACF page is created.
Standard WordPress, ACF, WPForms, and Yoast hooks used by the modules remain
available as well. See readme.txt and the inline PHPDoc for configuration
constants and lower-level media hooks.
SEO migration compatibility
Theme Helper owns the functionality previously shipped as NovaStream SEO. The following database and extension contracts remain unchanged:
- the
novastream-seo-optionsadmin page slug; - the
seo_locations,seo_title,seo_description,seo_image, anddefault_seo_*field names; - the original ACF field and group keys;
novastream_seo_social_imageandnovastream_seo_image_mime_types.
The standalone novastream-seo plugin should be deactivated after Theme Helper
1.1.0 or newer is active. During a rolling deployment, Theme Helper detects its
legacy novastream_seo() function and does not load a duplicate module.
Theme Helper publishes a server-rendered Schema.org @graph containing the
site organization, website, current page, primary image, native WordPress
breadcrumbs, and Article data for posts. WooCommerce remains responsible for
Product and commerce breadcrumb schema. The JSON-LD output disables itself when
a recognized full SEO suite is active; sites can override that decision with
novastream_seo_json_ld_enabled or modify the final graph with
novastream_seo_json_ld_graph. The Organization logo uses the theme's ACF
header_logo option, then falls back to WordPress's Custom Logo.
GitHub updates
Theme Helper provides the release updater used by both NovaStream helper plugins. No per-site configuration is required while these repositories are public:
NovaStreamCA/novastream-theme-helperNovaStreamCA/novastream-woocommerce-theme-helper
For each release:
- Update the
Versionheader and matching version constant. - Commit and push the release code.
- Create a GitHub release whose tag is the same semantic version, with or
without a leading
v(for examplev1.2.0). - In WordPress, use Dashboard > Updates > Check again.
The updater checks GitHub's public Releases API, downloads the generated source archive, and restores the stable plugin directory name during installation. Release notes appear as the plugin changelog. These filters support downstream configuration:
novastream_github_plugin_update_argsnovastream_github_release_data
Validation
Lint all plugin PHP files from the WordPress root:
find wp-content/plugins/novastream-theme-helper -name '*.php' -print0 \
| xargs -0 -n1 php -l
Then activate and inspect the plugin:
wp plugin activate novastream-theme-helper
wp plugin status novastream-theme-helper
Release policy
Public novastream_* functions, hooks, constants, option keys, ACF keys, and
the general-settings slug are compatibility APIs. Changes must remain
backwards compatible across rolling theme and plugin deployments.