Changeset 872334
- Timestamp:
- 03/09/2014 06:45:24 PM (12 years ago)
- Location:
- roost-for-bloggers
- Files:
-
- 21 added
- 6 edited
-
tags/2.0.3 (added)
-
tags/2.0.3/layout (added)
-
tags/2.0.3/layout/admin.php (added)
-
tags/2.0.3/layout/css (added)
-
tags/2.0.3/layout/css/rooststyle.css (added)
-
tags/2.0.3/layout/images (added)
-
tags/2.0.3/layout/images/coming-soon.png (added)
-
tags/2.0.3/layout/images/roost-arrow.png (added)
-
tags/2.0.3/layout/images/roost-icon-25.png (added)
-
tags/2.0.3/layout/images/roost-red-logo.png (added)
-
tags/2.0.3/layout/images/roost_logo.png (added)
-
tags/2.0.3/layout/images/roost_thumb.png (added)
-
tags/2.0.3/layout/images/stats-placeholder.png (added)
-
tags/2.0.3/layout/js (added)
-
tags/2.0.3/layout/js/roostGoogleFont.js (added)
-
tags/2.0.3/layout/js/roostjs.js (added)
-
tags/2.0.3/layout/js/roostscript.js (added)
-
tags/2.0.3/license.txt (added)
-
tags/2.0.3/readme.txt (added)
-
tags/2.0.3/roost.php (added)
-
trunk/layout/admin.php (modified) (4 diffs)
-
trunk/layout/css/rooststyle.css (modified) (2 diffs)
-
trunk/layout/images/roost-icon-25.png (added)
-
trunk/layout/js/roostjs.js (modified) (1 diff)
-
trunk/layout/js/roostscript.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (6 diffs)
-
trunk/roost.php (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
roost-for-bloggers/trunk/layout/admin.php
r857237 r872334 19 19 <?php if ($roostServerSettings['hasLogo'] == true) { ?> 20 20 <img src="http://get.roost.me/api/device/logo?appKey=<?php echo($roostSettings['appKey']); ?>" /> 21 <?php } else { ?> 22 <img src="<?php echo ROOST_URL; ?>layout/images/roost-icon-25.png" /> 21 23 <?php } ?> 24 <span class="roostTip">This is your Roost account logo. It will be shown to your users at the time of registration and when notifications are sent. You can set it by visiting the Roost dashboard.</span> 25 22 26 </span> 23 27 <?php echo $roostSettings['username'] ?> … … 44 48 <div class="roost-primary-heading"> 45 49 <span class="roost-primary-cta">Welcome! Log in to your Roost account below.</span> 46 <span class="roost-secondary-cta">If you don’t have a Roost account <a href="https://get.roost.me/signup?returnURL=<?php echo admin_url('admin.php?page=roost-for-bloggers/roost.php'); ?>&websiteURL=<?php echo site_url(); ?> " target="_blank">sign up for free!</a></span>50 <span class="roost-secondary-cta">If you don’t have a Roost account <a href="https://get.roost.me/signup?returnURL=<?php echo admin_url('admin.php?page=roost-for-bloggers/roost.php'); ?>&websiteURL=<?php echo site_url(); ?>&source=wpplugin" target="_blank">sign up for free!</a></span> 47 51 </div> 48 52 <div class="roost-section-content"> … … 171 175 <div class="roost-label">Notification text:</div> 172 176 <div class="roost-input-wrapper"> 173 <input name="manualtext" type="text" class="type-text roost-control-secondary" value="" size="50" /> 177 <span id="roostManualNoteCount">70</span> 178 <input name="manualtext" type="text" class="type-text roost-control-secondary" id="roostManualNote" value="" size="50" /> 174 179 <span class="roost-input-caption">Enter the text for the notification you would like to send your subscribers.</span> 175 180 </div> … … 228 233 <!--END SETTINGS SECTION--> 229 234 </form> 230 </div> 235 <div id="roostSupportTag">Have Questions, Comments, or Need a Hand? Hit us up at <a href="mailto:[email protected]" target="_blank">[email protected]</a> We're Here to Help.</div> 236 </div> 231 237 <script> 232 238 <?php if(isset($roostSites)){ ?> -
roost-for-bloggers/trunk/layout/css/rooststyle.css
r857237 r872334 505 505 #roostUserLogo img { 506 506 border-radius: 3px; 507 cursor: pointer; 507 508 } 508 509 … … 545 546 font-size: 30px; 546 547 } 548 549 #roostManualNoteCount { 550 display: block; 551 position: absolute; 552 right: 11px; 553 top: 5px; 554 font-weight: 700; 555 color: #CCCCCC; 556 } 557 558 #roostManualNoteCount.roostWarning { 559 color: #D54E21; 560 } 561 .roostTip { 562 position: absolute; 563 background-color: #ffffff; 564 width: 250px; 565 padding: 10px; 566 color: #666666; 567 font-size: 11px; 568 font-family: 'Open Sans', sans-serif; 569 font-weight: 300; 570 text-align: left; 571 z-index: 10; 572 left: -100px; 573 top: 35px; 574 display: none; 575 } 576 577 #roostUserLogo img:hover + .roostTip { 578 display: block; 579 } 580 581 #roostSupportTag { 582 text-align: center; 583 text-decoration: underline; 584 } -
roost-for-bloggers/trunk/layout/js/roostjs.js
r803517 r872334 1 1 var _roost = _roost || []; 2 _roost.push(['appkey', roostjsParams.appkey]);2 _roost.push(['appkey', pushNotificationsByRoostMe.appkey]); 3 3 4 4 !function(d,s,id){ -
roost-for-bloggers/trunk/layout/js/roostscript.js
r843358 r872334 1 1 jQuery(document).ready(function($) { 2 $('.roost-section-expansion').on('click', function() {2 $('.roost-section-expansion').on('click', function() { 3 3 $(this).toggleClass('collapsed'); 4 4 $(this).parent().find('.roost-section-content').slideToggle(200); … … 7 7 $('#rooster-status').css('display', 'none'); 8 8 }) 9 10 var roostInput = $('#roostManualNote'); 11 var roostCount = $('#roostManualNoteCount'); 12 var roostLimit = 70; 13 14 roostInput.keyup(function() { 15 var n = this.value.replace(/{.*?}/g, '').length; 16 if ( n > roostLimit ) { 17 this.value = this.value.substr(0, this.value.length + roostLimit - n); 18 n = roostLimit; 19 } 20 if ( n > ( roostLimit - 11 ) ){ 21 if(!roostCount.hasClass('roostWarning')){ 22 roostCount.addClass('roostWarning'); 23 } 24 } else if ( n < roostLimit - 10 ) { 25 if(roostCount.hasClass('roostWarning')){ 26 roostCount.removeClass('roostWarning'); 27 } 28 } 29 roostCount.text( 70 - n ); 30 }).triggerHandler('keyup'); 9 31 }); -
roost-for-bloggers/trunk/readme.txt
r857237 r872334 1 1 === Roost Web Push === 2 2 Contributors: noticesoftware 3 Tags: push, safari push, osx, notifications, push notifications, alerts, website notifications, web alerts, roost, alert rocket, web push, mobile website push notification, safari web push, desktop push notification, OS X Mavericks, desktop push, safari, OS X, Mavericks, mac, apple 3 Tags: push, safari push, osx, notifications, push notifications, alerts, website notifications, web alerts, roost, alert rocket, web push, mobile website push notification, safari web push, desktop push notification, OS X Mavericks, desktop push, safari, OS X, Mavericks, mac, apple, news, services 4 4 Requires at least: 3.0 5 5 Tested up to: 3.8.1 6 Stable tag: 2.0. 26 Stable tag: 2.0.3 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 Push Plugin Features: 17 17 18 * *NEW* Safari Web Push (Desktop Push Notifications) on OS X Mavericks 19 * Detailed analytics provided through the Roost dashboard 20 * Auto notifications when creating a new post 21 * Optional mobile push solution 18 * **Safari Web Push** - Take advantage of web push (Desktop Push Notifications) on OS X Mavericks. 19 * **Detailed Analytics** - Real-Time stats straight within your WordPress dashboard. 20 * **Auto Notifications** - We take the work out of it. Automatically send notifications to your readers when creating a new post. 21 * **Scheduled Post Notifications** - Not posting now? Don't worry. Your alerts will go out when your content posts. 22 * **Optional mobile push solution** - Fully supported solution to send push not only to desktop, but mobile devices. 22 23 23 Free Roost For Bloggers account included.24 **Free** Roost account included. No setup fees, no surprises, and no limititations on your site visitors. 24 25 25 26 == Installation == … … 55 56 56 57 **Mobile Push Support** 57 To enable mobile push support, check the box. The Roost Header bar, will be inserted onto your page. You can also insert the Roost Bar onto your theme pages with this shortcode: 58 [RoostBar] 59 60 **Roost Buttons** 61 Two button types are available, a social-style button and a mobile-style button. These need to be manually put into your theme templates or used on individual posts. We tried to make it as easy as possible... 62 63 To use the Roost social button, simply place this shortcode into your content: 64 [Roost] 65 66 The mobile style button is generated by using this shortcode: 67 [RoostMobile] 68 69 **Notes** 70 The Roost JS is inserted into the footer via the *wp_footer()* function. If your theme does not use this function, you will need to manually copy / paste the Roost JS code snippet. 58 To enable mobile push support, check the box. The Roost Header bar, will be inserted onto your page. 71 59 72 60 == Frequently Asked Questions == 61 62 = What does Roost For Bloggers cost? = 63 **It's free!** No setup fees, no surprises, no limititations on your site visitors or subscribers. 64 65 = Free? Really? What's the catch? = 66 No catch! We believe in providing a great service and making it accessible to everyone. So... It's free. (Up to 1,000,000 messages. If you hit that... We'll need to talk.) 73 67 74 68 = Is it really this easy to use Safari Web Push on my site? = … … 87 81 Nope. We have a patent-pending *zero-configuration* installation process for the Roost app. When a person hits your subscription link, the are sent to the Roost page on their device's app store, and prompted for install. Once installed and opened, a person is sent directly back to the page they were viewing on your site. 88 82 89 = Is Roost only for iOS (or only for Android) =90 Roost is available for both Apple iOS and Google Android.91 92 = What does Roost For Bloggers cost? =93 It's free!94 95 = Free? Really? What's the catch? =96 No catch! We believe in providing a great service and making it accessible to everyone. So... It's free. (Up to 1,000,000 messages. If you hit that... We'll need to talk.)97 98 83 99 84 == Screenshots == … … 103 88 104 89 == Changelog == 90 91 = 2.0.3 = 92 * Scheduled Notifications can now Trigger Alerts 93 * Fixed Stats Error on First Login 94 * Character Count on Manual Notifications 105 95 106 96 = 2.0.2 = … … 134 124 == Upgrade Notice == 135 125 126 = 2.0.3 = 127 * Now with support for Scheduled Notifications! Bam! Oh, and some bugfixes and other cool stuff. 128 136 129 = 2.0.2 = 137 130 * Corrected Total Time On Site calculation -
roost-for-bloggers/trunk/roost.php
r857237 r872334 4 4 Plugin URI: http://www.roost.me/ 5 5 Description: Drive traffic to your website with Safari Mavericks push notifications and Roost. 6 Version: 2.0. 26 Version: 2.0.3 7 7 Author: Roost.me 8 8 Author URI: http://www.roost.me/ … … 29 29 define('ROOST_URL', plugin_dir_url(__FILE__)); 30 30 global $roostVersion; 31 $roostVersion = "2.0. 2";31 $roostVersion = "2.0.3"; 32 32 33 33 register_activation_hook(__FILE__, 'roostInit'); … … 38 38 add_action('wp_enqueue_scripts', 'roostLoadScripts'); 39 39 add_action('publish_post', 'roostMe'); 40 add_action('future_to_publish', 'roostMeScheduled'); 40 41 add_action('post_submitbox_misc_actions', 'roostOverride'); 41 42 add_action('wp_head', 'roostByLine', 1); 42 43 add_shortcode('RoostBar', 'roostBar'); 43 add_action( 'save_post', 'roostSavePost' ); 44 45 add_shortcode('RoostBar', 'roostBar'); 44 46 add_shortcode('Roost', 'roostBtn'); 45 47 add_shortcode('RoostMobile', 'roostmBtn'); … … 134 136 function roostUninstall(){ 135 137 delete_option('roost_settings'); 138 delete_post_meta_by_key( 'roostOverride' ); 136 139 } 137 140 … … 153 156 } 154 157 function roostAdminSS() { 155 wp_enqueue_style( 'rooststyle', ROOST_URL . 'layout/css/rooststyle.css', '', '2.0' ); 156 wp_enqueue_script( 'roostscript', ROOST_URL . 'layout/js/roostscript.js', array('jquery') ); 158 global $roostVersion; 159 wp_enqueue_style( 'rooststyle', ROOST_URL . 'layout/css/rooststyle.css', '', $roostVersion ); 160 wp_enqueue_script( 'roostscript', ROOST_URL . 'layout/js/roostscript.js', array('jquery'), $roostVersion ); 157 161 } 158 162 … … 192 196 'remoteContent' => json_encode($remoteContent) 193 197 ); 194 return roostRemoteRequest($remoteData); 198 $loggedIntoRoost = roostDecodeData($remoteData); 199 return $loggedIntoRoost; 195 200 } 196 201 … … 214 219 } 215 220 221 function roostSavePost( $post_ID ) { 222 if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { 223 return false; 224 } elseif (isset($_POST['post_status'])) { 225 $roostNoNote = get_post_meta($post_ID, 'roostOverride', true); 226 if (isset($_POST['roostOverride']) && !$roostNoNote) { 227 $roostOverrideSetting = $_POST['roostOverride']; 228 add_post_meta($post_ID, 'roostOverride', $roostOverrideSetting, true); 229 } elseif (!isset($_POST['roostOverride']) && $roostNoNote) { 230 delete_post_meta($post_ID, 'roostOverride'); 231 } 232 } 233 } 234 216 235 function roostFilterString($string) { 217 $string = str_replace('“', '"', $string); 218 $string = str_replace('”', '"', $string); 219 $string = str_replace('‘', ''', $string); 220 $string = str_replace('’', ''', $string); 221 $string = str_replace('–', '-', $string); 222 $string = str_replace('—', '-', $string); 223 return html_entity_decode($string, ENT_QUOTES); 224 } 225 226 function roostMe($post_ID){ 236 $string = str_replace('“', '"', $string); 237 $string = str_replace('”', '"', $string); 238 $string = str_replace('‘', ''', $string); 239 $string = str_replace('’', ''', $string); 240 $string = str_replace('–', '-', $string); 241 $string = str_replace('—', '-', $string); 242 $string = str_replace('′', ''', $string); 243 $string = str_replace('…', '...', $string); 244 return html_entity_decode($string, ENT_QUOTES); 245 } 246 247 function roostMe($post_ID){ 227 248 $roostSettings = get_option('roost_settings'); 228 249 $appKey = $roostSettings['appKey']; 229 250 $appSecret = $roostSettings['appSecret']; 230 251 $autoPush = $roostSettings['autoPush']; 252 $roostNoNote = get_post_meta($post_ID, 'roostOverride', true); 231 253 if (isset($_POST['roostOverride'])) { 232 254 $roostOverride = $_POST['roostOverride']; … … 235 257 if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) ) { 236 258 $siteurl = get_option('siteurl'); 237 $alert = roostFilterString(get_the_title($post_ID));259 $alert = get_the_title($post_ID); 238 260 $url = $siteurl . "/?p=" . $post_ID; 239 261 if ( has_post_thumbnail($post_ID)) { … … 247 269 } 248 270 } 249 250 function roostOverride(){ 271 272 function roostMeScheduled($post){ 273 $post_ID = $post->ID; 274 $roostSettings = get_option('roost_settings'); 275 $appKey = $roostSettings['appKey']; 276 $appSecret = $roostSettings['appSecret']; 277 $autoPush = $roostSettings['autoPush']; 278 $roostOverride = get_post_meta($post_ID, 'roostOverride', true); 279 if ($autoPush == 1 && strlen($appKey) > 0 && empty($roostOverride)) { 280 $siteurl = get_option('siteurl'); 281 $alert = get_the_title($post_ID); 282 $url = $siteurl . "/?p=" . $post_ID; 283 if ( has_post_thumbnail($post_ID)) { 284 $rawImage = wp_get_attachment_image_src(get_post_thumbnail_id($post_ID)); 285 $imageURL = $rawImage[0]; 286 } else { 287 $imageURL = false; 288 } 289 roostSendNotification($alert, $url, $imageURL, $appKey, $appSecret); 290 } 291 } 292 293 function roostOverride($post){ 294 global $post; 295 if ( 'publish' == $post->post_status ) { 296 $roostCheckHide = true; 297 } 251 298 $roostSettings = get_option('roost_settings'); 252 299 $appKey = $roostSettings['appKey']; 253 300 $autoPush = $roostSettings['autoPush']; 254 $roost_page_status = get_post_status(get_the_ID()); 255 if((strlen($appKey) > 1) && ($autoPush == 1) && ($roost_page_status == 'auto-draft') || ($roost_page_status == 'draft')){ 256 echo '<div class="misc-pub-section misc-pub-section-last" id="roost-override">' 257 . '<label><input type="checkbox" value="1" id="roostOverrideCheckbox" name="roostOverride" /> <strong>Do NOT</strong> send notification with <strong>Roost</strong></label>' 258 .'</div>' 259 ."<script>jQuery('.save-timestamp').on('click', function() {setTimeout(function(){var text = jQuery('#timestamp').text(); text = text.slice(0, text.indexOf(' ')); if(text === 'Schedule') { jQuery('#roost-override').hide(); jQuery('#roostOverrideCheckbox').prop('checked', true);} else { jQuery('#roost-override').show(); jQuery('#roostOverrideCheckbox').prop('checked', false);}}, 250);});</script>"; 301 $pid = get_the_ID(); 302 $roostOverrideChecked = get_post_meta($pid, 'roostOverride', true); 303 if(strlen($appKey) > 1 && $autoPush == 1){ 304 printf('<div class="misc-pub-section misc-pub-section-last" id="roost-override" %s >', (isset($roostCheckHide)) ? "style='display:none;'":""); 305 printf('<label><input type="checkbox" value="1" id="roostOverrideCheckbox" name="roostOverride" %s />', (!empty($roostOverrideChecked)) ? "checked":""); 306 echo '<strong>Do NOT</strong> send notification with <strong>Roost</strong></label>'; 307 echo '</div>'; 260 308 } 261 309 } 262 310 263 311 function roostSendNotification($alert, $url, $imageURL, $appKey, $appSecret) { 264 $remoteContent = array( 312 $alert = roostFilterString($alert); 313 $remoteContent = array( 265 314 'alert' => $alert 266 315 ); … … 278 327 'remoteContent' => json_encode($remoteContent) 279 328 ); 280 return roostRemoteRequest($remoteData); 329 $response = roostDecodeData($remoteData); 330 return $response; 281 331 } 282 332 … … 314 364 } 315 365 366 function roostDecodeData($remoteData) { 367 $xfer = roostRemoteRequest($remoteData); 368 $nxfer = wp_remote_retrieve_body($xfer); 369 $lxfer = json_decode($nxfer, true); 370 return $lxfer; 371 } 372 316 373 function getRoostServerSettings($appKey, $appSecret) { 317 374 $remoteData = array( … … 322 379 'remoteContent' => '' 323 380 ); 324 return json_decode(wp_remote_retrieve_body(roostRemoteRequest($remoteData)), true); 381 $roostServerSettings = roostDecodeData($remoteData); 382 return $roostServerSettings; 325 383 } 326 384 … … 333 391 'remoteContent' => '' 334 392 ); 335 return json_decode(wp_remote_retrieve_body(roostRemoteRequest($remoteData)), true); 336 } 337 393 $roostServerStats = roostDecodeData($remoteData); 394 return $roostServerStats; 395 } 396 397 function roostCompleteLogin($formKeys) { 398 roostUpdateKeys($formKeys); 399 $status = '<span class="roost-os-bold">Welcome to Roost!</span> The plugin is up and running and visitors to your site using Safari on OS X Mavericks are currently being prompted to subscribe for push notifications. Once you have subscribers you\'ll be able see recent activity, all-time stats, and send manual push notifications. If you have questions or need support, just email us at <a href="mailto:[email protected]" target="_blank">[email protected]</a>.'; 400 return $status; 401 } 402 338 403 function roostAdminMenuList() { 339 404 $roostSettings = get_option('roost_settings'); … … 351 416 $roostUser = $_POST['roostuserlogin']; 352 417 $roostPass = $_POST['roostpasslogin']; 353 $logginIntoRoost = json_decode(wp_remote_retrieve_body(roostLogin($roostUser, $roostPass)), true);418 $logginIntoRoost = roostLogin($roostUser, $roostPass); 354 419 if ($logginIntoRoost['success'] === true) { 355 420 roostSaveUsername($roostUser); … … 361 426 "appSecret" => $logginIntoRoost['apps'][0]['secret'] 362 427 ); 363 roostUpdateKeys($formKeys); 364 $status = '<span class="roost-os-bold">Welcome to Roost!</span> The plugin is up and running and visitors to your site using Safari on OSX Mavericks are currently being prompted to subscribe for push notifications. Once you have subscribers you\'ll be able see recent activity, all-time stats about your subscribers, and send manual push notifications to your subscribers.'; 428 429 $appKey = $formKeys['appKey']; 430 $appSecret = $formKeys['appSecret']; 431 432 $roostServerSettings = getRoostServerSettings($appKey, $appSecret); 433 $roostStats = getRoostStats($appKey, $appSecret); 434 $status = roostCompleteLogin($formKeys); 365 435 } 366 436 } else { … … 368 438 } 369 439 } 370 440 371 441 if (isset($_POST['roostconfigselect'])) { 372 442 $roostSelectedSite = $_POST['roostsites']; … … 378 448 "appSecret" => $roostSiteSecret 379 449 ); 380 roostUpdateKeys($formKeys); 381 $status = '<span class="roost-os-bold">Welcome to Roost!</span> The plugin is up and running and visitors to your site using Safari on OSX Mavericks are currently being prompted to subscribe for push notifications. Once you have subscribers you\'ll be able see recent activity, all-time stats about your subscribers, and send manual push notifications to your subscribers.'; 382 } 383 450 451 $appKey = $formKeys['appKey']; 452 $appSecret = $formKeys['appSecret']; 453 454 $roostServerSettings = getRoostServerSettings($appKey, $appSecret); 455 $roostStats = getRoostStats($appKey, $appSecret); 456 $status = roostCompleteLogin($formKeys); 457 } 458 384 459 if (isset($_POST['clearkey'])) { 385 460 $formKeys = array( … … 393 468 } 394 469 395 if (isset($_POST['savesettings'])) { 396 $formData = array( 397 "autoPush" => $_POST['autoPush'] 398 ); 399 roostUpdateSettings($formData); 400 470 if (isset($_POST['savesettings'])) { 471 if (isset($_POST['autoPush'])) { 472 $formData = array( 473 "autoPush" => $_POST['autoPush'] 474 ); 475 roostUpdateSettings($formData); 476 } else { 477 $formData = array( 478 "autoPush" => false 479 ); 480 roostUpdateSettings($formData); 481 } 482 401 483 if (isset($_POST['mobilePush'])) { 402 484 if ($roostServerSettings['roostBarSetting'] != "TOP" || $roostServerSettings['roostBarSetting'] != "BOTTOM") { … … 448 530 $manualLink = 'http://' . $manualLink; 449 531 } 450 $msgStatus = json_decode(wp_remote_retrieve_body(roostSendNotification($manualText, $manualLink, false, $appKey, $appSecret)), true);532 $msgStatus = roostSendNotification($manualText, $manualLink, false, $appKey, $appSecret); 451 533 if ($msgStatus['success'] === true) { 452 534 $status = 'Message Sent.'; … … 461 543 462 544 function roostLoadScripts() { 463 $roostSettings = get_option('roost_settings'); 545 global $roostVersion; 546 $roostSettings = get_option('roost_settings'); 464 547 $appKey = $roostSettings['appKey']; 465 548 if ($appKey && !is_admin()) { 466 wp_enqueue_script( 'roostjs', ROOST_URL . 'layout/js/roostjs.js', array('jquery'), false, true );467 wp_localize_script( 'roostjs', ' roostjsParams', array( 'appkey' => $appKey) );549 wp_enqueue_script( 'roostjs', ROOST_URL . 'layout/js/roostjs.js', array('jquery'), $roostVersion, false ); 550 wp_localize_script( 'roostjs', 'pushNotificationsByRoostMe', array( 'appkey' => $appKey) ); 468 551 } 469 552 if(is_admin()){ 470 wp_enqueue_script( 'roostGoogleFont', ROOST_URL . 'layout/js/roostGoogleFont.js', '', false, false );553 wp_enqueue_script( 'roostGoogleFont', ROOST_URL . 'layout/js/roostGoogleFont.js', '', $roostVersion, false ); 471 554 } 472 555 }
Note: See TracChangeset
for help on using the changeset viewer.