Enable displaying shortcodes in text widgets
This commit is contained in:
10
admin/hooks/widget-text.php
Normal file
10
admin/hooks/widget-text.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
function sportspress_widget_text( $content ) {
|
||||
if ( ! preg_match( '/\[[\r\n\t ]*(countdown|league-table|events-(calendar|list)|player-(list|gallery))?[\r\n\t ].*?\]/', $content ) )
|
||||
return $content;
|
||||
|
||||
$content = do_shortcode( $content );
|
||||
|
||||
return $content;
|
||||
}
|
||||
add_filter( 'widget_text', 'sportspress_widget_text', 9 );
|
||||
14
readme.txt
14
readme.txt
@@ -4,7 +4,7 @@ Tags: sports, sports journalism, teams, team management, fixtures, results, stan
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=support@themeboy.com&item_name=Donation+for+SportsPress
|
||||
Requires at least: 3.8
|
||||
Tested up to: 3.8.1
|
||||
Stable tag: 0.5
|
||||
Stable tag: 0.6
|
||||
License: GPLv3
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@@ -152,6 +152,18 @@ SportsPress is currently in beta and is undergoing testing. We are still activel
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 0.6 =
|
||||
* Feature - New events shortcodes: countdown, events-calendar, and events-list.
|
||||
* Feature - New teams shortcode: league-table.
|
||||
* Feature - New players shortcodes: player-list and player-gallery.
|
||||
* Feature - Add new settings page to change default text output.
|
||||
* Feature - Add new section to permalinks settings to change post and term slugs.
|
||||
* Tweak - Display teams as link list in admin page for league table teams columns.
|
||||
* Tweak - Vertically align team logos in league table.
|
||||
* Fix - Check if player belongs to leagues to avoid warnings in player profile.
|
||||
* Fix - Total player statistics calculation in events.
|
||||
* Fix - Responsive tables in event details and outcomes.
|
||||
|
||||
= 0.5 =
|
||||
* Feature - Import tool added for importing events from CSV file.
|
||||
* Feature - New post type Calendar added.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
Plugin Name: SportsPress
|
||||
Plugin URI: http://themeboy.com/sportspress
|
||||
Description: Manage your club and its players, staff, events, league tables, and player lists.
|
||||
Version: 0.5
|
||||
Version: 0.6
|
||||
Author: ThemeBoy
|
||||
Author URI: http://themeboy.com/
|
||||
License: GPLv3
|
||||
@@ -18,7 +18,7 @@ if ( !function_exists( 'add_action' ) ):
|
||||
exit;
|
||||
endif;
|
||||
|
||||
define( 'SPORTSPRESS_VERSION', '0.5' );
|
||||
define( 'SPORTSPRESS_VERSION', '0.6' );
|
||||
define( 'SPORTSPRESS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'SPORTSPRESS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
||||
define( 'SPORTSPRESS_PLUGIN_FILE', __FILE__ );
|
||||
@@ -122,6 +122,7 @@ require_once dirname( __FILE__ ) . '/admin/hooks/pre-get-posts.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/the-posts.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/sanitize-title.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/the-content.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/widget-text.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/wp-insert-post-data.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/plugin-action-links.php';
|
||||
require_once dirname( __FILE__ ) . '/admin/hooks/post-updated-messages.php';
|
||||
|
||||
Reference in New Issue
Block a user