{"id":192962,"date":"2024-06-04T11:53:56","date_gmt":"2024-06-04T11:53:56","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/collapse-magic-collapse-magic-php\/"},"modified":"2026-02-19T17:53:20","modified_gmt":"2026-02-19T17:53:20","slug":"collapse-magic","status":"publish","type":"plugin","link":"https:\/\/cs.wordpress.org\/plugins\/collapse-magic\/","author":14654600,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.5.0","stable_tag":"1.5.0","tested":"6.9.4","requires":"6.1","requires_php":"7.3","requires_plugins":null,"header_name":"Collapse Magic","header_author":"Clinton [Hub5050.com]","header_description":"An easy and secure way to display (collapsible) read-more text on a page.","assets_banners_color":"c4c4c4","last_updated":"2026-02-19 17:53:20","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/leads5050.com\/","header_plugin_uri":"https:\/\/hub5050.com\/products\/collapse-magic\/","header_author_uri":"http:\/\/www.creatorseo.com","rating":4,"author_block_rating":0,"active_installs":1000,"downloads":11416,"num_ratings":8,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"creatorseo","date":"2024-06-04 13:36:10"},"1.2.0":{"tag":"1.2.0","author":"creatorseo","date":"2024-07-25 18:39:12"},"1.2.1":{"tag":"1.2.1","author":"creatorseo","date":"2024-07-29 10:13:36"},"1.2.2":{"tag":"1.2.2","author":"creatorseo","date":"2024-08-15 14:30:09"},"1.3.0":{"tag":"1.3.0","author":"creatorseo","date":"2024-08-28 21:06:34"},"1.3.1":{"tag":"1.3.1","author":"creatorseo","date":"2024-11-15 10:37:49"},"1.3.3":{"tag":"1.3.3","author":"creatorseo","date":"2025-03-25 13:11:33"},"1.4.0":{"tag":"1.4.0","author":"creatorseo","date":"2025-06-06 16:28:50"},"1.4.1":{"tag":"1.4.1","author":"creatorseo","date":"2025-07-11 12:05:08"},"1.4.2":{"tag":"1.4.2","author":"creatorseo","date":"2025-12-18 10:36:06"},"1.5.0":{"tag":"1.5.0","author":"creatorseo","date":"2026-02-19 17:53:20"}},"upgrade_notice":{"0.1.0":"<p>Launch version<\/p>"},"ratings":{"1":2,"2":0,"3":0,"4":0,"5":6},"assets_icons":{"icon-256x256.gif":{"filename":"icon-256x256.gif","revision":3097363,"resolution":"256x256","location":"assets","locale":""},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":3097363,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3097363,"resolution":"1544x500","location":"assets","locale":""},"banner-1880x609.jpg":{"filename":"banner-1880x609.jpg","revision":3097363,"resolution":"1880x609","location":"assets","locale":""},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3097363,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0","1.2.0","1.2.1","1.2.2","1.3.0","1.3.1","1.3.3","1.4.0","1.4.1","1.4.2","1.5.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3143206,"resolution":"1","location":"assets","locale":""},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":3143206,"resolution":"2","location":"assets","locale":""},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":3143206,"resolution":"3","location":"assets","locale":""},"screenshot-4.jpg":{"filename":"screenshot-4.jpg","revision":3143206,"resolution":"4","location":"assets","locale":""},"screenshot-5.jpg":{"filename":"screenshot-5.jpg","revision":3143206,"resolution":"5","location":"assets","locale":""},"screenshot-6.jpg":{"filename":"screenshot-6.jpg","revision":3097363,"resolution":"6","location":"assets","locale":""},"screenshot-7.jpg":{"filename":"screenshot-7.jpg","revision":3143206,"resolution":"7","location":"assets","locale":""},"screenshot-8.jpg":{"filename":"screenshot-8.jpg","revision":3161436,"resolution":"8","location":"assets","locale":""},"screenshot-9.jpg":{"filename":"screenshot-9.jpg","revision":3161436,"resolution":"9","location":"assets","locale":""}},"screenshots":{"1":"Sample shortcode including the expand title (title) and the collapse (swaptitle) attributes.","2":"Alternative notation for the shortcode where 'magic_expand' is replaced by 'expand'.","3":"Text displayed on the front-end (collapsed).","4":"Text displayed on the front-end (expanded) when the read-more text is clicked. Notice that any content can be used between the shortcode tags.","5":"Settings Menu values. The default values, icons and displayed text values can be set on the Settings menu. Notice the 'enabled' button can be used to switch the plugin off.","6":"Changing the block height and the fade height changes the way the text is displayed.","7":"The content display fades to the read-more link when the Block Height and Fade Height values are increased.","8":"Set the 'Toggle Above' switch to 'on' to place the 'read-more' and 'read-less' text above the text. This also disables the scroll to top."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1741,228372,228374,228373,59566],"plugin_category":[43],"plugin_contributors":[157391,93576],"plugin_business_model":[],"class_list":["post-192962","plugin","type-plugin","status-publish","hentry","plugin_tags-accordion","plugin_tags-collapse-text","plugin_tags-fade-content","plugin_tags-fade-text","plugin_tags-read-more-text","plugin_category-customization","plugin_contributors-clinton101","plugin_contributors-creatorseo","plugin_committers-creatorseo"],"banners":{"banner":"https:\/\/ps.w.org\/collapse-magic\/assets\/banner-772x250.jpg?rev=3097363","banner_2x":"https:\/\/ps.w.org\/collapse-magic\/assets\/banner-1544x500.jpg?rev=3097363","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/collapse-magic\/assets\/icon-256x256.jpg?rev=3097363","icon_2x":"https:\/\/ps.w.org\/collapse-magic\/assets\/icon-256x256.jpg?rev=3097363","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-1.jpg?rev=3143206","caption":"Sample shortcode including the expand title (title) and the collapse (swaptitle) attributes."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-2.jpg?rev=3143206","caption":"Alternative notation for the shortcode where 'magic_expand' is replaced by 'expand'."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-3.jpg?rev=3143206","caption":"Text displayed on the front-end (collapsed)."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-4.jpg?rev=3143206","caption":"Text displayed on the front-end (expanded) when the read-more text is clicked. Notice that any content can be used between the shortcode tags."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-5.jpg?rev=3143206","caption":"Settings Menu values. The default values, icons and displayed text values can be set on the Settings menu. Notice the 'enabled' button can be used to switch the plugin off."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-6.jpg?rev=3097363","caption":"Changing the block height and the fade height changes the way the text is displayed."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-7.jpg?rev=3143206","caption":"The content display fades to the read-more link when the Block Height and Fade Height values are increased."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-8.jpg?rev=3161436","caption":"Set the 'Toggle Above' switch to 'on' to place the 'read-more' and 'read-less' text above the text. This also disables the scroll to top."},{"src":"https:\/\/ps.w.org\/collapse-magic\/assets\/screenshot-9.jpg?rev=3161436","caption":""}],"raw_content":"<!--section=description-->\n<p>Collapse Magic provides an easy way to display (collapsible) read-more text on a page. This plugin is an alternative to other plugins like collapse-o-matic and can be used as a direct replacement without the need for any changes to page content.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li>Easy to implement<\/li>\n<li>Configurable expand and collapse labels<\/li>\n<li>Configurable up and down arrows<\/li>\n<li>Adjustable visible text height in the collapsed state<\/li>\n<li>Adjustable fade-out text visible in the collapsed state<\/li>\n<li>Unfortunately this plugin does not support Accelerated Mobile Pages (AMP)<\/li>\n<\/ul>\n\n<p><strong>Background<\/strong><\/p>\n\n<p>Collapse Magic provides an easy way to display (collapsible) read-more text on a page. Also, display a few lines of text and add read-more or expand text.<\/p>\n\n<p>This plugin was developed when a cross-site scripting vulnerability was identified in collapse-o-matic. This plugin can be used as a direct replacement to collapse-o-matic. There is no need for any on-page changes to be made for the plugin to be used as a replacement.<\/p>\n\n<p><strong>Set-up<\/strong><\/p>\n\n<ul>\n<li>Install the plugin<\/li>\n<li>Set any parameters from the admin Settings menu.<\/li>\n<li>Place text between [magic_expand][\/magic_expand] tags or between  [expand][\/expand] for the toggle to work.<\/li>\n<li>Include alternate 'read-more' text if this is required in the shortcode as [magic_expand title=\"NEW READ-MORE TEXT\"].<\/li>\n<li>Use alternate 'read-less' text if this is required in the shortcode as [magic_expand swaptitle=\"NEW READ-LESS TEXT\"].<\/li>\n<li>Toggle button to set the default location of the expand \/ collapse label to above or below the section.<\/li>\n<li>Single click disable button to switch off the shortcodes and show the full text.<\/li>\n<\/ul>\n\n<p><strong>Shortcode Parameters<\/strong><\/p>\n\n<ul>\n<li>Read-more \/ expand label - 'title'. Example [magic_expand title=\"--more--\"].<\/li>\n<li>Read-less \/ collapse label - 'swaptitle'. Example [magic_expand title=\"--more--\" swaptitle=\"--less--\"].<\/li>\n<li>Position of the expand label - 'pos'. Example [magic_expand pos=\"above\"] or [magic_expand pos=\"below\"]<\/li>\n<\/ul>\n\n<h3>Credits<\/h3>\n\n<p>This plugin was inspired by the approach used by:\n- <a href=\"https:\/\/www.peeayecreative.com\/how-to-expand-and-collapse-text-in-divi\/\">Nelson Miller: How To Expand And Collapse Text In Divi<\/a>: the jQuery code was modified for this plugin.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload 'Collapse Magic' to the '\/wp-content\/plugins\/' directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Click on 'Collapse Magic' in the Settings menu to set global links or<\/li>\n<li>Go to the Plugins page and click the 'Settings' link for 'Collapse Magic'<\/li>\n<li>Increase the display block value if you want to display some fade-to text.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20this%20plugin%20work%20with%20any%20theme%3F\"><h3>Will this Plugin work with any theme?<\/h3><\/dt>\n<dd><p>Yes, the plugin is theme independent.<\/p><\/dd>\n<dt id=\"can%20i%20display%20a%20different%20drop-down%20arrow%20and%20drop%20down%20text%3F\"><h3>Can I display a different drop-down arrow and drop down text?<\/h3><\/dt>\n<dd><p>Yes, the settings can be configured from the styling page.<\/p><\/dd>\n<dt id=\"where%20do%20i%20find%20the%20button%20styling%20options%3F\"><h3>Where do I find the button styling options?<\/h3><\/dt>\n<dd><p>Click on <em>Collapse Magic<\/em> option on the WordPress 'Settings' admin menu.<\/p><\/dd>\n<dt id=\"can%20i%20place%20the%20%27read-more%27%20and%20%27read-less%27%20text%20above%20the%20text%3F\"><h3>Can I place the 'read-more' and 'read-less' text above the text?<\/h3><\/dt>\n<dd><p>Yes, go to settings&gt;collapse magic&gt;Toggle Above and set this to 'on'. The toggle text will display above.<\/p><\/dd>\n<dt id=\"can%20i%20display%20some%20teaser%20text%20to%20encourage%20the%20visitor%20to%20click%20the%20read-more%20button%3F\"><h3>Can I display some teaser text to encourage the visitor to click the read-more button?<\/h3><\/dt>\n<dd><p>Yes, if you go to settings&gt;collapse magic&gt;Block Height and increase the value, you can display teaser text. You can also change the fade-out height for disappearing text.<\/p><\/dd>\n<dt id=\"does%20the%20fade%20text%20work%20with%20the%20toggle%20text%20above%20the%20block%20text%3F\"><h3>Does the fade text work with the toggle text above the block text?<\/h3><\/dt>\n<dd><p>Yes, the fade works as long as the Block height is set to a value greater than 1px.<\/p><\/dd>\n<dt id=\"will%20this%20plugin%20have%20a%20negative%20impact%20on%20my%20website%3F\"><h3>Will this plugin have a negative impact on my website?<\/h3><\/dt>\n<dd><p>We make every effort to ensure that all the WordPress guidelines are followed and that our plugins are optimised to perform well in all our tests.<\/p><\/dd>\n<dt id=\"if%20i%20install%20the%20plugin%20and%20the%20styling%20does%20not%20look%20correct%2C%20what%20should%20i%20do%3F\"><h3>If I install the plugin and the styling does not look correct, what should I do?<\/h3><\/dt>\n<dd><p>The very first time you view the page after installing the plugin you may need to refresh the page (ctrl+F5) to ensure that the new style and script libraries are initiated. If needed this should be a once-off refresh. Everything should be fine thereafter.<\/p><\/dd>\n<dt id=\"why%20does%20the%20plugin%20not%20support%20accelerated%20mobile%20pages%20%28amp%29%3F\"><h3>Why does the plugin not support Accelerated Mobile Pages (AMP)?<\/h3><\/dt>\n<dd><p>Accelerated Mobile Pages (AMP) has strict limitations on JavaScript, and does not allow jQuery. This breaks the dynamic features that are key to this plugin.<\/p><\/dd>\n<dt id=\"can%20i%20nest%20the%20collapse%20shortcodes%3F\"><h3>Can I nest the collapse shortcodes?<\/h3><\/dt>\n<dd><p>Nesting [magic_expand] shortcodes is not supported. If you need multiple collapsible sections, use separate blocks one after another (not inside each other).<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Code improvements and conformance checks<\/li>\n<li>Consistency changes so that JS controls state and CSS controls layout<\/li>\n<\/ul>\n\n<h4>1.4.2<\/h4>\n\n<ul>\n<li>Version &amp; Conformance checks and improvements<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Version checks and minor updates<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Improvements made to allow nested shortcodes. Note many page builders mangle nested shortcodes and there is no clear solution for this.<\/li>\n<\/ul>\n\n<h4>1.3.3<\/h4>\n\n<ul>\n<li>General maintenance improvements. Debug log error resolved.<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Removed the restriction on the amount of text that could be contained in the read-more block.<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Included the option to place the read-more and read-less above or below the text (thanks to @bob33 for the suggestion).<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>Fix applied to allow shortcodes within the shortcode (thanks to @bob33 for identifying this bug).<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Change the default fade and block settings as these were confusing to new users.<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Scroll back to the original read-more text included. Checks following feedback from a user investigated but no issues could be found.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Improvements to better meet WordPress Plugin requirements<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Launch version<\/li>\n<\/ul>\n\n<h4>0.0.1<\/h4>\n\n<ul>\n<li>Pilot launch April 2024<\/li>\n<\/ul>","raw_excerpt":"The easy way to create a collapsible text block with a &#039;read-more&#039; label on any page. Also provides a fading text option.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/192962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=192962"}],"author":[{"embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/creatorseo"}],"wp:attachment":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=192962"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=192962"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=192962"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=192962"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=192962"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=192962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}