- Added inline search + preview picker to the Embed Document widget. Replaces the paste-an-admin-URL text field with a debounced search input, a results list (icon + filename), a hidden
post_idfield, and a preview pane. Two admin-only AJAX endpoints back the picker (proud_document_search,proud_document_preview) — both nonce- andedit_posts-gated, nonoprivregistration. Preview reuses the existingtemplates/content-embed-document.phpviaob_start()so the admin preview matches the frontend embed exactly. Back-compat preserved: legacy widgets storing a pasted edit URL continue to render; JS rewrites them to a clean numeric ID on next save. Hardened pre-existing unescaped outputs in the embed template ($src,$filenamenow useesc_url/esc_attr/esc_html). JS result rendering uses.text()+ jQuery factory calls instead of.html()+ string concatenation. Asset enqueue scoped towidgets.php,customize.php,post.php, andpost-new.php(covers SiteOrigin Page Builder, where widgets render inside the post edit screen). JS rebinds onwidget-added,widget-updated, and SiteOrigin'spanelsopen/panelsdoneevents. PHPUnit tests added:DocumentWidgetSearchTest.php,DocumentWidgetPreviewTest.php— 8 new tests, 31/31 suite passing.
References: proudcity/wp-proudcity#2744
- Fixed critical error when attaching a file to a Documents page on sites that do not run wp-stateless.
getStatelessFileMeta()inproud-helpers.phpcalled\ud_get_stateless_media()unconditionally, which fataled when the wp-stateless plugin was not active. Added afunction_exists('ud_get_stateless_media')guard that returnsnullearly so callers fall back to the standard attachment URL path.
References: https://github.com/proudcity/saintra/issues/45
- Fixed swapped "Older" / "Newer" pagination labels on the /news/ archive. Posts are sorted DESC by date, so the prev URL (page - 1) moves toward newer posts and the next URL (page + 1) moves toward older posts. The
case 'post':branch inTeaserList::print_pagination()had the labels reversed; swapped them so$prev_textreads "« Newer" and$next_textreads "Older »". Removed the stale comment that flagged the labels as potentially needing a swap.
References: proudcity/wp-proudcity#2817
- Fixed "Don't display image on individual page" checkbox disappearing after setting a featured image, causing it to never be submitted on first publish. Root cause:
hide_featured_image()relied onglobal $post, which is null inside the WordPress AJAX handler that refreshes the featured image meta box after image selection. Fixed by receiving$post_idvia the filter's second argument and callingget_post($post_id)instead. Also fixedwp_nonce_field()echoing directly into the AJAX response (corrupting it) by passingfalseas the 4th argument; added autosave/revision guards and nonce verification tosave_featured_image_meta(); switched from$_REQUESTto$_POST; fixed checkboxvalueattribute to always be"1"instead of the current meta value - Added PHPUnit test suite for
proud-layout.php: 11 tests covering checkbox rendering, AJAX context, nonce output, save guards, and value handling
References: proudcity/wp-proudcity#2804
- Added PHPUnit 11 test suite with Brain\Monkey for WP function mocking; covers breadcrumb edge cases (non-sequential
menu_order, duplicate menu items, empty trail) and navbarbuild_logo_meta()metadata fallback - Fixed secondary undefined array key warning on
$image_meta['meta']['height']when attachment metadata is absent; guarded with?? 0
- Fixed PHP 8.1 deprecation notice in
build_logo_meta():wp_get_attachment_metadata()returnsfalsefor attachments with no registered metadata (SVGs, pre-sized uploads); addedis_array()guard inbuild_retina_image_meta()to normalize themetakey to an empty array before writing into it, preventing automaticfalse-to-array conversion
References: proudcity/wp-proudcity#2807
- Fixed fatal
TypeErrorinProudBreadcrumb::build_breadcrumb()caused by non-sequentialmenu_orderleaving trail slots as empty strings; removed fragile earlybreak, addedarray_filterto drop unfilled slots, and usedarray_key_last()to mark the active item - Fixed second fatal
TypeErrorinbuild_breadcrumb()whenreset($active_trail)returnedfalseon an empty trail after filtering; addedis_array($firstItem)guard before accessing['post_id'] - Fixed duplicate active-branch bug in
ProudMenuUtil::get_nested_menu()when the same post appears more than once in a menu; added$found_activeflag so only the first occurrence is marked active
References: proudcity/wp-proudcity#2806
On mobile (< 911px), the hamburger button and action toolbar (.menu-box) now appear beside the logo in .navbar-header-region instead of being pinned to the bottom of the viewport.
Changes in navbar.php:
- Added
.header-region-menu-boxdiv inside.navbar-header-regioncontaining a new#header-menu-button(hamburger with "Menu" label below it) and a copy of.menu-box - Added
#menu-close-button(× button) inside#navbar-external, shown fixed at top-right when the menu is open
Changes in proud-navbar.js:
- Added click handler for
#header-menu-buttonto toggle the menu - Added click handler for
#menu-close-buttonto close the menu
References: proudcity/wp-proudcity#2757
The get_nested_menu algorithm used a depth-stack that assumed menu items were returned in strict depth-first menu_order sequence. Items added via Quick Menu received menu_order = count($menu_items), which could collide with existing items and cause MySQL to return some child items after a sibling branch had already been processed. When that happened, those children's parents were no longer on the stack and they silently dropped to root level.
Replaced the stack-based algorithm with a parent_id → children lookup map that recursively builds the tree using explicit parent IDs, so nesting is always correct regardless of menu_order values.
Also fixed the active_trail insertion order: the recursive approach built the trail leaf→root, but build_breadcrumb requires root→leaf (it stops when end($active_trail) is non-empty, which must be the active item). Added array_reverse after the build to correct this — without it the breadcrumb crashed with "Cannot access offset of type string on string".
Files changed:
modules/proud-menu/proud-menu.php
Changes:
get_nested_menu(): replaced depth-stack loop with$children_ofmap + recursive$buildclosureget_nested_menu(): addedarray_reverse( $active_trail, true )after build to restore root→leaf order- Removed dead
insert_deep()andattach_link()methods (no longer called) - Removed unused
global $proud_menu_utilfromget_nested_menu() build_recursive(): removed unused$key =>from foreachproud_menu_fix(): renamed$menu_id→$_menu_id(required by hook, intentionally unused)
References: proudcity/wp-proudcity#2776
References: proudcity/wp-proudcity#2753
modules/proud-widget/widgets/cta-widget/cta-button-widget.class.php— removed box-shadow from.card.card-btn.card-btn-action; added matching border color to.card.card-btn.actionso the card edge doesn't flash on hover; added:focusand:hoverrules that switch the background to white while preserving the text color
References: proudcity/wp-proudcity#2779
modules/widgets/jumbotron-header/templates/jumbotron-full.php— added file label and class switch for full headermodules/widgets/jumbotron-header/templates/jumbotron-header.php— added class switch logicmodules/widgets/jumbotron-header/templates/jumbotron-simple.php— added class switch logicmodules/widgets/jumbotron-header/templates/jumbotron-slideshow.php— added class switch logic
References: proudcity/wp-proudcity#2777
plugin_override/wordpress-faq-manager/proud-wordpress-faq-manager.php— new file; deregisters all five widgets provided by the wordpress-faq-manager plugin (Search_FAQ_Widget,Random_FAQ_Widget,Recent_FAQ_Widget,Topics_FAQ_Widget,Cloud_FAQ_Widget) atwidgets_initpriority 20 so they are unavailable on the ProudCity platform without modifying the upstream pluginwp-proud-core.php— addedrequire_oncefor the new faq-manager override file
References: proudcity/wp-proudcity#2665
wp-proud-core.php— fixedgetPageInfo()to useget_post_type()instead of hardcoding'agency'; added fallback lookup forproud-topicposts whose slug matches the menu slug; extendedis_page()gate tois_singular('proud-topic')so$pageInfois populated when viewing a proud-topic CPTmodules/proud-layout/proud-layout.php— added'proud-topic'case topage_parent_info()so topic subpages trigger the topic sidebar and breadcrumb; added dedicatedis_singular('proud-topic')branch sopage_parent_info('proud-topic')returns true when viewing a proud-topic directly (bypassesis_page()gate)modules/proud-menu/proud-menu.php— fixedbuild_breadcrumb()to treatproud-topiclikeagency: prepend the proud-topic to the active trail instead of falling through to theelsebranch which was overwriting$pageInfo['parent_post_type']fromproud-topictopage, causingpage_parent_info('proud-topic')to always return false