Title: Edit plugin without editing plugin files
Last modified: July 12, 2017

---

# Edit plugin without editing plugin files

 *  Resolved [benjaminmattsson](https://wordpress.org/support/users/benjaminmattsson/)
 * (@benjaminmattsson)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/edit-plugin-without-editing-plugin-files/)
 * Hi,
 * I want to change some things in the plugin, for example the measurements. I’ve
   succesfully changed the wording in “class.cooked-measurements.php” but this is
   not the best way to do it since it will be replaced when updating the plugin,
   right?
 * A comment says “Use the “cooked_measurements” filter to add your own measurements”.
   How do I do that? Where should I paste my edited code to override the plugins’
   wording? Is it in my child themes function.php?
 * Br,
    Benjamin

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Boxy Studio](https://wordpress.org/support/users/boxystudio/)
 * (@boxystudio)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/edit-plugin-without-editing-plugin-files/#post-9350619)
 * You would place this code either in your theme’s functions.php file (easy option)
   or create a custom plugin that includes the code (best option):
 *     ```
       add_filter( 'cooked_measurements', 'custom_cooked_measurements', 10, 1 );
       function custom_cooked_measurements( $measurements ){
       	$measurements['a'] = array(
       		'singular_abbr' => 'a',
       		'plural_abbr' => 'aa',
       		'singular' => 'custom a',
       		'plural' => 'custom a plural'
       	);
       	$measurements['b'] = array(
       		'singular_abbr' => 'b',
       		'plural_abbr' => 'bb',
       		'singular' => 'custom b',
       		'plural' => 'custom b plural'
       	);
           return $measurements;
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Edit plugin without editing plugin files’ is closed to new replies.

 * ![](https://ps.w.org/cooked/assets/icon-256x256.png?rev=2005204)
 * [Cooked - Recipe Management](https://wordpress.org/plugins/cooked/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cooked/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cooked/)
 * [Active Topics](https://wordpress.org/support/plugin/cooked/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cooked/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cooked/reviews/)

## Tags

 * [Measurements](https://wordpress.org/support/topic-tag/measurements/)

 * 1 reply
 * 2 participants
 * Last reply from: [Boxy Studio](https://wordpress.org/support/users/boxystudio/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/edit-plugin-without-editing-plugin-files/#post-9350619)
 * Status: resolved