Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
3b8be81
feat(templates): add popup template library with block patterns and e…
danieliser Jul 7, 2026
2ed2ec5
fix(triggers): allow Extra Selectors starting with a number
danieliser Jul 11, 2026
dd3f4a1
fix(i18n): correct plural of Call to Action to "Calls to Action"
danieliser Jul 11, 2026
80c0120
fix(a11y): explicitly move focus to body when closing a popup with no…
danieliser Jul 11, 2026
fe2960d
fix(integrations): restore forced AJAX for Gravity Forms in popups
danieliser Jul 11, 2026
2ca4bce
fix(security): prevent XSS and license-key exposure in admin surfaces
danieliser Jul 11, 2026
3b01c60
fix(security): default TLS verification on for cached asset fetches
danieliser Jul 11, 2026
e94711f
fix(security): harden build/release supply chain
danieliser Jul 11, 2026
a2b72b7
fix(ci): close WordPress.org deploy and workflow injection paths
danieliser Jul 11, 2026
8de53c6
docs(changelog): note security and resilience hardening
danieliser Jul 11, 2026
8378bbe
fix(security): escape untrusted output in admin surfaces
danieliser Jul 11, 2026
4a4b453
fix(security): enforce capability checks across admin and REST surfaces
danieliser Jul 11, 2026
7d6c705
fix(security): harden public CTA redirect, form tracking, and ACF ren…
danieliser Jul 11, 2026
8b56480
fix(security): prevent asset-cache SSRF/path traversal and pin debug CDN
danieliser Jul 11, 2026
a5683f2
fix(security): harden build/release tooling and CI gate
danieliser Jul 11, 2026
2009a6f
ci: add scheduled Google Fonts auto-update workflow
danieliser Jul 11, 2026
a9e9a38
fix(license): prevent fatal when license API returns empty or errors
danieliser Jul 11, 2026
f465064
fix(blocks): preserve inner buttons when transforming core/buttons to…
danieliser Jul 11, 2026
47cae19
fix(build): repair package entry points, types, and block-editor SCSS
danieliser Jul 11, 2026
178f758
fix(importer): correct Easy Modal v2 importer include paths
danieliser Jul 11, 2026
7825ed2
fix(ci): deploy the unpacked plugin tree to WordPress.org, not a zip
danieliser Jul 11, 2026
2aea49b
fix(core-data): correct settings action payload shape and false error
danieliser Jul 11, 2026
955645e
fix(compat): restore legacy PUM_Site_Popups current_popup and get_loa…
danieliser Jul 11, 2026
18d7a49
fix(blocks): don't clear CTA link attributes while the CTA is still l…
danieliser Jul 11, 2026
7429aa2
fix(blocks): add cta-buttons deprecation for legacy wp-block-buttons …
danieliser Jul 11, 2026
7ae8ff2
fix(blocks): make native CTA button editor import-safe
danieliser Jul 11, 2026
74d4a0c
fix(php): resolve latent fatals and controller/admin regressions
danieliser Jul 12, 2026
bebf489
fix(core-data,fields): correct settings path, search state, and field…
danieliser Jul 12, 2026
f33f943
fix(blocks): defer CTA creation to save, honor filtered params, fix p…
danieliser Jul 12, 2026
2522e5a
fix(integrations): harden form conversion tracking
danieliser Jul 12, 2026
395f4a4
fix(cta-editor): correct save lifecycle, sorting, and conversions schema
danieliser Jul 12, 2026
4ff1a18
fix(admin): recognize Easy Digital Downloads in Go Pro ecommerce dete…
danieliser Jul 12, 2026
32e8807
fix(utils): omit() now omits the given keys instead of picking them
danieliser Jul 12, 2026
15ce195
fix(admin): correct block icon path, license status, install date, an…
danieliser Jul 12, 2026
47f9654
fix(upgrades,blocks): no-op stream mock and working block wildcard match
danieliser Jul 12, 2026
cb02331
fix(i18n,assets): correct textdomain path, head flag, _nx signature, …
danieliser Jul 12, 2026
de04c25
fix(core-data): purge CTA records from all state maps, not just allIds
danieliser Jul 12, 2026
365de23
fix(ci): restore release-zip deploy path, keep source-build fallback
danieliser Jul 12, 2026
3a0d303
refactor(compat): move loaded-popups WP_Query shaping into the contro…
danieliser Jul 12, 2026
8507507
feat(docs): add AGENTS.md and PHP type validation agents
danieliser Jul 12, 2026
1ae7439
feat(integrations): add "Open Popup" click action to Beaver Builder b…
danieliser Jul 12, 2026
ac5ec5f
Merge branch 'develop' into feat/popup-template-library
github-actions[bot] Jul 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 26 additions & 17 deletions classes/Controllers/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,29 @@ public function get_packages() {
'styles' => true,
'deps' => [],
'varsName' => 'popupMakerBlockEditor',
'vars' => [
'cta_types' => $this->container->get( 'cta_types' )->get_as_array(),
'popups' => pum_get_all_popups(),
'homeUrl' => home_url(),
'previewNonce' => wp_create_nonce( 'popup-preview' ),
'popupTriggerExcludedBlocks' => apply_filters(
'pum_block_editor_popup_trigger_excluded_blocks',
[
'core/nextpage',
'popup-maker/call-to-action',
'popup-maker/call-to-actions',
]
),
],
'vars' => function () {
$vars = [
'cta_types' => $this->container->get( 'cta_types' )->get_as_array(),
'popups' => pum_get_all_popups(),
'homeUrl' => home_url(),
'previewNonce' => wp_create_nonce( 'popup-preview' ),
'popupTriggerExcludedBlocks' => apply_filters(
'pum_block_editor_popup_trigger_excluded_blocks',
[
'core/nextpage',
'popup-maker/call-to-action',
'popup-maker/call-to-actions',
]
),
];

// Template picker data is only needed in the popup editor itself.
if ( pum_is_popup_editor() ) {
$vars['templateLibrary'] = $this->container->get( 'template_library' )->get_editor_data();
}

return $vars;
},
],
'block-library' => [
'bundled' => false,
Expand Down Expand Up @@ -405,9 +414,9 @@ private function get_layout_vars() {
$vars = apply_filters(
'popup_maker/layout_vars',
[
'navTabs' => [],
'supportMenuItems' => [],
'showSupport' => true,
'navTabs' => [],
'supportMenuItems' => [],
'showSupport' => true,
]
);

Expand Down
78 changes: 78 additions & 0 deletions classes/Controllers/TemplateLibrary.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/**
* TemplateLibrary controller.
*
* @package PopupMaker
* @copyright Copyright (c) 2026, Code Atlantic LLC
*/

namespace PopupMaker\Controllers;

use PopupMaker\Plugin\Controller;

defined( 'ABSPATH' ) || exit;

/**
* Registers popup templates as block patterns.
*
* Templates are collected by the `template_library` service and exposed
* two ways: as post-type-scoped block patterns for the native inserter,
* and as picker data for the popup editor template modal (localized via
* the Assets controller).
*
* @since X.X.X
*/
class TemplateLibrary extends Controller {

/**
* Initialize the controller.
*
* @return void
*/
public function init() {
// Late enough for Pro (plugins_loaded@12) & addons (@13) to hook the filter.
add_action( 'init', [ $this, 'register_block_patterns' ], 15 );
}

/**
* Register pattern categories & popup template patterns.
*
* @return void
*/
public function register_block_patterns() {
if ( ! function_exists( 'register_block_pattern' ) || ! function_exists( 'register_block_pattern_category' ) ) {
return;
}

$service = $this->container->get( 'template_library' );

register_block_pattern_category( 'popup-maker-templates', [
'label' => __( 'Popup Templates', 'popup-maker' ),
'description' => __( 'Ready-made popup layouts from Popup Maker.', 'popup-maker' ),
] );

foreach ( $service->get_categories() as $slug => $label ) {
register_block_pattern_category( 'popup-maker-' . $slug, [
/* translators: %s: Template category label. */
'label' => sprintf( _x( 'Popup: %s', 'Block pattern category label', 'popup-maker' ), $label ),
] );
}

foreach ( $service->get_templates() as $template ) {
if ( ! $service->is_insertable( $template ) ) {
continue;
}

register_block_pattern( 'popup-maker/' . $template['slug'], [
'title' => $template['name'],
'description' => $template['description'],
'content' => $template['content'],
'categories' => [ 'popup-maker-templates', 'popup-maker-' . $template['category'] ],
'keywords' => $template['keywords'],
'postTypes' => [ 'popup' ],
'viewportWidth' => $template['viewport_width'],
'inserter' => true,
] );
}
}
}
33 changes: 23 additions & 10 deletions classes/Plugin/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@ public function __construct( $config ) {
*/
protected function registered_controllers() {
return [
'Admin' => new \PopupMaker\Controllers\Admin( $this ),
'Assets' => new \PopupMaker\Controllers\Assets( $this ),
'CallToActions' => new \PopupMaker\Controllers\CallToActions( $this ),
'Compatibility' => new \PopupMaker\Controllers\Compatibility( $this ),
'Debug' => new \PopupMaker\Controllers\Debug( $this ),
'PostTypes' => new \PopupMaker\Controllers\PostTypes( $this ),
'RestAPI' => new \PopupMaker\Controllers\RestAPI( $this ),
'Upgrades' => new \PopupMaker\Controllers\Upgrades( $this ),
'WP' => new \PopupMaker\Controllers\WP( $this ),
'Frontend' => new \PopupMaker\Controllers\Frontend( $this ),
'Admin' => new \PopupMaker\Controllers\Admin( $this ),
'Assets' => new \PopupMaker\Controllers\Assets( $this ),
'CallToActions' => new \PopupMaker\Controllers\CallToActions( $this ),
'Compatibility' => new \PopupMaker\Controllers\Compatibility( $this ),
'Debug' => new \PopupMaker\Controllers\Debug( $this ),
'PostTypes' => new \PopupMaker\Controllers\PostTypes( $this ),
'RestAPI' => new \PopupMaker\Controllers\RestAPI( $this ),
'TemplateLibrary' => new \PopupMaker\Controllers\TemplateLibrary( $this ),
'Upgrades' => new \PopupMaker\Controllers\Upgrades( $this ),
'WP' => new \PopupMaker\Controllers\WP( $this ),
'Frontend' => new \PopupMaker\Controllers\Frontend( $this ),
// 'BlockEditor' => new \PopupMaker\Controllers\BlockEditor( $this ),
// 'Frontend' => new \PopupMaker\Controllers\Frontend( $this ),
// 'Shortcodes' => new \PopupMaker\Controllers\Shortcodes( $this ),
Expand Down Expand Up @@ -280,6 +281,18 @@ function ( $container ) {
// }
// );

$this->set(
'template_library',
/**
* Get popup template library.
*
* @return \PopupMaker\Services\TemplateLibrary
*/
function ( $container ) {
return new \PopupMaker\Services\TemplateLibrary( $container );
}
);

$this->set(
'globals',
/**
Expand Down
Loading
Loading