diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php index 4a95b9e7..277aca32 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php @@ -427,7 +427,7 @@ class SP_Meta_Box_Event_Performance { if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); ?> diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php index 8112b717..036d148b 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php @@ -200,7 +200,7 @@ class SP_Meta_Box_Player_Statistics { if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); // Convert placeholder $intval = intval( $placeholder ); @@ -210,7 +210,7 @@ class SP_Meta_Box_Player_Statistics { if ( '00' != $hours ) $placeholder = $hours . ':' . $placeholder; - $placeholder = ereg_replace( '^0', '', $placeholder ); + $placeholder = preg_replace( '/^0/', '', $placeholder ); } if ( $readonly ) { diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index 53c672c6..c30e4a13 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -215,7 +215,7 @@ class SP_Event extends SP_Custom_Post{ if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); $performance[ $team ][ $player ][ $performance_key ] = $timeval; endforeach; diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index 6bb31354..c3670f21 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -603,7 +603,7 @@ class SP_Player_List extends SP_Custom_Post { if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); $placeholders[ $player ][ $key ] = $timeval; endforeach; @@ -642,7 +642,7 @@ class SP_Player_List extends SP_Custom_Post { if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); $merged[ $player ][ $key ] = $timeval; endforeach; diff --git a/includes/class-sp-player.php b/includes/class-sp-player.php index 5b2deb38..f3967bd8 100644 --- a/includes/class-sp-player.php +++ b/includes/class-sp-player.php @@ -612,7 +612,7 @@ class SP_Player extends SP_Custom_Post { if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); $placeholders[ $season ][ $key ] = $timeval; endforeach; @@ -692,7 +692,7 @@ class SP_Player extends SP_Custom_Post { if ( '00' != $hours ) $timeval = $hours . ':' . $timeval; - $timeval = ereg_replace( '^0', '', $timeval ); + $timeval = preg_replace( '/^0/', '', $timeval ); $merged[ $season ][ $performance_key ] = $timeval; endforeach;