Merge pull request #3696 from BFTrick/product-tabs-clean-input

Making Sure the User Doesn't Submit Garbage to woocommerce_sort_product_tabs Function
This commit is contained in:
Mike Jolley 2013-09-02 09:45:25 -07:00
commit d7a68b68f2
1 changed files with 7 additions and 0 deletions

View File

@ -988,10 +988,17 @@ if ( ! function_exists( 'woocommerce_sort_product_tabs' ) ) {
* Sort tabs by priority
*
* @access public
* @param mixed $tabs
* @return void
*/
function woocommerce_sort_product_tabs( $tabs = array() ) {
// Make sure the $tabs parameter is an array
if ( ! is_array( $tabs ) ) {
trigger_error( "Function woocommerce_sort_product_tabs() expects an array as the first parameter. Defaulting to empty array." );
$tabs = array( );
}
// Re-order tabs by priority
if ( ! function_exists( '_sort_priority_callback' ) ) {
function _sort_priority_callback( $a, $b ) {