functions.php
/**
 * Insert an element at the beggining of the array
 */
Insert an element at the beggining of the array
Insert an element at the beggining of the array
function vogue_cat_columns_array_push_after( $src, $vogue_cat_in, $pos ) {
    if ( is_int( $pos ) ) {
        $R = array_merge( array_slice( $src, 0, $pos + 1 ), $vogue_cat_in, array_slice( $src, $pos + 1 ) );
    } else {
        foreach ( $src as $k => $v ) {
            $R[$k] = $v;
            if ( $k == $pos )
                $R = array_merge( $R, $vogue_cat_in );
        }
    }
    return $R;
}
function vogue_cat_columns_array_push_after ( $ src , $ vogue_cat_in , $ pos ) { if ( is_int ( $ pos ) ) { $ R = array_merge ( array_slice ( $ src , 0 , $ pos + 1 ) , $ vogue_cat_in , array_slice ( $ src , $ pos + 1 ) ) ; } else { foreach ( $ src as $ k => $ v ) { $ R [ $ k ] = $ v ; if ( $ k == $ pos ) $ R = array_merge ( $ R , $ vogue_cat_in ) ; } } return $ R ; }
Insert an element at the beggining of the array
Insert an element at the beggining of the array