equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 /** |
2 /** |
3 * Error Protection API: WP_Paused_Extensions_Storage class |
3 * Error Protection API: WP_Paused_Extensions_Storage class |
4 * |
4 * |
5 * @package WordPress |
5 * @package WordPress |
6 * @since 5.2.0 |
6 * @since 5.2.0 |
7 */ |
7 */ |
8 |
8 |
9 /** |
9 /** |
10 * Core class used for storing paused extensions. |
10 * Core class used for storing paused extensions. |
11 * |
11 * |
78 * Forgets a previously recorded extension error. |
78 * Forgets a previously recorded extension error. |
79 * |
79 * |
80 * @since 5.2.0 |
80 * @since 5.2.0 |
81 * |
81 * |
82 * @param string $extension Plugin or theme directory name. |
82 * @param string $extension Plugin or theme directory name. |
83 * |
|
84 * @return bool True on success, false on failure. |
83 * @return bool True on success, false on failure. |
85 */ |
84 */ |
86 public function delete( $extension ) { |
85 public function delete( $extension ) { |
87 if ( ! $this->is_api_loaded() ) { |
86 if ( ! $this->is_api_loaded() ) { |
88 return false; |
87 return false; |
119 * Gets the error for an extension, if paused. |
118 * Gets the error for an extension, if paused. |
120 * |
119 * |
121 * @since 5.2.0 |
120 * @since 5.2.0 |
122 * |
121 * |
123 * @param string $extension Plugin or theme directory name. |
122 * @param string $extension Plugin or theme directory name. |
124 * |
|
125 * @return array|null Error that is stored, or null if the extension is not paused. |
123 * @return array|null Error that is stored, or null if the extension is not paused. |
126 */ |
124 */ |
127 public function get( $extension ) { |
125 public function get( $extension ) { |
128 if ( ! $this->is_api_loaded() ) { |
126 if ( ! $this->is_api_loaded() ) { |
129 return null; |
127 return null; |