Changeset 1124626
- Timestamp:
- 03/31/2015 05:05:44 PM (11 years ago)
- Location:
- sportspost/trunk
- Files:
-
- 16 added
- 10 edited
-
admin/class-sportspost-admin.php (modified) (34 diffs)
-
admin/class-sportspost-photos-module.php (added)
-
admin/class-sportspost-photos-source.php (added)
-
admin/css/sportspost-admin.css (modified) (1 diff)
-
admin/css/sportspost-photos.css (added)
-
admin/js/sportspost-photos.js (added)
-
admin/partials/sportspost-admin-dialog.php (modified) (4 diffs)
-
admin/partials/sportspost-admin-settings.php (modified) (1 diff)
-
admin/partials/sportspost-photos-image-settings.php (added)
-
admin/partials/sportspost-photos-image-single.php (added)
-
admin/partials/sportspost-photos-user-connect.php (added)
-
admin/partials/sportspost-photos-user-settings.php (added)
-
admin/sources (added)
-
admin/sources/icon-sportswire.php (added)
-
includes/class-sportspost-content-widget.php (added)
-
includes/class-sportspost-i18n.php (modified) (4 diffs)
-
includes/class-sportspost-loader.php (modified) (7 diffs)
-
includes/class-sportspost.php (modified) (16 diffs)
-
public (added)
-
public/class-sportspost-public.php (added)
-
public/css (added)
-
public/css/sportspost-public.css (added)
-
public/index.php (added)
-
readme.txt (modified) (4 diffs)
-
sportspost.php (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sportspost/trunk/admin/class-sportspost-admin.php
r1085665 r1124626 4 4 * The admin-specific functionality of the plugin. 5 5 * 6 * @since 1.0.06 * @since 1.0.0 7 7 * 8 8 * @package SportsPost … … 14 14 * The ID of this plugin. 15 15 * 16 * @since 1.0.016 * @since 1.0.0 17 17 * @access private 18 18 * @var string $plugin_name The ID of this plugin. … … 23 23 * The version of this plugin. 24 24 * 25 * @since 1.0.025 * @since 1.0.0 26 26 * @access private 27 27 * @var string $version The current version of this plugin. … … 30 30 31 31 /** 32 * The options of this plugin.33 * 34 * @since 1.0.032 * The settings of this plugin. 33 * 34 * @since 1.0.0 35 35 * @access private 36 * @var array $ options The options of this plugin.37 */ 38 private $ options;36 * @var array $settings The settings of this plugin. 37 */ 38 private $settings; 39 39 40 40 /** 41 41 * The admin pointers of this plugin. 42 42 * 43 * @since 1.0.043 * @since 1.0.0 44 44 * @access private 45 * @var array $ options The admin pointers of this plugin.45 * @var array $pointers The admin pointers of this plugin. 46 46 */ 47 47 private $pointers; … … 50 50 * Initialize the class and set its properties. 51 51 * 52 * @since 1.0.052 * @since 1.0.0 53 53 * @var string $plugin_name The name of this plugin. 54 54 * @var string $version The version of this plugin. … … 58 58 $this->plugin_name = $plugin_name; 59 59 $this->version = $version; 60 // Initialize plugin options61 $this-> options = $this->get_default_options();62 $saved_ options = get_option( 'sportspost_settings' );63 if ( is_array( $saved_ options ) ) {64 $this-> options = array_merge(65 $this-> options,66 $saved_ options60 // Initialize plugin settings 61 $this->settings = $this->get_default_settings(); 62 $saved_settings = get_option( 'sportspost_settings' ); 63 if ( is_array( $saved_settings ) ) { 64 $this->settings = array_merge( 65 $this->settings, 66 $saved_settings 67 67 ); 68 68 } … … 72 72 * Get default settings. 73 73 * 74 * @since 1.1.075 */ 76 public function get_default_ options() {74 * @since 1.1.0 75 */ 76 public function get_default_settings() { 77 77 return array( 78 78 'default_sports_league' => 'mlb', … … 88 88 'id_suffix' => '', 89 89 'output_publishers' => 'sportsforecaster.com', 90 'sample_url' => '' 91 ); 90 'sample_url' => '', 91 'content_api_url' => 'http://sportscaster.xmlteam.com/' , 92 'content_api_username' => '', 93 'content_api_password' => '', 94 'sources_available' => array(), 95 'show_connected' => 0 96 ); 97 } 98 99 /** 100 * Get current settings. 101 * 102 * @since 2.0.0 103 */ 104 public function get_settings() { 105 return $this->settings; 92 106 } 93 107 … … 95 109 * Register the stylesheets for the Dashboard. 96 110 * 97 * @since 1.0.0111 * @since 1.0.0 98 112 */ 99 113 public function enqueue_styles() { … … 104 118 * Register the JavaScript for the dashboard. 105 119 * 106 * @since 1.0.0120 * @since 1.0.0 107 121 */ 108 122 public function enqueue_scripts() { … … 118 132 'api_endpoint' => SPORTSPOST_API_ENDPOINT, 119 133 'icon_url' => plugins_url( 'admin/img/icon-player.png', dirname( __FILE__ ) ), 120 'affiliate_reference_id' => $this-> options['affiliate_reference_id'],121 'link_prefix' => $this-> options['link_prefix'],122 'league_name_mlb' => $this-> options['league_name_mlb'],123 'league_name_nhl' => $this-> options['league_name_nhl'],124 'league_name_nfl' => $this-> options['league_name_nfl'],125 'league_name_nba' => $this-> options['league_name_nba'],126 'id_prefix' => $this-> options['id_prefix'],127 'id_suffix' => $this-> options['id_suffix'],128 'output_publishers' => $this-> options['output_publishers'],134 'affiliate_reference_id' => $this->settings['affiliate_reference_id'], 135 'link_prefix' => $this->settings['link_prefix'], 136 'league_name_mlb' => $this->settings['league_name_mlb'], 137 'league_name_nhl' => $this->settings['league_name_nhl'], 138 'league_name_nfl' => $this->settings['league_name_nfl'], 139 'league_name_nba' => $this->settings['league_name_nba'], 140 'id_prefix' => $this->settings['id_prefix'], 141 'id_suffix' => $this->settings['id_suffix'], 142 'output_publishers' => $this->settings['output_publishers'], 129 143 ) ); 130 144 } … … 133 147 * Register the JavaScript for the settings page. 134 148 * 135 * @since 1.1.0149 * @since 1.1.0 136 150 */ 137 151 public function enqueue_settings_scripts() { … … 142 156 * Add the settings page in the Settings menu. 143 157 * 144 * @since 1.0.0158 * @since 1.0.0 145 159 */ 146 160 public function add_settings_page() { … … 151 165 * Display the settings page in the menu API. 152 166 * 153 * @since 1.0.0167 * @since 1.0.0 154 168 */ 155 169 public function display_settings_page() { … … 160 174 * Initialize the settings API. 161 175 * 162 * @since 1.0.0176 * @since 1.0.0 163 177 */ 164 178 public function settings_init() { … … 296 310 ); 297 311 312 add_settings_section( 313 'sportspost_settings_section_3', // Section ID 314 '', // Section Title 315 '', // Section Callback 316 'sportspost_settings_page' // Page 317 ); 318 319 add_settings_field( 320 'content_api_url', // Field ID 321 __( 'SportsPost Widget base URL', 'sportspost' ), // Field Title 322 array( $this, 'setting_text_callback_function' ), // Field Callback 323 'sportspost_settings_page', // Page 324 'sportspost_settings_section_3', // Section 325 array( 326 'id' => 'content_api_url', 327 'size' => 50 328 ) 329 ); 330 331 add_settings_field( 332 'content_api_username', // Field ID 333 __( 'SportsPost Widget username', 'sportspost' ), // Field Title 334 array( $this, 'setting_text_callback_function' ), // Field Callback 335 'sportspost_settings_page', // Page 336 'sportspost_settings_section_3', // Section 337 array( 'id' => 'content_api_username' ) 338 ); 339 340 add_settings_field( 341 'content_api_password', // Field ID 342 __( 'SportsPost Widget password', 'sportspost' ), // Field Title 343 array( $this, 'setting_text_callback_function' ), // Field Callback 344 'sportspost_settings_page', // Page 345 'sportspost_settings_section_3', // Section 346 array( 'id' => 'content_api_password' ) 347 ); 348 298 349 if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { 299 350 300 351 add_settings_section( 301 'sportspost_settings_section_ 3', // Section ID352 'sportspost_settings_section_4', // Section ID 302 353 '', // Section Title 303 354 '', // Section Callback … … 310 361 array( $this, 'setting_checkbox_callback_function' ), // Field Callback 311 362 'sportspost_settings_page', // Page 312 'sportspost_settings_section_ 3', // Section363 'sportspost_settings_section_4', // Section 313 364 array( 314 365 'id' => 'force_wizard', … … 317 368 ); 318 369 } 370 371 do_action( 'sportspost_settings' ); 319 372 320 373 register_setting( … … 328 381 * Helper function for settings validation. 329 382 * 330 * @since 1.1.0383 * @since 1.1.0 331 384 */ 332 385 public function settings_validate( $input ) { 333 386 if ( ! empty( $input['reset'] ) ) { 334 return $this->get_default_ options();387 return $this->get_default_settings(); 335 388 } 336 389 return $input; … … 340 393 * Helper function to display Sports League dropdown. 341 394 * 342 * @since 1.0.0395 * @since 1.0.0 343 396 */ 344 397 public function display_league_dropdown( $name, $id, $selected ) { … … 354 407 * Callback function for Default Sports League setting. 355 408 * 356 * @since 1.0.0409 * @since 1.0.0 357 410 */ 358 411 public function setting_default_sports_league_callback_function() { 359 $this->display_league_dropdown( 'sportspost_settings[default_sports_league]', 'default_sports_league', $this-> options['default_sports_league'] );412 $this->display_league_dropdown( 'sportspost_settings[default_sports_league]', 'default_sports_league', $this->settings['default_sports_league'] ); 360 413 } 361 414 … … 363 416 * Callback function for free text settings. 364 417 * 365 * @since 1.1.0418 * @since 1.1.0 366 419 */ 367 420 public function setting_text_callback_function( $args ) { … … 371 424 echo 'id="' . $args['id'] . '" '; 372 425 echo 'type="text" '; 373 echo 'value="' . esc_attr( $this-> options[ $args['id'] ] ) . '" ';426 echo 'value="' . esc_attr( $this->settings[ $args['id'] ] ) . '" '; 374 427 echo 'class="code" '; 375 428 if ( isset( $args['readonly'] ) && $args['readonly'] ) { … … 386 439 * Callback function for checkbox settings. 387 440 * 388 * @since 1.1.0441 * @since 1.1.0 389 442 */ 390 443 public function setting_checkbox_callback_function( $args ) { 391 444 if ( isset( $args['id'] ) ) { 392 echo '<input name="sportspost_settings[' . $args['id'] . ']" id="' . $args['id'] . '" type="checkbox" value="1" ' . checked( $this-> options[ $args['id'] ], 1, false ) . ' class="code" /> <label for="' . $args['id'] . '">' . $args['label'] . '</label>';445 echo '<input name="sportspost_settings[' . $args['id'] . ']" id="' . $args['id'] . '" type="checkbox" value="1" ' . checked( $this->settings[ $args['id'] ], 1, false ) . ' class="code" /> <label for="' . $args['id'] . '">' . $args['label'] . '</label>'; 393 446 } 394 447 } … … 397 450 * Callback function for Default Sports League setting. 398 451 * 399 * @since 1.1.0452 * @since 1.1.0 400 453 */ 401 454 public function setting_output_publishers_callback_function( $args ) { 402 $selected = $this-> options['output_publishers'];455 $selected = $this->settings['output_publishers']; 403 456 echo '<select name="sportspost_settings[output_publishers]" id=output_publishers">'; 404 457 echo ' <option value="sportsforecaster.com" ' . selected( $selected, 'sportsforecaster.com' ) . '>Sports Forecaster</option>'; … … 418 471 * Add TinyMCE toolbar button. 419 472 * 420 * @since 1.0.0473 * @since 1.0.0 421 474 * @var array $buttons Array of TinyMCE buttons. 422 475 */ … … 429 482 * Add TinyMCE external plugin. 430 483 * 431 * @since 1.0.0484 * @since 1.0.0 432 485 * @var array $plugins Array of TinyMCE plugins. 433 486 */ … … 451 504 * Add Quicktags button. 452 505 * 453 * @since 1.0.0506 * @since 1.0.0 454 507 */ 455 508 public function add_quicktags_button() { 456 509 ?> 457 510 <script type="text/javascript"> 458 QTags.addButton( 'playerlink', 'player', function(){ window.sportsPostPlayerLink.open() }, '', '', 'Insert Player Link', 29 );459 </script>511 QTags.addButton( 'playerlink', 'player', function(){ window.sportsPostPlayerLink.open() }, '', '', 'Insert Player Link', 29 ); 512 </script> 460 513 <?php 461 514 } … … 464 517 * Dialog for palyer links. 465 518 * 466 * @since 1.0.0519 * @since 1.0.0 467 520 */ 468 521 public function player_link_dialog() { … … 474 527 * Ajax handler for player linking. 475 528 * 476 * @since 1.0.0529 * @since 1.0.0 477 530 */ 478 531 public function player_link_ajax() { 479 532 check_ajax_referer( 'sportpost-player-linking', '_ajax_sportspost_player_link_nonce' ); 480 481 // Version A: Queries with multiple keys handled directly by sportscodes.org server482 533 if ( ! empty( $_POST['league'] ) && ! empty( $_POST['search'] ) ) { 483 534 $url = SPORTSPOST_API_ENDPOINT . '?'; … … 499 550 * Load admin pointer(s) 500 551 * 501 * @since 1.0.0552 * @since 1.0.0 502 553 */ 503 554 public function load_admin_pointers() { … … 513 564 * Register admin pointer(s) 514 565 * 515 * @since 1.0.0566 * @since 1.0.0 516 567 * @var mixed[] $pointers 517 568 */ … … 599 650 * Remove dismissed admin pointer(s) 600 651 * 601 * @since 1.0.0652 * @since 1.0.0 602 653 * @var mixed[] $pointers 603 654 */ 604 655 public function filter_dismissed_admin_pointers( $pointers ) { 605 if ( defined( 'WP_DEBUG' ) && WP_DEBUG && $this-> options['force_wizard'] ) return $pointers;656 if ( defined( 'WP_DEBUG' ) && WP_DEBUG && $this->settings['force_wizard'] ) return $pointers; 606 657 $valid_pointers = array(); 607 658 if ( is_array( $pointers ) ) { … … 616 667 } 617 668 669 /** 670 * Customize widget in Page Builder (SiteOrigin Panels) 671 * 672 * @since 1.2.0 673 * @var mixed[] $widgets 674 */ 675 public function siteorigin_panels_widgets( $widgets ) { 676 if ( ! empty( $widgets['SportsPost_Content_Widget'] ) ) { 677 $widgets['SportsPost_Content_Widget']['icon'] = 'sportspost-icon'; 678 } 679 return $widgets; 680 } 618 681 } -
sportspost/trunk/admin/css/sportspost-admin.css
r1085665 r1124626 1 /* dashicon version 2 i.mce-i-playerlink:before { 3 font: normal 20px/1 'dashicons'; 4 content: '\f337'; 5 } 6 */ 1 /* Live Content Widget stuff */ 2 3 #available-widgets [class*="sportspost_content"] .widget-title:before, 4 .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type .sportspost-icon { 5 content: ""; 6 background-image: url(../img/icon-player.png); 7 background-size: 20px 20px; 8 } 9 10 /* Player profile Links stuff */ 7 11 8 12 .quicktags-toolbar input[value="player"] { -
sportspost/trunk/admin/partials/sportspost-admin-dialog.php
r1042327 r1124626 1 1 <?php 2 3 2 /** 4 3 * The insert/edit player link dialog 5 4 * 6 * @since 1.0.05 * @since 1.0.0 7 6 * 8 7 * @package SportsPost … … 10 9 */ 11 10 ?> 12 13 11 <div id="sportspost-player-link-backdrop" style="display: none"></div> 14 12 <div id="sportspost-player-link-wrap" class="wp-core-ui<?php echo $search_panel_visible; ?>" style="display: none"> … … 30 28 </div> 31 29 <div class="link-target"> 32 <label><span> </span><input type="checkbox" id="player-link-target-checkbox" <?php checked( $this-> options['target_blank'], 1) ?> /> <?php _e( 'Open link in a new window/tab' ); ?></label>30 <label><span> </span><input type="checkbox" id="player-link-target-checkbox" <?php checked( $this->settings['target_blank'], 1) ?> /> <?php _e( 'Open link in a new window/tab' ); ?></label> 33 31 </div> 34 32 </div> … … 41 39 <label> 42 40 <span class="search-label"><?php _e( 'League', 'sportspost' ); ?></span> 43 <?php $this->display_league_dropdown( 'league', 'player-league', $this-> options['default_sports_league'] ); ?>41 <?php $this->display_league_dropdown( 'league', 'player-league', $this->settings['default_sports_league'] ); ?> 44 42 </label> 45 43 <span class="spinner"></span> -
sportspost/trunk/admin/partials/sportspost-admin-settings.php
r1085665 r1124626 1 1 <?php 2 3 2 /** 4 3 * The settins page for the plugin 5 4 * 6 * @since 1.0.05 * @since 1.0.0 7 6 * 8 7 * @package SportsPost -
sportspost/trunk/includes/class-sportspost-i18n.php
r1042327 r1124626 7 7 * so that it is ready for translation. 8 8 * 9 * @since 1.0.09 * @since 1.0.0 10 10 * @package SportsPost 11 11 * @subpackage SportsPost/includes … … 16 16 * The domain specified for this plugin. 17 17 * 18 * @since 1.0.018 * @since 1.0.0 19 19 * @access private 20 20 * @var string $domain The domain identifier for this plugin. … … 25 25 * Load the plugin text domain for translation. 26 26 * 27 * @since 1.0.027 * @since 1.0.0 28 28 */ 29 29 public function load_plugin_textdomain() { … … 40 40 * Set the domain equal to that of the specified domain. 41 41 * 42 * @since 1.0.042 * @since 1.0.0 43 43 * @param string $domain The domain that represents the locale of this plugin. 44 44 */ -
sportspost/trunk/includes/class-sportspost-loader.php
r1042327 r1124626 16 16 * The array of actions registered with WordPress. 17 17 * 18 * @since 1.0.018 * @since 1.0.0 19 19 * @access protected 20 20 * @var array $actions The actions registered with WordPress to fire when the plugin loads. … … 25 25 * The array of filters registered with WordPress. 26 26 * 27 * @since 1.0.027 * @since 1.0.0 28 28 * @access protected 29 29 * @var array $filters The filters registered with WordPress to fire when the plugin loads. … … 34 34 * Initialize the collections used to maintain the actions and filters. 35 35 * 36 * @since 1.0.036 * @since 1.0.0 37 37 */ 38 38 public function __construct() { … … 44 44 * Add a new action to the collection to be registered with WordPress. 45 45 * 46 * @since 1.0.046 * @since 1.0.0 47 47 * @var string $hook The name of the WordPress action that is being registered. 48 48 * @var object $component A reference to the instance of the object on which the action is defined. … … 58 58 * Add a new filter to the collection to be registered with WordPress. 59 59 * 60 * @since 1.0.060 * @since 1.0.0 61 61 * @var string $hook The name of the WordPress filter that is being registered. 62 62 * @var object $component A reference to the instance of the object on which the filter is defined. … … 73 73 * collection. 74 74 * 75 * @since 1.0.075 * @since 1.0.0 76 76 * @access private 77 77 * @var array $hooks The collection of hooks that is being registered (that is, actions or filters). … … 97 97 * Register the filters and actions with WordPress. 98 98 * 99 * @since 1.0.099 * @since 1.0.0 100 100 */ 101 101 public function run() { -
sportspost/trunk/includes/class-sportspost.php
r1085665 r1124626 10 10 * version of the plugin. 11 11 * 12 * @since 1.0.012 * @since 1.0.0 13 13 * @package SportsPost 14 14 * @subpackage SportsPost/includes … … 20 20 * the plugin. 21 21 * 22 * @since 1.0.022 * @since 1.0.0 23 23 * @access protected 24 24 * @var SportsPost_Loader $loader Maintains and registers all hooks for the plugin. … … 29 29 * The unique identifier of this plugin. 30 30 * 31 * @since 1.0.031 * @since 1.0.0 32 32 * @access protected 33 33 * @var string $plugin_name The string used to uniquely identify this plugin. … … 38 38 * The current version of the plugin. 39 39 * 40 * @since 1.0.040 * @since 1.0.0 41 41 * @access protected 42 42 * @var string $version The current version of the plugin. … … 50 50 * Load the dependencies, define the locale, and set the hooks for the Dashboard 51 51 * 52 * @since 1.0.052 * @since 1.0.0 53 53 */ 54 54 public function __construct() { 55 55 $this->plugin_name = 'sportspost'; 56 $this->version = ' 1.1.0';56 $this->version = '2.0.0'; 57 57 $this->load_dependencies(); 58 $this->loader = new SportsPost_Loader(); 58 59 $this->set_locale(); 59 60 $this->define_admin_hooks(); 61 $this->define_public_hooks(); 60 62 } 61 63 … … 72 74 * with WordPress. 73 75 * 74 * @since 1.0.076 * @since 1.0.0 75 77 * @access private 76 78 */ … … 87 89 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-sportspost-i18n.php'; 88 90 /** 91 * The class responsible for defining the widgets. 92 */ 93 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-sportspost-content-widget.php'; 94 /** 95 * The class responsible for defining all actions that occur in the public-facing 96 * side of the site. 97 */ 98 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-sportspost-public.php'; 99 /** 100 * The class responsible for Photo integration integration. 101 */ 102 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-sportspost-photos-module.php'; 103 /** 89 104 * The class responsible for defining all actions that occur in the Dashboard. 90 105 */ 91 106 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-sportspost-admin.php'; 92 $this->loader = new SportsPost_Loader();93 107 } 94 108 … … 99 113 * with WordPress. 100 114 * 101 * @since 1.0.0115 * @since 1.0.0 102 116 * @access private 103 117 */ … … 112 126 * of the plugin. 113 127 * 114 * @since 1.0.0128 * @since 1.0.0 115 129 * @access private 116 130 */ … … 118 132 global $pagenow; 119 133 $plugin_admin = new SportsPost_Admin( $this->get_plugin_name(), $this->get_version() ); 134 $module_photo = new SportsPost_Photos_Module( $this->get_plugin_name(), $this->get_version(), $plugin_admin->get_settings() ); 120 135 if ( in_array( $pagenow, array( 'post.php', 'post-new.php', 'widgets.php', 'customize.php', 'admin-ajax.php' ) ) ) { 121 136 $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); … … 128 143 $this->loader->add_action( 'after_wp_tiny_mce', $plugin_admin, 'player_link_dialog' ); 129 144 $this->loader->add_action( 'wp_ajax_sportspost-player-link-ajax', $plugin_admin, 'player_link_ajax' ); 145 $this->loader->add_action( 'siteorigin_panels_widgets', $plugin_admin, 'siteorigin_panels_widgets' ); 130 146 } 131 147 if ( 'options-general.php' == $pagenow && isset( $_GET['page'] ) && 'sportspost_settings_page' == $_GET['page'] ) { … … 135 151 $this->loader->add_action( 'admin_init', $plugin_admin, 'settings_init' ); 136 152 $this->loader->add_action( 'admin_menu', $plugin_admin, 'add_settings_page' ); 153 // Photos integration 154 $this->loader->add_action( 'admin_enqueue_scripts', $module_photo, 'enqueue_scripts' ); 155 $this->loader->add_action( 'admin_enqueue_scripts', $module_photo, 'enqueue_styles' ); 156 $this->loader->add_action( 'print_media_templates', $module_photo, 'print_media_templates', 99); 157 $this->loader->add_filter( 'media_view_strings', $module_photo, 'custom_media_string', 10, 2); 158 $this->loader->add_action( 'wp_ajax_sportspost_connect', $module_photo, 'connect_source' ); 159 $this->loader->add_action( 'wp_ajax_sportspost_disconnect', $module_photo, 'disconnect_source' ); 160 $this->loader->add_action( 'wp_ajax_sportspost_check', $module_photo, 'connect_check' ); 161 $this->loader->add_action( 'wp_ajax_sportspost_load_images', $module_photo, 'load_images' ); 162 $this->loader->add_action( 'wp_ajax_sportspost_param_choices', $module_photo, 'param_choices' ); 163 $this->loader->add_action( 'wp_ajax_sportspost_pre_insert', $module_photo, 'pre_insert' ); 164 $this->loader->add_action( 'wp_ajax_sportspost_user_preferences_save', $module_photo, 'user_preferences_save' ); 165 $this->loader->add_action( 'wp_ajax_sportspost_user_preferences_get', $module_photo, 'user_preferences_get' ); 166 } 167 168 /** 169 * Register all of the hooks related to the public-facing functionality 170 * of the plugin. 171 * 172 * @since 1.2.0 173 * @access private 174 */ 175 private function define_public_hooks() { 176 $plugin_public = new SportsPost_Public( $this->get_plugin_name(), $this->get_version() ); 177 $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles', 20 ); 178 $this->loader->add_action( 'init', $plugin_public, 'init_widget', 1 ); 179 $this->loader->add_filter( 'template_include', $plugin_public, 'full_sport_template_include' ); 180 $this->loader->add_filter( 'the_posts', $plugin_public, 'full_sport_content_virtual_page' ); 137 181 } 138 182 … … 140 184 * Run the loader to execute all of the hooks with WordPress. 141 185 * 142 * @since 1.0.0186 * @since 1.0.0 143 187 */ 144 188 public function run() { … … 150 194 * WordPress and to define internationalization functionality. 151 195 * 152 * @since 1.0.0196 * @since 1.0.0 153 197 * @return string The name of the plugin. 154 198 */ … … 160 204 * The reference to the class that orchestrates the hooks with the plugin. 161 205 * 162 * @since 1.0.0206 * @since 1.0.0 163 207 * @return SportsPost_Loader Orchestrates the hooks of the plugin. 164 208 */ … … 170 214 * Retrieve the version number of the plugin. 171 215 * 172 * @since 1.0.0216 * @since 1.0.0 173 217 * @return string The version number of the plugin. 174 218 */ -
sportspost/trunk/readme.txt
r1085665 r1124626 5 5 Requires at least: 4.0 6 6 Tested up to: 4.1 7 Stable tag: 1.1.07 Stable tag: 2.0.0 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 15 15 Enhance your sports posts with rich, detailed metadata about games, teams, and players, and with live game photos. 16 16 17 SportsPost 1.0 allows bloggers to search for player names of athletes in major North American sports leagues, and drop their names directly into their post. These names can then hyperlink to externally hosted Player Profile pages, with expanded news, statistics, and photos of those players.17 SportsPost 2.0 allows WordPress editors to search for player names of athletes in major North American sports leagues, and drop their names directly into their post. These names can then hyperlink to externally hosted Player Profile pages, with expanded news, statistics, and photos of those players. 18 18 19 19 Bloggers can also optionally register at http://SportsForecaster.com/affiliates to generate advertising revenue from their links. 20 20 21 Future versions will allow bloggers to: 21 SportsPost 2.0 also allows editors to search or browse the over 3 million sports photos from Icon Sportswire -- a leading sports photo wire service. Selected photos can be inserted directly into any post -- without leaving WordPress. Photos can also be imported into WordPress's Media Library. 22 22 23 * Search, download, and include live, editorially licensed sports photos taken from recent sporting events 24 * Identify their posts as being Game Previews or Game Recaps for particular sporting events, and include in the metadata of those posts the unique Game ID 23 Photos are for editorial usage only, and editors must register at IconSportswire.com for an account and login credentials. Photos can licensed using prepaid Credits (no long-term contract necessary), or can be downloaded as part of a monthly subscription package. 24 25 SportsPost 2.0 also includes "preview functionality" that allows WordPress administrators to add Sports Widgets from XML Team onto designated locations of any page. Our forthcoming 3.0 release will make it easy to select widgets and drop them in place. Visit the "Support" tab and drop us a message if you'd like more details. 26 27 Future versions will allow editors to: 28 29 * Select Sports Widgets that will automatically update your website with current sports coverage. 30 * Identify posts as being Game Previews or Game Recaps for particular sporting events, and then automatically include supplemental game information. 25 31 26 32 == Installation == … … 36 42 == Frequently Asked Questions == 37 43 38 None at the moment. 44 Q) Is SportsPost free to use? 45 46 A) Inserting links to player profiles is free. Inserting photos requires opening an account at IconSportswire.com, and charges do apply there. (After all, we're paying professional and credentialed photographers for the use of their photos.) Our forthcoming Sports Widgets feature will include both free and premium options. 47 48 Q) Can SportsPost make me money? 49 50 A) Yes! Just register for an Affiliate ID over at http://SportsForecaster.com/affiliates and you'll generate ad revenue directly into your own Google AdSense account. 51 52 Q) Are there any photo usage limitations? 53 54 A) Yes. Photos are for editorial use only. For example, this means you cannot download a photo of your favorite athlete, and then write a post stating that this athlete endorses products or services that you sell. 55 56 Q) Can I edit the captions and alternate-text that come with the photos? 57 58 A) Yes, absolutely. But you must maintain the photo credit, which includes the photographer name, and also lists "Icon Sportswire" as the supplier of the photo. 39 59 40 60 == Screenshots == … … 44 64 3. "Insert/Edit Player Link" button in text editor toolbar 45 65 4. Settings page 66 5. Browse photos from Icon Sportswire. Choose the league, and see photos organized by game. 67 6. Search photos by typing in keywords 68 7. Photos get loaded into WordPress's Media Library, and can be resized and aligned as per all WordPress photos. 46 69 47 70 == Changelog == 71 72 = 2.0.0 = 73 * Added support for photos from Icon Sportswire 74 * Added preview functionality for Sports Widgets 48 75 49 76 = 1.1.0 = -
sportspost/trunk/sportspost.php
r1085665 r1124626 14 14 * Plugin URI: https://wordpress.org/plugins/sportspost/ 15 15 * Description: Enhance your sports posts with rich, detailed metadata about games, teams, and players. 16 * Version: 1.1.016 * Version: 2.0.0 17 17 * Author: XML Team Solutions 18 18 * Author URI: http://xmlteam.com/ … … 47 47 * not affect the page life cycle. 48 48 * 49 * @since 1.0.049 * @since 1.0.0 50 50 */ 51 51 function run_sportspost() { -
sportspost/trunk/uninstall.php
r1042327 r1124626 4 4 * Fired when the plugin is uninstalled. 5 5 * 6 * @since 1.0.06 * @since 1.0.0 7 7 * 8 8 * @package SportsPost
Note: See TracChangeset
for help on using the changeset viewer.