functions.php
48 lines
| 1 | <?php |
| 2 | |
| 3 | function set_popover_url($base) { |
| 4 | |
| 5 | global $popover_url; |
| 6 | |
| 7 | if(defined('WPMU_PLUGIN_URL') && defined('WPMU_PLUGIN_DIR') && file_exists(WPMU_PLUGIN_DIR . '/' . basename($base))) { |
| 8 | $popover_url = trailingslashit(WPMU_PLUGIN_URL); |
| 9 | } elseif(defined('WP_PLUGIN_URL') && defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/popover/' . basename($base))) { |
| 10 | $popover_url = trailingslashit(WP_PLUGIN_URL . '/popover'); |
| 11 | } else { |
| 12 | $popover_url = trailingslashit(WP_PLUGIN_URL . '/popover'); |
| 13 | } |
| 14 | |
| 15 | } |
| 16 | |
| 17 | function set_popover_dir($base) { |
| 18 | |
| 19 | global $popover_dir; |
| 20 | |
| 21 | if(defined('WPMU_PLUGIN_DIR') && file_exists(WPMU_PLUGIN_DIR . '/' . basename($base))) { |
| 22 | $popover_dir = trailingslashit(WPMU_PLUGIN_URL); |
| 23 | } elseif(defined('WP_PLUGIN_DIR') && file_exists(WP_PLUGIN_DIR . '/popover/' . basename($base))) { |
| 24 | $popover_dir = trailingslashit(WP_PLUGIN_DIR . '/popover'); |
| 25 | } else { |
| 26 | $popover_dir = trailingslashit(WP_PLUGIN_DIR . '/popover'); |
| 27 | } |
| 28 | |
| 29 | |
| 30 | } |
| 31 | |
| 32 | function popover_url($extended) { |
| 33 | |
| 34 | global $popover_url; |
| 35 | |
| 36 | return $popover_url . $extended; |
| 37 | |
| 38 | } |
| 39 | |
| 40 | function popover_dir($extended) { |
| 41 | |
| 42 | global $popover_dir; |
| 43 | |
| 44 | return $popover_dir . $extended; |
| 45 | |
| 46 | |
| 47 | } |
| 48 | ?> |