RestroPress

⌘K
  1. Home
  2. Docs
  3. RestroPress
  4. Developer Docs
  5. Filters
  6. rpress_vegan_options

rpress_vegan_options

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 );

How can we help?