{"id":290118,"date":"2026-03-19T10:33:15","date_gmt":"2026-03-19T10:33:15","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/carttrigger-bag\/"},"modified":"2026-03-19T10:51:07","modified_gmt":"2026-03-19T10:51:07","slug":"carttrigger-bag","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/carttrigger-bag\/","author":23460456,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.9","stable_tag":"2.0.9","tested":"6.9.4","requires":"6.3","requires_php":"7.4","requires_plugins":null,"header_name":"CartTrigger \u2013 BAG","header_author":"Poletto 1976 S.L.U.","header_description":"Enhance WooCommerce with advanced brand management, awards badges, and lifestyle galleries built into native zoom.","assets_banners_color":"0a0a1a","last_updated":"2026-03-19 10:51:07","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/poletto.es\/nuestros-servicios\/eficiencia\/ct-bag","header_author_uri":"https:\/\/poletto.es","rating":0,"author_block_rating":0,"active_installs":0,"downloads":62,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.0.9":{"tag":"2.0.9","author":"polettoespana","date":"2026-03-19 10:51:07"}},"upgrade_notice":{"2.0.5":"<p>Breaking change: shortcodes and PHP helper functions renamed from <code>ctb_*<\/code> to <code>ctbag_*<\/code>. Update any shortcodes in your content accordingly.<\/p>","2.0.4":"<p>New admin UX: drag &amp; drop reordering for gallery, custom fields, and awards; single-image removal in gallery.<\/p>","2.0.3":"<p>Bug fix: awards and custom fields with accented characters or typographic quotes now save correctly. No data migration needed.<\/p>","2.0.0":"<p>Major rewrite. No data migration needed \u2014 all existing brand meta is preserved.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3486344,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3486344,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3486351,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3486351,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.0.9"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3486377,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3486377,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Brand edit screen \u2014 plugin banner with HTML Description module (TinyMCE editor).","2":"Custom Fields, Awards, and Gallery modules with drag &amp; drop support."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[15180,14167,14164,210,286],"plugin_category":[45,50],"plugin_contributors":[257309],"plugin_business_model":[],"class_list":["post-290118","plugin","type-plugin","status-publish","hentry","plugin_tags-awards","plugin_tags-brand-management","plugin_tags-brands","plugin_tags-gallery","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_category-media","plugin_contributors-polettoespana","plugin_committers-polettoespana"],"banners":{"banner":"https:\/\/ps.w.org\/carttrigger-bag\/assets\/banner-772x250.png?rev=3486351","banner_2x":"https:\/\/ps.w.org\/carttrigger-bag\/assets\/banner-1544x500.png?rev=3486351","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/carttrigger-bag\/assets\/icon-128x128.png?rev=3486344","icon_2x":"https:\/\/ps.w.org\/carttrigger-bag\/assets\/icon-256x256.png?rev=3486344","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/carttrigger-bag\/assets\/screenshot-1.png?rev=3486377","caption":"Brand edit screen \u2014 plugin banner with HTML Description module (TinyMCE editor)."},{"src":"https:\/\/ps.w.org\/carttrigger-bag\/assets\/screenshot-2.png?rev=3486377","caption":"Custom Fields, Awards, and Gallery modules with drag &amp; drop support."}],"raw_content":"<!--section=description-->\n<p><strong>CartTrigger \u2013 BAG<\/strong> (Brand \u00b7 Awards \u00b7 Gallery) extends the WooCommerce native brand taxonomy with three powerful modules:<\/p>\n\n<h4>Custom Fields<\/h4>\n\n<p>Attach unlimited key\u2013value pairs to any brand. Output them anywhere via shortcode or PHP helper function. CSS classes are fully customisable, including Tailwind arbitrary-value classes (e.g. <code>text-[11px]<\/code>).<\/p>\n\n<h4>Awards<\/h4>\n\n<p>Manage a list of awards and recognitions for each brand \u2014 with optional logo, award name, event name, and year. Display them as a styled list using the <code>[ctbag_awards]<\/code> shortcode.<\/p>\n\n<h4>Gallery<\/h4>\n\n<p>Upload a curated image gallery per brand. Display it as a responsive grid with the <code>[ctbag_gallery]<\/code> shortcode. Optional native WooCommerce lightbox (PhotoSwipe) via <code>lightbox=\"1\"<\/code>.<\/p>\n\n<h4>Shortcodes<\/h4>\n\n<p><strong><code>[ctbag_custom_fields]<\/code><\/strong>\nOutputs brand custom fields as a <code>&lt;dl&gt;<\/code> list.<\/p>\n\n<pre><code>[ctbag_custom_fields brand=\"slug\" wrapper_class=\"...\" dt_class=\"...\" dd_class=\"...\"]\n<\/code><\/pre>\n\n<p><strong><code>[ctbag_awards]<\/code><\/strong>\nOutputs brand awards as a styled card list.<\/p>\n\n<pre><code>[ctbag_awards brand=\"slug\" title=\"Awards\" wrapper_class=\"...\" card_class=\"...\"]\n<\/code><\/pre>\n\n<p><strong><code>[ctbag_gallery]<\/code><\/strong>\nOutputs brand gallery as a responsive image grid.<\/p>\n\n<pre><code>[ctbag_gallery brand=\"slug\" title=\"Gallery\" wrapper_class=\"...\" lightbox=\"1\"]\n<\/code><\/pre>\n\n<h4>PHP Helper Functions<\/h4>\n\n<p>All shortcodes are also available as direct PHP functions that bypass WordPress' shortcode parser \u2014 useful when Tailwind arbitrary-value classes (e.g. <code>text-[11px]<\/code>) would otherwise be mangled:<\/p>\n\n<pre><code>echo ctbag_custom_fields(['wrapper_class' =&gt; 'grid grid-cols-2 gap-4']);\necho ctbag_awards(['title' =&gt; __('Awards', 'your-textdomain')]);\necho ctbag_gallery(['title' =&gt; __('Gallery', 'your-textdomain'), 'lightbox' =&gt; '1']);\n<\/code><\/pre>\n\n<h4>Professional Admin UI<\/h4>\n\n<p>All brand meta fields are presented in a clean, card-based admin interface grouped by module (HTML Description, Custom Fields, Awards, Gallery), with collapsible shortcode reference built in. Custom fields and awards support drag &amp; drop reordering. Gallery images can be removed individually (\u00d7 button on hover) and reordered by dragging.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>carttrigger-bag<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<li>Go to <strong>Products \u2192 Brands<\/strong> and edit any brand to start adding content.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20require%20woocommerce%3F\"><h3>Does this plugin require WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. WooCommerce must be active before activating CartTrigger \u2013 BAG. The plugin declares a <code>Requires Plugins: woocommerce<\/code> dependency.<\/p><\/dd>\n<dt id=\"does%20it%20require%20a%20specific%20woocommerce%20version%3F\"><h3>Does it require a specific WooCommerce version?<\/h3><\/dt>\n<dd><p>WooCommerce 8.0 or higher is recommended. The plugin has been tested up to WooCommerce 10.6.1.<\/p><\/dd>\n<dt id=\"can%20i%20use%20tailwind%20css%20classes%20in%20the%20shortcode%20attributes%3F\"><h3>Can I use Tailwind CSS classes in the shortcode attributes?<\/h3><\/dt>\n<dd><p>Yes, but classes containing square brackets (e.g. <code>text-[11px]<\/code>) will be interpreted as shortcode closing tags by WordPress. Use the PHP helper functions instead \u2014 they bypass the shortcode parser entirely.<\/p><\/dd>\n<dt id=\"where%20is%20the%20gallery%20lightbox%20loaded%3F\"><h3>Where is the gallery lightbox loaded?<\/h3><\/dt>\n<dd><p>The lightbox uses WooCommerce's bundled PhotoSwipe library. It is only active when <code>lightbox=\"1\"<\/code> is set. On pages where WooCommerce scripts are disabled, a graceful fallback (open image in new tab) is used automatically.<\/p><\/dd>\n<dt id=\"gallery%20images%20look%20blurry%20or%20load%20slowly%20%E2%80%94%20what%20image%20size%20should%20i%20use%3F\"><h3>Gallery images look blurry or load slowly \u2014 what image size should I use?<\/h3><\/dt>\n<dd><p>The <code>size_thumb<\/code> parameter controls which registered WordPress image size is used for gallery thumbnails. The default is <code>medium_large<\/code> (typically 768 px wide), which is appropriate for large single-column layouts. If your gallery is displayed in a multi-column grid (3\u20134 columns), use <code>size_thumb=\"medium\"<\/code> (300 px) to reduce file weight by 4\u20136\u00d7 with no visible quality loss:<\/p>\n\n<pre><code>[ctbag_gallery size_thumb=\"medium\" lightbox=\"1\"]\n<\/code><\/pre>\n\n<p>Or via PHP helper:<\/p>\n\n<pre><code>echo ctbag_gallery(['size_thumb' =&gt; 'medium', 'lightbox' =&gt; '1']);\n<\/code><\/pre><\/dd>\n<dt id=\"brand%20pages%20load%20slowly%20%E2%80%94%20any%20caching%20recommendations%3F\"><h3>Brand pages load slowly \u2014 any caching recommendations?<\/h3><\/dt>\n<dd><p>Brand taxonomy pages contain no user-specific content (no cart, no session), so they are ideal candidates for full-page caching. Make sure your caching plugin (LiteSpeed Cache, WP Rocket, W3 Total Cache\u2026) does <strong>not<\/strong> exclude brand taxonomy pages from its cache.<\/p>\n\n<p>Since version 2.0.8, PhotoSwipe (4 CSS\/JS files) is only enqueued on brand pages that actually have a gallery, so brands without a gallery already load significantly fewer assets.<\/p>\n\n<p>If you use LiteSpeed Cache and notice that brand pages are slow after a product update, check whether \"Smart Purge on Product Update\" is purging brand taxonomy pages. Enabling the LiteSpeed Crawler ensures the cache is regenerated automatically in the background so visitors never hit an uncached page.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.9<\/h4>\n\n<ul>\n<li>Fix: corrected Contributors username in readme.txt to match the WordPress.org plugin owner account.<\/li>\n<\/ul>\n\n<h4>2.0.8<\/h4>\n\n<ul>\n<li>Perf: PhotoSwipe CSS and JS are now enqueued only on brand pages that have a gallery, instead of on every brand page. Brands without a gallery no longer load 4 unnecessary assets (2 CSS + 2 JS).<\/li>\n<\/ul>\n\n<h4>2.0.7<\/h4>\n\n<ul>\n<li>Fix: gallery images not saved after selection in the media uploader. Root cause: HTML input had <code>id=\"ctb_gallery\"<\/code> while the admin JS targeted <code>#ctbag_gallery<\/code>, so the hidden field was never updated before form submission.<\/li>\n<\/ul>\n\n<h4>2.0.6<\/h4>\n\n<ul>\n<li>Fix: fatal error on brand save due to mismatched method name after 2.0.5 prefix rename (<code>ctbag_save_term_meta<\/code>).<\/li>\n<li>Fix: added one-time migration to move existing term meta from legacy <code>ctb_*<\/code> keys to <code>ctbag_*<\/code> keys.<\/li>\n<\/ul>\n\n<h4>2.0.5<\/h4>\n\n<ul>\n<li>Compliance: renamed all shortcodes and PHP helper functions from <code>ctb_*<\/code> to <code>ctbag_*<\/code> to meet the WordPress.org 5-character prefix requirement (<code>ctbag<\/code> = CartTrigger BAG).<\/li>\n<li>Compliance: extracted inline gallery lightbox JavaScript to an external file (<code>assets\/js\/ctbag-gallery-lightbox.js<\/code>) loaded via <code>wp_enqueue_script()<\/code>.<\/li>\n<li>Compatibility: WC tested up to 10.6.1.<\/li>\n<\/ul>\n\n<h4>2.0.4<\/h4>\n\n<ul>\n<li>New: Gallery \u2014 individual image removal with an \u00d7 button that appears on hover, without reopening the media uploader.<\/li>\n<li>New: Gallery \u2014 drag &amp; drop reordering of thumbnails (jQuery UI Sortable).<\/li>\n<li>New: Custom Fields \u2014 drag &amp; drop reordering of field rows via a handle icon.<\/li>\n<li>New: Awards \u2014 drag &amp; drop reordering of award rows via a handle icon.<\/li>\n<\/ul>\n\n<h4>2.0.3<\/h4>\n\n<ul>\n<li>Fix: double-quote characters (<code>\"<\/code>) in award names, event names, and custom field values were corrupted on save. Root cause: WordPress calls <code>wp_unslash()<\/code> (stripslashes) on meta values inside <code>add_metadata()<\/code>, which stripped the backslash from <code>\\\"<\/code> in the JSON string, producing invalid JSON. Fix: awards and custom fields are now stored as native PHP arrays via <code>maybe_serialize()<\/code> \u2014 no backslash escaping involved, immune to the slashing issue. Backward-compatible: existing JSON-format data is still read correctly.<\/li>\n<li>Fix: accented characters (\u00e9, \u00e0, \u00f3\u2026) in award\/field text were silently dropped on some server configurations. Replaced <code>sanitize_text_field()<\/code> with <code>wp_strip_all_tags()<\/code> to avoid the internal <code>wp_check_invalid_utf8()<\/code> call that incorrectly rejected valid multi-byte characters.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Complete rewrite with professional admin UI (module cards).<\/li>\n<li>Added HTML Description module with TinyMCE editor on both Add and Edit brand screens.<\/li>\n<li>Added native WooCommerce lightbox (PhotoSwipe) support for gallery shortcode.<\/li>\n<li>Added activation notice with link to brand management screen.<\/li>\n<li>Plugin fully internationalised \u2014 translations available for Italian (it_IT) and Spanish (es_ES).<\/li>\n<\/ul>","raw_excerpt":"Enhance WooCommerce brands with custom fields, awards badges, and lifestyle galleries with native lightbox support.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/290118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=290118"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/polettoespana"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=290118"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=290118"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=290118"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=290118"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=290118"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=290118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}