Changeset 621687
- Timestamp:
- 11/06/2012 02:17:44 PM (13 years ago)
- Location:
- wp-quadratum/trunk
- Files:
-
- 9 added
- 16 edited
-
includes/foursquare-helper (added)
-
includes/foursquare-helper/foursquare-helper.php (added)
-
includes/wp-mxn-helper (added)
-
includes/wp-mxn-helper/README.md (added)
-
includes/wp-mxn-helper/sample.php (added)
-
includes/wp-mxn-helper/wp-mxn-helper.php (added)
-
includes/wp-mxn-helper/wp-plugin-base (added)
-
includes/wp-plugin-base (added)
-
includes/wp-plugin-base/wp-plugin-base.php (added)
-
includes/wp-quadratum-admin.php (modified) (9 diffs)
-
includes/wp-quadratum-callback.php (modified) (1 diff)
-
includes/wp-quadratum-frontend.php (modified) (4 diffs)
-
includes/wp-quadratum-widget.php (modified) (1 diff)
-
readme.txt (modified) (6 diffs)
-
screenshot-1.jpg (modified) (previous)
-
screenshot-10.jpg (modified) (previous)
-
screenshot-2.jpg (modified) (previous)
-
screenshot-3.jpg (modified) (previous)
-
screenshot-4.jpg (modified) (previous)
-
screenshot-5.jpg (modified) (previous)
-
screenshot-6.jpg (modified) (previous)
-
screenshot-7.jpg (modified) (previous)
-
screenshot-8.jpg (modified) (previous)
-
screenshot-9.jpg (modified) (previous)
-
wp-quadratum.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-quadratum/trunk/includes/wp-quadratum-admin.php
r580206 r621687 5 5 */ 6 6 7 class WP_QuadratumAdmin extends WP_PluginBase {7 class WP_QuadratumAdmin extends WP_PluginBase_v1_1 { 8 8 private $mxn; 9 9 … … 15 15 16 16 function __construct () { 17 $this->mxn = new WP_MXNHelper ;17 $this->mxn = new WP_MXNHelper_v2_0; 18 18 19 19 self::$tab_names = array ( … … 85 85 wp_enqueue_script ('jquery'); 86 86 $deps = array ('jquery'); 87 wp_enqueue_script ('wp-quadratum-admin-script', WPQUADRATUM_URL . 'js/wp-quadratum-admin.min.js', $deps); 88 //wp_enqueue_script ('wp-quadratum-admin-script', WPQUADRATUM_URL . 'js/wp-quadratum-admin.js', $deps); 87 88 if (WP_DEBUG || WPQUADRATUM_DEBUG) { 89 $js_url = 'js/wp-quadratum-admin.js'; 90 } 91 92 else { 93 $js_url = 'js/wp-quadratum-admin.min.js'; 94 } 95 96 wp_enqueue_script ('wp-quadratum-admin-script', WPQUADRATUM_URL . $js_url, $deps); 89 97 } 90 98 } … … 103 111 wp_enqueue_style ('global'); 104 112 wp_enqueue_style ('wp-admin'); 105 wp_enqueue_style ('wp-quadratum-admin', WPQUADRATUM_URL . 'css/wp-quadratum-admin.min.css'); 106 //wp_enqueue_style ('wp-quadratum-admin', WPQUADRATUM_URL . 'css/wp-quadratum-admin.css'); 113 114 if (WP_DEBUG || WPQUADRATUM_DEBUG) { 115 $css_url = 'css/wp-quadratum-admin.css'; 116 } 117 118 else { 119 $css_url = 'css/wp-quadratum-admin.min.css'; 120 } 121 122 wp_enqueue_style ('wp-quadratum-admin', WPQUADRATUM_URL . $css_url); 107 123 } 108 124 } … … 186 202 $this->admin_upgrade_option ($options, 'cloudmade_key', ''); 187 203 204 case '120': 188 205 $options['version'] = WP_Quadratum::VERSION; 189 206 $upgrade_settings = true; … … 224 241 225 242 $tab = $this->admin_validate_tab (); 226 $providers = WP_MXNHelper::get_supported_providers ();243 $providers = $this->mxn->get_supported_providers (); 227 244 228 245 switch ($tab) { … … 390 407 $client_secret = $options['client_secret']; 391 408 $redirect_url = WP_Quadratum::make_redirect_url (); 392 $fh = new FoursquareHelper ($client_id, $client_secret, $redirect_url);409 $fh = new FoursquareHelper_v1_0 ($client_id, $client_secret, $redirect_url); 393 410 $foursquare_settings[] = '<p class="submit">' 394 411 . '<a href="' . $fh->authentication_link () . '" class="button-primary">' … … 647 664 . '</li>' 648 665 . '<li>' 649 . __('Then ... ask a question on the <a href="http://wordpress.org/ tags/wp-quadratum?forum_id=10">WordPress support forum</a>; this is by far the best way so that other users can follow the conversation.')666 . __('Then ... ask a question on the <a href="http://wordpress.org/support/plugin/wp-quadratum">WordPress support forum</a>; this is by far the best way so that other users can follow the conversation.') 650 667 . '</li>' 651 668 . '<li>' … … 667 684 . '</li>' 668 685 . '<li>' 669 . __('WP Quadratum is both free as in speech and free as in beer . No donations are required; <a href="http://www.vicchi.org/codeage/donate/">here\'s why</a>.')686 . __('WP Quadratum is both free as in speech and free as in beer; <a href="http://www.vicchi.org/codeage/donate/">here\'s why</a>.') 670 687 . '</li>' 671 688 . '</ul>' -
wp-quadratum/trunk/includes/wp-quadratum-callback.php
r580206 r621687 17 17 . '/wp-quadratum-callback.php'; 18 18 19 $fh = new FoursquareHelper ($client_id, $client_secret, $redirect_url);19 $fh = new FoursquareHelper_v1_0 ($client_id, $client_secret, $redirect_url); 20 20 21 21 $token = $fh->get_token ($_GET['code']); -
wp-quadratum/trunk/includes/wp-quadratum-frontend.php
r580206 r621687 5 5 */ 6 6 7 class WP_QuadratumFrontEnd extends WP_PluginBase {7 class WP_QuadratumFrontEnd extends WP_PluginBase_v1_1 { 8 8 private $mxn; 9 9 … … 13 13 14 14 function __construct () { 15 $this->mxn = new WP_MXNHelper ;15 $this->mxn = new WP_MXNHelper_v2_0; 16 16 $this->mxn->register_callback ('cloudmade', array ($this, 'cloudmade_mxn_callback')); 17 17 $this->mxn->register_callback ('nokia', array ($this, 'nokia_mxn_callback')); … … 19 19 20 20 $provider = WP_Quadratum::get_option ('provider'); 21 $this->mxn->set_ providers (array ($provider));21 $this->mxn->set_frontend_providers (array ($provider)); 22 22 23 23 add_shortcode ('wp_quadratum', array ($this, 'shortcode')); … … 134 134 $content[] = '<div id="' . $args['map-id'] . '" class="' . $args['map-class'] . '" style="width:' . $args['width'] . 'px; height:' . $args['height'] . 'px;"></div>'; 135 135 $content[] = '<div class="' . $args['venue-class'] . '">'; 136 $content[] = '<h5>Last seen at <a href="' . $venue_url . '" target="_blank">' . $venue->name . '</a> on ' . date ("d M Y G:i T", $checkin->createdAt) . '</h5>'; 136 137 $params = array ( 138 'venue-url' => $venue_url, 139 'venue-name' => $venue->name, 140 'checked-in-at' => $checkin->createdAt 141 ); 142 143 $strapline = '<h5>Last seen at <a href="' . $venue_url . '" target="_blank">' . $venue->name . '</a> on ' . date ("d M Y G:i T", $checkin->createdAt) . '</h5>'; 144 $content[] = apply_filters ('wp_quadratum_strapline', $strapline, $params); 145 137 146 $content[] = '</div>'; 138 147 $content[] = '</div>'; -
wp-quadratum/trunk/includes/wp-quadratum-widget.php
r580206 r621687 5 5 */ 6 6 7 require_once (WPQUADRATUM_PATH . '/ foursquare-helper/foursquare-helper.php');7 require_once (WPQUADRATUM_PATH . '/includes/foursquare-helper/foursquare-helper.php'); 8 8 9 9 class WP_QuadratumWidget extends WP_Widget { -
wp-quadratum/trunk/readme.txt
r580206 r621687 4 4 Tags: wp-quadratum, maps, map, foursquare, checkins, checkin, widget 5 5 Requires at least: 3.4 6 Tested up to: 3.4. 17 Stable tag: 1. 16 Tested up to: 3.4.2 7 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 28 28 1. Choose the zoom level of the map display. 29 29 1. Choose whether to show private checkins on the map. 30 31 The <em>strapline</em> text containing the venue name, venue URL and timestamp of your last Foursquare checkin can be customised via the plugin's filters. See the *Filter Support And Usage* section for more information. 30 32 31 33 The current version of this plugin allows you to associate a single Foursquare account with your WordPress site; associating multiple Foursquare accounts, one per user account is not currently supported. … … 83 85 Right now, all of these maps providers are supported by Mapstraction but they have issues when the sidebar's widget map is so small (200px by 200px by default). As and when these issues are resolved in Mapstraction, they'll be supported by a future release of the plugin. 84 86 87 = Can I change the format of the strapline that appears under the checkin map? = 88 89 Yes. The `wp_quadratum_strapline` filter is for just this purpose. The filter is passed the default strapline as well as the URL to the Foursquare venue checked in at, the name of the venue and the date and time of the checkin as a UNIX timestamp. See the *Filter Support And Usage* section for more information. 90 85 91 = I want to amend/hack/augment this plugin; can I do the same? = 86 92 … … 110 116 == Changelog == 111 117 112 The current version is 1.1 (2012.07.01) 118 The current version is 1.2.0 (2012.11.06) 119 120 = 1.2 = 121 * Released: 2012.11.06 122 * Added: Support for the `wp_quadratum_strapline` filter. 123 * Added: Enqueue non-minified versions of the plugin's CSS and JS files if WP_DEBUG or WQUADRATUM_DEBUG are defined. 124 * Other: Updated to latest versions of WP_PluginBase and WP_MXNHelper. 125 * Other: Moved all submodule classes/libraries from the plugin's root directory to /includes. 113 126 114 127 = 1.1 = … … 131 144 132 145 == Upgrade Notice == 146 = 1.2 = 147 Adds support for the `wp_quadratum_strapline` filter plus internal housekeeping and library upgrades. 148 133 149 = 1.1 = 134 Adds support for multiple map pr ivders, Internet Explorer map rendering issues and a new shortcode. This is the 4th. version of WP Quadratum.150 Adds support for multiple map providers, Internet Explorer map rendering issues and a new shortcode. This is the 4th. version of WP Quadratum. 135 151 136 152 = 1.0.2 = … … 164 180 165 181 The `zoom` attribute specifies the zoom level to be used when displaying the checkin map. If omitted, the zoom level defaults to a value of `16` which is roughly analogous to a neighbourhood zoom. 182 183 == Filter Support And Usage == 184 185 WP Quadratum supports a single filter, which is described below. 186 187 = wp_quadratum_strapline = 188 189 Applied to the strapline that is displayed via the plugin's widget or shortcode. The strapline is the text that appears immediately below the checkin map. 190 191 *Example:* Change the date and time formatting in the strapline 192 193 `add_filter ('wp_quadratum_strapline', 'format_strapline', 10, 2); 194 function format_strapline ($content, $params) { 195 // $params = array ( 196 // 'venue-url' => '4Sq venue url for checkin', 197 // 'venue-name' => 'checkin venue name', 198 // 'checked-in-at' => 'timestamp of checkin' 199 // ); 200 201 $strapline = '<h5>Last seen at <a href="' . $params['venue-url'] . '" target="_blank">' . $params['venue-name'] . '</a> on ' . date ('l jS \of F Y h:i:s A', $params['checked-in-at']) . '</h5>'; 202 return $strapline; 203 }` -
wp-quadratum/trunk/wp-quadratum.php
r580206 r621687 4 4 Plugin URI: http://www.vicchi.org/codeage/wp-quadratum/ 5 5 Description: A WordPress plugin to display your last Foursquare checkin as a map widget, fully authenticated via OAuth 2.0. 6 Version: 1. 16 Version: 1.2.0 7 7 Author: Gary Gale 8 8 Author URI: http://www.garygale.com/ … … 13 13 define ('WPQUADRATUM_URL', plugin_dir_url (__FILE__)); 14 14 define ('WPQUADRATUM_PATH', plugin_dir_path (__FILE__)); 15 //define ('WPQUADRATUM_DEBUG', true); 15 16 16 17 /* … … 32 33 define ('WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins'); 33 34 34 require_once (WPQUADRATUM_PATH . '/ wp-plugin-base/wp-plugin-base.php');35 require_once (WPQUADRATUM_PATH . '/ wp-mxn-helper/wp-mxn-helper.php');35 require_once (WPQUADRATUM_PATH . '/includes/wp-plugin-base/wp-plugin-base.php'); 36 require_once (WPQUADRATUM_PATH . '/includes/wp-mxn-helper/wp-mxn-helper.php'); 36 37 require_once (WPQUADRATUM_PATH . '/includes/wp-quadratum-widget.php'); 37 38 … … 45 46 include_once (ABSPATH . 'wp-admin/includes/plugin.php'); 46 47 47 class WP_Quadratum extends WP_PluginBase {48 class WP_Quadratum extends WP_PluginBase_v1_1 { 48 49 static $instance; 49 50 50 51 const OPTIONS = 'wp_quadratum_settings'; 51 const VERSION = '1 10';52 const DISPLAY_VERSION = 'v1. 1.0';52 const VERSION = '120'; 53 const DISPLAY_VERSION = 'v1.2.0'; 53 54 54 55 /** … … 250 251 $params = array ('limit' => 1); 251 252 252 $fsq = new FoursquareHelper ($client_id, $client_secret, $redirect_url);253 $fsq = new FoursquareHelper_v1_0 ($client_id, $client_secret, $redirect_url); 253 254 $fsq->set_access_token ($oauth_token); 254 255 $rsp = $fsq->get_private ($endpoint, $params);
Note: See TracChangeset
for help on using the changeset viewer.