@@ -159,6 +159,9 @@ discard block |
||
| 159 | 159 | 'queue' => array(), |
| 160 | 160 | ); |
| 161 | 161 | |
| 162 | + /** |
|
| 163 | + * @param integer|null $status_default_value |
|
| 164 | + */ |
|
| 162 | 165 | public function get_status( $status_key, $status_default_value, $module_name = null ) { |
| 163 | 166 | if ( $module_name ) { |
| 164 | 167 | return get_option( self::STATUS_OPTION . '_' . $status_key . '_' . $module_name, $status_default_value ); |
@@ -166,6 +169,9 @@ discard block |
||
| 166 | 169 | return get_option( self::STATUS_OPTION . '_' . $status_key, $status_default_value ); |
| 167 | 170 | } |
| 168 | 171 | |
| 172 | + /** |
|
| 173 | + * @param string $status_key |
|
| 174 | + */ |
|
| 169 | 175 | public function update_status( $status_key, $status_value, $module_name = null ) { |
| 170 | 176 | if ( $module_name ) { |
| 171 | 177 | return $this->update_option( self::STATUS_OPTION . '_' . $status_key . '_' . $module_name, $status_value ); |
@@ -173,6 +179,9 @@ discard block |
||
| 173 | 179 | return $this->update_option( self::STATUS_OPTION . '_' . $status_key, $status_value ); |
| 174 | 180 | } |
| 175 | 181 | |
| 182 | + /** |
|
| 183 | + * @param string $option_name |
|
| 184 | + */ |
|
| 176 | 185 | private function update_option( $option_name, $new_value ) { |
| 177 | 186 | global $wp_version; |
| 178 | 187 | if ( version_compare( '4.2.0', $wp_version, '<=' ) ) { |