Changeset 789075
- Timestamp:
- 10/17/2013 04:05:59 AM (12 years ago)
- Location:
- captain-up/trunk
- Files:
-
- 3 edited
-
README.md (modified) (1 diff)
-
captainup.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
captain-up/trunk/README.md
r751697 r789075 95 95 ## Changelog 96 96 97 ###### 1.4.1 98 99 * Support for WordPress 3.6.1 100 101 * Better indication of a successful install. 102 103 * Fixed issue with `cptup_widgets_edit.js`. 104 97 105 ###### 1.4.0 98 106 -
captain-up/trunk/captainup.php
r751697 r789075 4 4 Plugin URI: http://www.captainup.com 5 5 Description: Add Game Mechanics to your site and increase your engagement and retention. 2 minutes install: Simply add your free Captain Up API Key and you are good to go. The plugin also adds widgets you can use to show leaderboards and activities within your site. 6 Version: 1.4. 06 Version: 1.4.1 7 7 Author: Captain Up Team 8 8 License: GPL2 … … 15 15 16 16 if (isset($_POST['submit'])) { 17 18 // Mark whether this is a new install of Captain Up. We'll 19 // later display different messages based on this. 20 if (get_option('captain-api-key') == "") { 21 update_option('captain-first-install', true); 22 } else { 23 update_option('captain-first-install', false); 24 } 25 17 26 // Save the Captain Up options on POST 18 27 update_option('captain-api-key', $_POST['captain-api-key']); … … 33 42 } 34 43 35 if(isset($_GET['submitted'])) {36 echo "<div id='update' class='updated'><p>Settings updated.</p></div>\n";37 }38 39 44 // Get the Captain Up API Key 40 45 $captain_api_key = get_option('captain-api-key'); … … 45 50 // Get the Captain Up Locale 46 51 $captain_locale = get_option('captain-locale'); 52 53 // Get the first-install status 54 $captain_first_install = get_option('captain-first-install'); 55 56 // Add a message to the page, indicating that the form has 57 // been submitted successfully, either (1) For enabling 58 // Captain Up (2) Disabling Captain Up or (3) For changing 59 // the settings. 60 if (isset($_GET['submitted'])) { 61 if ($captain_first_install == true && $captain_api_key != "") { 62 echo "<div id='update' class='updated'><p>Rock on! Captain Up is now available on your site, <a target='_blank' href='".get_home_url()."'>go check it out ⇒</a></p></div>\n"; 63 } else if ($captain_api_key == "") { 64 echo "<div id='update' class='updated'>". 65 "<p>Captain Up has been <em>disabled</em>. If any problem ". 66 "occured or you have any questions, ". 67 "<a href='mailto:team@captainup.com'>". 68 "contact our support team</a></p></div>\n"; 69 } else { 70 echo "<div id='update' class='updated'><p>Your settings have been updated, <a target='_blank' href='".get_home_url()."'>see how everything looks ⇒</a></p></div>\n"; 71 } 72 } 47 73 48 74 $pwd = dirname(__FILE__) . '/'; # Plugin Directory … … 166 192 function cptup_settings_files($page) { 167 193 // I swear to god this is what Wordpress Codex suggests to do 168 if ($page != "toplevel_page_cptup-config-menu") { 169 return; 170 } 194 if ($page != "toplevel_page_cptup-config-menu") return; 195 171 196 // Add the scripts 172 197 wp_enqueue_style('cpt-css'); … … 276 301 // Enqueue scripts to handle editing the Widgets options in 277 302 # the widgets admin panel tab. 278 function widgets_edit_script() { 279 wp_enqueue_script( 280 'cptup_widgets_edit', 281 plugins_url('/js/cptup_widgets_edit.js', __FILE__), 282 array('jquery') 283 ); 284 } 285 add_action('widgets_init', 'widgets_edit_script'); 303 function widgets_edit_script($hook) { 304 // Only enqueue the script in the widgets tab 305 if('widgets.php' != $hook) return; 306 307 wp_enqueue_script( 308 'cptup_widgets_edit', 309 plugins_url('/js/cptup_widgets_edit.js', __FILE__), 310 array('jquery') 311 ); 312 } 313 add_action('admin_enqueue_scripts', 'widgets_edit_script'); 286 314 287 315 -
captain-up/trunk/readme.txt
r751697 r789075 3 3 Tags: game-mechanics,captainup,gamification,engagement,comments,widget,plugin,twitter,facebook,google 4 4 Requires at least: 3.0.1 5 Tested up to: 3.6. 05 Tested up to: 3.6.1 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 116 116 == Changelog == 117 117 118 = 1.4.1 = 119 120 * Support for WordPress 3.6.1 121 122 * Better indication of a successful install. 123 124 * Fixed issue with `cptup_widgets_edit.js`. 125 118 126 = 1.4.0 = 119 127
Note: See TracChangeset
for help on using the changeset viewer.