{"id":138,"date":"2025-02-06T12:40:05","date_gmt":"2025-02-06T12:40:05","guid":{"rendered":"https:\/\/documentation.userswp.io\/article\/bootstrap-conflict-with-download-manager\/"},"modified":"2025-03-26T15:39:39","modified_gmt":"2025-03-26T15:39:39","slug":"bootstrap-conflict-with-download-manager","status":"publish","type":"gd_place","link":"https:\/\/userswp.io\/documentation\/article\/code-snippets\/bootstrap-conflict-with-download-manager\/","title":{"rendered":"Bootstrap conflict with Download Manager"},"content":{"rendered":"<p>Download Manager plugin loads its bootstrap file on uwp pages, and later than uwp.<\/p>\n<pre><code class=\"language-php\">\/**\n * Prevents Download manager to load bootstrap on uwp pages.\n *\/\nadd_filter(&#039;wpdm_disable_scripts&#039;, &#039;gdsnippet_maybe_dequeue_wpdm_bootstrap&#039;, 999, 1);\n\nfunction gdsnippet_maybe_dequeue_wpdm_bootstrap($disabled_scripts) {\n    if (!is_array($disabled_scripts)) {\n        $disabled_scripts = [];\n    }\n    \/\/ Bail early checks.\n    if (\n        in_array(&#039;wpdm - frontend - js&#039;, $disabled_scripts, true) ||\n        !function_exists(&#039;is_uwp_page&#039;) ||\n        !is_uwp_page()\n    ) {\n        return $disabled_scripts;\n    }\n    $disabled_scripts[] = &#039;wpdm - frontend - js&#039;;\n    return $disabled_scripts;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Download Manager plugin loads its bootstrap file on uwp pages, and later than uwp. \/** * Prevents Download manager to load bootstrap on uwp pages. *\/ add_filter(&#039;wpdm_disable_scripts&#039;, &#039;gdsnippet_maybe_dequeue_wpdm_bootstrap&#039;, 999, 1); function gdsnippet_maybe_dequeue_wpdm_bootstrap($disabled_scripts) { if (!is_array($disabled_scripts)) { $disabled_scripts = []; } \/\/ Bail early checks. if ( in_array(&#039;wpdm &#8211; frontend &#8211; js&#039;, $disabled_scripts, true) || !function_exists(&#039;is_uwp_page&#039;) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[200,201,202],"article\/categories":[40,7],"class_list":["post-138","gd_place","type-gd_place","status-publish","hentry","gd_place_tags-download-manager","gd_place_tags-conflict","gd_place_tags-bootstrap","gd_placecategory-code-snippets","gd_placecategory-tips-tricks-more"],"_links":{"self":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"author":[{"embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/comments?post=138"}],"version-history":[{"count":0,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/138\/revisions"}],"wp:attachment":[{"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/media?parent=138"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/tags?post=138"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/userswp.io\/documentation\/wp-json\/wp\/v2\/article\/categories?post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}