rpress_vegan_options

Author: RestroPress 382 views

rpress_vegan_options filter allows to get vegan option. It returns the foods on the basis of category of vegan and not vegan .We can add more food item category through this filter.

The filter includes one parameter $vegan_options.

apply_filters( ‘rpress_vegan_options’, $vegan_options );

Example:

function rpress_vegan_options_callback( $vegan_options) {
        $vegan_options = array(
           'veg' => __( 'Veg', 'restropress' ),
           'non_veg' => __( 'Non Veg', 'restropress' ),
        );

  return $vegan_options;

}
add_filter( 'rpress_vegan_options', 'rpress_vegan_options_callback', 10, 1 );