| @@ 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 ); |
|
| @@ 29-37 (lines=9) @@ | ||
| 26 | self::$sync[] = $option; |
|
| 27 | } |
|
| 28 | ||
| 29 | static function update_option() { |
|
| 30 | $option = current_filter(); |
|
| 31 | $prefix = 'update_option_'; |
|
| 32 | if ( 0 !== strpos( $option, $prefix ) ) { |
|
| 33 | return; |
|
| 34 | } |
|
| 35 | $option = substr( $option, strlen( $prefix ) ); |
|
| 36 | self::$sync[] = $option; |
|
| 37 | } |
|
| 38 | ||
| 39 | static function delete_option( $option ) { |
|
| 40 | self::$delete[] = $option; |
|