Changeset 5230 for sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/filter/class-options.php
- Timestamp:
- 04/01/2017 02:00:51 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/rosetta/inc/filter/class-options.php
r4032 r5230 9 9 */ 10 10 private $options = []; 11 12 /** 13 * @var Option[] 14 */ 15 private $filter_options = []; 16 11 17 12 18 /** … … 24 30 25 31 /** 32 * @param Option $option The option. 33 */ 34 public function add_filter_option( Option $option ) { 35 $this->filter_options[] = $option; 36 } 37 38 /** 26 39 * Registers the filters. 27 40 */ … … 35 48 ); 36 49 } 50 51 foreach ( $this->filter_options as $option ) { 52 add_filter( 53 "option_{$option->get_name()}", 54 $option->get_callback(), 55 $option->get_priority(), 56 $option->get_num_args() 57 ); 58 } 37 59 } 38 60 }
Note: See TracChangeset
for help on using the changeset viewer.