Merge branch 'master' into feature-statistics-icons
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Importers
|
||||
* @version 2.6
|
||||
* @version 2.6.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -123,9 +123,11 @@ if ( class_exists( 'WP_Importer' ) ) {
|
||||
// Add team to player
|
||||
add_post_meta( $id, 'sp_team', $team_id );
|
||||
|
||||
// Update current team if first in array
|
||||
// Update current team if first in array, otherwise use as past team
|
||||
if ( $i == 0 ):
|
||||
update_post_meta( $id, 'sp_current_team', $team_id );
|
||||
else :
|
||||
add_post_meta( $id, 'sp_past_team', $team_id );
|
||||
endif;
|
||||
|
||||
$i++;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Meta_Boxes
|
||||
* @version 2.6
|
||||
* @version 2.6.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* The SportsPress player class handles individual player data.
|
||||
*
|
||||
* @class SP_Player
|
||||
* @version 2.6.1
|
||||
* @version 2.6.3
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* The SportsPress team class handles individual team data.
|
||||
*
|
||||
* @class SP_Team
|
||||
* @version 2.6
|
||||
* @version 2.6.3
|
||||
* @package SportsPress/Classes
|
||||
* @category Class
|
||||
* @author ThemeBoy
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Core
|
||||
* @package SportsPress/Functions
|
||||
* @version 2.6
|
||||
* @version 2.6.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @author ThemeBoy
|
||||
* @category Core
|
||||
* @package SportsPress/Functions
|
||||
* @version 2.6
|
||||
* @version 2.6.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
@@ -1636,3 +1636,28 @@ function sp_get_shortcode_template( $shortcode, $id = null, $args = array() ) {
|
||||
function sp_shortcode_template( $shortcode, $id = null, $args = array() ) {
|
||||
echo sp_get_shortcode_template( $shortcode, $id, $args );
|
||||
}
|
||||
|
||||
if( ! function_exists( 'array_replace' ) ) {
|
||||
/**
|
||||
* array_replace for PHP version earlier than 5.3
|
||||
*
|
||||
* @link http://be2.php.net/manual/fr/function.array-replace.php#115215
|
||||
*/
|
||||
function array_replace() {
|
||||
$args = func_get_args();
|
||||
$num_args = func_num_args();
|
||||
$res = array();
|
||||
for( $i = 0; $i < $num_args; $i++ ) {
|
||||
if( is_array( $args[ $i ] ) ) {
|
||||
foreach( $args[ $i ] as $key => $val ) {
|
||||
$res[ $key ] = $val;
|
||||
}
|
||||
}
|
||||
else {
|
||||
trigger_error( __FUNCTION__ . '(): Argument #' . ( $i + 1 ) . ' is not an array', E_USER_WARNING );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user