action == 'add' ) { return true; } } return false; } } if ( !function_exists( 'product_post_type_array' ) ) { function product_post_type_array() { $array = apply_filters( 'product_post_type_array', array( 'al_product' ) ); return $array; } } if ( !function_exists( 'get_current_screen_post_type' ) ) { function get_current_screen_post_type() { $obj = get_queried_object(); $post_type = apply_filters( 'current_product_post_type', 'al_product' ); if ( isset( $obj->post_type ) && strpos( $obj->post_type, 'al_product' ) !== false ) { $post_type = $obj->post_type; } else if ( isset( $obj->name ) && strpos( $obj->name, 'al_product' ) !== false ) { $post_type = $obj->name; } else if ( isset( $_GET[ 'post_type' ] ) && strpos( $_GET[ 'post_type' ], 'al_product' ) !== false ) { $post_type = $_GET[ 'post_type' ]; } return apply_filters( 'ic_current_post_type', $post_type ); } }