{"id":6825010,"date":"2015-12-08T17:27:46","date_gmt":"2015-12-08T17:27:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/front-end-scripts\/"},"modified":"2016-08-30T21:05:37","modified_gmt":"2016-08-30T21:05:37","slug":"front-end-scripts","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/front-end-scripts\/","title":{"rendered":"Front End Scripts"},"content":{"rendered":"<p>Thanks for this plugin &#8211; finding it really useful.<\/p>\n<p>I have noticed that <code>wp-gallery-custom-links.js<\/code> is being enqueued using the <code>wp_enqueue_script<\/code> action. It would appear that this file is only needed in the admin area for the gallery user interface as if I disable JS on the front end the gallery custom inks still work.<\/p>\n<p>Therefore would it not make more sense to load this script using the <code>admin_enqueue_scripts<\/code> action hook instead and therefore reduce the HTTP calls of the front-end for what seems like a not needed script.<\/p>\n<p>Obviously please correct me if I am wrong and thanks for taking the time.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/wp-gallery-custom-links\/<\/p>\n","protected":false},"template":"","class_list":["post-6825010","topic","type-topic","status-publish","hentry","topic-tag-admin_enqueue_scripts","topic-tag-wp_enqueue_scripts"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6825010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6825010\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6825010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}