{"action":"created","issue":{"url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate/issues/469","repository_url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate","labels_url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate/issues/469/comments","events_url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate/issues/469/events","html_url":"https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/issues/469","id":295856910,"number":469,"title":"[CSS Enqueue Issue] Enqueue CSS to the header, but only on pages where my short-code is called.","user":{"login":"Terminal-Access","id":6170786,"avatar_url":"https://avatars0.githubusercontent.com/u/6170786?v=4","gravatar_id":"","url":"https://api.github.com/users/Terminal-Access","html_url":"https://github.com/Terminal-Access","followers_url":"https://api.github.com/users/Terminal-Access/followers","following_url":"https://api.github.com/users/Terminal-Access/following{/other_user}","gists_url":"https://api.github.com/users/Terminal-Access/gists{/gist_id}","starred_url":"https://api.github.com/users/Terminal-Access/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terminal-Access/subscriptions","organizations_url":"https://api.github.com/users/Terminal-Access/orgs","repos_url":"https://api.github.com/users/Terminal-Access/repos","events_url":"https://api.github.com/users/Terminal-Access/events{/privacy}","received_events_url":"https://api.github.com/users/Terminal-Access/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-09T12:36:03Z","updated_at":"2018-02-09T15:58:05Z","closed_at":null,"author_association":"NONE","body":"Hey Guys, \r\n\r\nI've written a Carousel slider that grabs products from WooCommerce and displays them via short-code on any page/widget or post that you require them on (It's visually based on the Woo Carousel available in the Avada Theme).\r\n\r\nWith the following options:\r\n**Carousel Layout**:  Title & price on Rollover / Rollover alt Image (no title or price)\r\n**Carousel Autoplay:** On/Off\r\n**Scroll Items:** 1-5\r\n**Product Order Sorting:** Ascending order / Randomized Order (default is random)\r\n**Category Black List:** self-explanatory.\r\n**Number of Products:**  Total number of products to be pulled.\r\n**Show Out of Stock Products:**  Yes / No\r\n\r\n**Responsive Design:** yes\r\n  **Items displayed at one time:**\r\n    Mobile: 1\r\n    Tablet: 3\r\n    Desktop: 5\r\n\r\nI'm getting on really well with my little plugin now, its working 98% the way I had planned, kicking the bugs out of my code and learning as I go, always nice when I learn something new!\r\n\r\nI have stumbled into a problem that I've been working hard to overcome for the past 24 hours but just can't seem to crack.\r\n\r\n**Brief Description:**\r\nMy CSS is being enqueued in the footer, after my carousel code, rather than the header, causing a momentary graphical bug where the carousel loads and displays its data prior to the website reading and applying my CSS style. \r\n\r\n**Detailed Description:**\r\n\r\nAs I've recently come to understand by default WordPress-Plugin-Boilerplate enqueues all CSS and JavaScript by using the standard WordPress  \"enqueue_script / enqueue_style\" functions.\r\n\r\nFurther to this I have recently discovered that by default design WordPress enqueue's files globally site-wide rather than on an \"as needed basis\", this seems backwards and a very bad practice to me but that just my humble opinion.\r\n\r\nBy following a few tutorials found via google, I have managed to alter the plugin so that the Styles and JavaScript are now loaded on an \"as needed basis\" however this has lead to the problem briefly described above.\r\n\r\n My CSS is being enqueued in the footer, after my carousel code, rather than the header, causing a momentary graphical bug where the carousel loads and displays its data prior to the website reading and applying my CSS style.\r\n\r\nFrom doing a little research I've come to the understanding that this is caused due to a fairly recent change in the way WordPress handles enqueueing files after the initial page load has begun, Cheers WordPress thanks for making it just a bit harder!\r\n\r\nI'm looking for any insight into how I can go about having my CSS be placed into the header without falling back to globally enqueueing that particular file.\r\n\r\nAny and all assistance is as always greatly appreciated.\r\n\r\nWith the kindest of regards\r\nLee.\r\n"},"comment":{"url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate/issues/comments/364474525","html_url":"https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/issues/469#issuecomment-364474525","issue_url":"https://api.github.com/repos/DevinVinson/WordPress-Plugin-Boilerplate/issues/469","id":364474525,"user":{"login":"Terminal-Access","id":6170786,"avatar_url":"https://avatars0.githubusercontent.com/u/6170786?v=4","gravatar_id":"","url":"https://api.github.com/users/Terminal-Access","html_url":"https://github.com/Terminal-Access","followers_url":"https://api.github.com/users/Terminal-Access/followers","following_url":"https://api.github.com/users/Terminal-Access/following{/other_user}","gists_url":"https://api.github.com/users/Terminal-Access/gists{/gist_id}","starred_url":"https://api.github.com/users/Terminal-Access/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terminal-Access/subscriptions","organizations_url":"https://api.github.com/users/Terminal-Access/orgs","repos_url":"https://api.github.com/users/Terminal-Access/repos","events_url":"https://api.github.com/users/Terminal-Access/events{/privacy}","received_events_url":"https://api.github.com/users/Terminal-Access/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T15:58:05Z","updated_at":"2018-02-09T15:58:05Z","author_association":"NONE","body":"Thanks, I'll check both of those out!\r\n\r\nThe help is greatly appreciated :D"}}
{"actor":{"display_login":"Terminal-Access"}}