| @@ 764-775 (lines=12) @@ | ||
| 761 | $this->register( 'delete_option', $option ); |
|
| 762 | } |
|
| 763 | ||
| 764 | function updated_option_action() { |
|
| 765 | // The value of $option isn't passed to the filter |
|
| 766 | // Calculate it |
|
| 767 | $option = current_filter(); |
|
| 768 | $prefix = 'update_option_'; |
|
| 769 | if ( 0 !== strpos( $option, $prefix ) ) { |
|
| 770 | return; |
|
| 771 | } |
|
| 772 | $option = substr( $option, strlen( $prefix ) ); |
|
| 773 | ||
| 774 | $this->added_option_action( $option ); |
|
| 775 | } |
|
| 776 | ||
| 777 | function added_option_action( $option ) { |
|
| 778 | $this->register( 'option', $option ); |
|
| @@ 50-58 (lines=9) @@ | ||
| 47 | self::$delete[] = $option; |
|
| 48 | } |
|
| 49 | ||
| 50 | static function update_option() { |
|
| 51 | $option = current_filter(); |
|
| 52 | $prefix = 'update_option_'; |
|
| 53 | if ( 0 !== strpos( $option, $prefix ) ) { |
|
| 54 | return; |
|
| 55 | } |
|
| 56 | $option = substr( $option, strlen( $prefix ) ); |
|
| 57 | self::$sync[] = $option; |
|
| 58 | } |
|
| 59 | ||
| 60 | static function add_option( $option ) { |
|
| 61 | self::$sync[] = $option; |
|