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