A filter is functionality that allows to modify content of particular functions (price format, item title etc.). Function added to filter have 1 input parameter – content that can be modified. Function returns output as modified content.

osc_add_filter('filter_name', 'function_name');

Example for filters might be need to capitalize items title:

osc_add_filter('item_title', function($title) { return ucwords($title); }); 

List of filters

Keep in mind that not all filters are listed here, we will try to make this list as accurate as possible. List is written in form: {name of filter} / {file where filter is used} / {short description}.

  • item_title / item.php – affects the title of the item
  • item_description / item.php – affects the description of the item
  • slug / model/Category.php – could change the slug of the categories (usefull for especial characters as ä, ü, …)
  • resource_path / media_processing.php(oc-admin) – affects the resource path
  • structured_data_title_filter / structured-data.php – affects the title in structured data
  • structured_data_description_filter / structured-data.php – affects the description in structured data
  • structured_data_image_filter / structured-data.php – affects the image in structured data
  • structured_data_url_filter / structured-data.php – affects the current URL in structured data
  • actions_manage_items / items_processing.php – could add more actions on actions list at manage listing. An array of ‘actions’ is passed and an array with the item information.
  • more_actions_manage_items / items_processing.php – could add more actions on ‘more actions’ list at manage listing. An array of ‘actions’ is passed and an array with the item information.
  • actions_manage_users / items_processing.php – could add more actions on actions list at manage users. An array of ‘actions’ is passed and an array with the user information.
  • more_actions_manage_users / items_processing.php – could add more actions on ‘more actions’ list at manage users. An array of ‘actions’ is passed and an array with the user information.
  • datatable_user_class / user/index.php – backoffice user list row class
<tr class="<?php echo implode(' ', osc_apply_filter('datatable_user_class', array(), $aRawRows[$key], $row)); ?>">
  • datatable_listing_class / item/index.php – backoffice listing list row class
<tr class="<?php echo implode(' ', osc_apply_filter('datatable_listing_class', array(), $aRawRows[$key], $row)); ?>">
  • datatable_alert_class / user/alert.php – backoffice alert list row class
<tr class="<?php echo implode(' ', osc_apply_filter('datatable_alert_class', array(), $aRawRows[$key], $row)); ?>">
  • meta_generator / oc-load.php – Osclass generator meta tag

.. more filters to be added