original_string: public function filter($text, array $options = array()) {
  
          if (!isset($options['originalformat'])) {
              // if the format is not specified, we are probably called by {@see format_string()}
              // in that case, it would be dangerous to replace text with the image because it could
              // be stripped. therefore, we do nothing
              return $text;
          }
          if (in_array($options['originalformat'], explode(',', get_config('filter_emoticon', 'formats')))) {
              return $this->replace_emoticons($text);
          }
          return $text;
      }
code: public function filter($text, array $options = array()) {
  
          if (!isset($options['originalformat'])) {
              // if the format is not specified, we are probably called by {@see format_string()}
              // in that case, it would be dangerous to replace text with the image because it could
              // be stripped. therefore, we do nothing
              return $text;
          }
          if (in_array($options['originalformat'], explode(',', get_config('filter_emoticon', 'formats')))) {
              return $this->replace_emoticons($text);
          }
          return $text;
      }
code_tokens: public function filter ( $ text , array $ options = array ( ) ) { if ( ! isset ( $ options [ 'originalformat' ] ) ) { // if the format is not specified, we are probably called by {@see format_string()} // in that case, it would be dangerous to replace text with the image because it could // be stripped. therefore, we do nothing return $ text ; } if ( in_array ( $ options [ 'originalformat' ] , explode ( ',' , get_config ( 'filter_emoticon' , 'formats' ) ) ) ) { return $ this -> replace_emoticons ( $ text ) ; } return $ text ; }
docstring: Apply the filter to the text
  
  @see filter_manager::apply_filter_chain()
  @param string $text to be processed by the text
  @param array $options filter options
  @return string text after processing
docstring_tokens: Apply the filter to the text