SHARE
TWEET

Untitled

blooglet Apr 26th, 2013 15 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Enqueues a stylesheet handle or an array of stylesheet handles.
  2. function mytheme_enqueueStyle($handles) {
  3.         if (is_array($handles)) {
  4.                 add_action("wp_enqueue_scripts", function() {
  5.                         foreach ($handles as $handle) {
  6.                                 wp_enqueue_style($handle);
  7.                         }
  8.                 });
  9.         } else if (is_string($handles)) {
  10.                 add_action("wp_enqueue_scripts", function() {
  11.                         wp_enqueue_style($handles);
  12.                 });
  13.         } else {
  14.                 wp_die("Unsupported parameter type.");
  15.         }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top