| @@ -1232,18 +1232,22 @@ | ||
| 1232 | 1232 | * @return int Timeout, in seconds. |
| 1233 | 1233 | */ |
| 1234 | 1234 | private function get_timeout() { |
| 1235 | 1235 | |
| 1236 | - $timeout = 10; | |
| 1236 | + // Buffer's createPost can take longer than 10 seconds when fetching images. | |
| 1237 | + $timeout = 30; | |
| 1237 | 1238 | |
| 1238 | 1239 | /** |
| 1239 | 1240 | * Defines the maximum time to allow the API request to run. |
| 1240 | 1241 | * |
| 1241 | - * @since 1.0.0 | |
| 1242 | + * @since 6.2.6 | |
| 1242 | 1243 | * |
| 1243 | 1244 | * @param int $timeout Timeout, in seconds. |
| 1244 | 1245 | */ |
| 1245 | - $timeout = apply_filters( $this->base->plugin->filter_name . '_pro_api_get_timeout', $timeout ); | |
| 1246 | + $timeout = apply_filters( $this->base->plugin->filter_name . '_api_get_timeout', $timeout ); | |
| 1247 | + | |
| 1248 | + // Backward compat for the previous, misnamed filter. | |
| 1249 | + $timeout = apply_filters_deprecated( $this->base->plugin->filter_name . '_pro_api_get_timeout', array( $timeout ), '6.2.6', $this->base->plugin->filter_name . '_api_get_timeout' ); | |
| 1246 | 1250 | |
| 1247 | 1251 | return $timeout; |
| 1248 | 1252 | |
| 1249 | 1253 | } |