| @@ -9,8 +9,9 @@ | ||
| 9 | 9 | require_once PHOTONIC_PATH . '/Components/Printable.php'; |
| 10 | 10 | require_once PHOTONIC_PATH . '/Components/Stack_Trace.php'; |
| 11 | 11 | require_once PHOTONIC_PATH . '/Components/Header.php'; |
| 12 | 12 | require_once PHOTONIC_PATH . '/Components/Error.php'; |
| 13 | +require_once PHOTONIC_PATH . '/Components/Comment.php'; | |
| 13 | 14 | |
| 14 | 15 | /** |
| 15 | 16 | * Gallery processor class to be extended by individual processors. This class has an abstract method called <code>get_gallery_images</code> |
| 16 | 17 | * that has to be defined by each inheriting processor. |
| @@ -18,9 +19,10 @@ | ||
| 18 | 19 | * This is also where the OAuth support is implemented. The URLs are defined using abstract functions, while a handful of utility functions are defined. |
| 19 | 20 | * Most utility functions have been adapted from the OAuth PHP package distributed here: https://code.google.com/p/oauth-php/. |
| 20 | 21 | */ |
| 21 | 22 | abstract class Base { |
| 22 | - public $api_key, $api_secret, $provider, $user_agent, $nonce, $oauth_timestamp, $signature_parameters, $link_lightbox_title, | |
| 23 | + public $api_key; | |
| 24 | + public $api_secret, $provider, $user_agent, $nonce, $oauth_timestamp, $signature_parameters, $link_lightbox_title, | |
| 23 | 25 | $oauth_version, $oauth_done, $show_more_link, $gallery_index, $common_parameters, |
| 24 | 26 | $doc_links, $password_protected, $token, $token_secret, $show_buy_link, $stack_trace; |
| 25 | 27 | |
| 26 | 28 | protected function __construct() { |
| @@ -172,12 +174,12 @@ | ||
| 172 | 174 | /** |
| 173 | 175 | * Retrieves the error messages from a WP_Response object and formats them in a display-ready markup. |
| 174 | 176 | * |
| 175 | 177 | * @param WP_Error $response |
| 176 | - * @param bool $server_msg | |
| 178 | + * @param bool $server_msg | |
| 177 | 179 | * @return string |
| 178 | 180 | */ |
| 179 | - public function wp_error_message($response, $server_msg = true): string { | |
| 181 | + public function wp_error_message(WP_Error $response, bool $server_msg = true): string { | |
| 180 | 182 | $ret = ''; |
| 181 | 183 | if ($server_msg) { |
| 182 | 184 | $ret = $this->get_server_error() . "<br/>\n"; |
| 183 | 185 | } |
| @@ -259,9 +261,9 @@ | ||
| 259 | 261 | * |
| 260 | 262 | * @param array $args |
| 261 | 263 | * @return string |
| 262 | 264 | */ |
| 263 | - public function execute_helper($args = []): string { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter | |
| 265 | + public function execute_helper(array $args = []): string { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter | |
| 264 | 266 | // Blank method, to be overridden by child classes |
| 265 | 267 | return ''; |
| 266 | 268 | } |
| 267 | 269 | |