Skip to content

Ignored Words List #8

Open
wants to merge 2 commits into from

2 participants

@ericmann
ericmann commented Nov 7, 2012

Allow users/applications to define a custom dictionary of ignored word by adding a space-delimited list to $config['general.ignored_words'] in config.php.

As an example, I've added both "WordPress" and "TinyMCE" to the list of ignored words in the configuration file since both are inaccurately flagged as misspellings. Making this a configurable option allows other users to add their own application/product/exotic names so that they aren't constantly flagged by the software.

@ericmann ericmann Add Ignore List
Allow users/applications to define a custom dictionary of ignored word by adding a space-delimited list to `$config['general.ignored_words']` in `config.php`.
ebe8e60
@nacin
nacin commented on ebe8e60 Nov 7, 2012

Rather than array_splice(), use unset( $words[ $index ] ); This ensures the right index is always removed, regardless of how $words is indexed.

@nacin
nacin commented Nov 7, 2012

The other issue is that $index could be 0. So you'd want to do false !== $index = array_search( $ignore, $words ).

@ericmann ericmann Use unset()
Use a faster, more reliable method for removing items from the word search array.
1a0dd47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.