| @@ -247,12 +247,12 @@ | ||
| 247 | 247 | ); |
| 248 | 248 | |
| 249 | 249 | if (!current_user_can($capability)) { |
| 250 | 250 | wp_die( |
| 251 | - wp_kses_post(__( | |
| 251 | + __( | |
| 252 | 252 | 'You do not have sufficient permissions to access this page.', |
| 253 | 253 | 'vimeography' |
| 254 | - )) | |
| 254 | + ) | |
| 255 | 255 | ); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | echo $this->_view->render($this->_controller); |
| @@ -265,32 +265,15 @@ | ||
| 265 | 265 | * @return void |
| 266 | 266 | */ |
| 267 | 267 | public static function vimeography_process_actions() |
| 268 | 268 | { |
| 269 | - | |
| 270 | 269 | if (isset($_POST['vimeography-action'])) { |
| 271 | - self::setActionNonce($_POST['vimeography-action']); | |
| 272 | 270 | do_action('vimeography_action_' . $_POST['vimeography-action'], $_POST); |
| 273 | 271 | } |
| 274 | 272 | |
| 275 | 273 | if (isset($_GET['vimeography-action'])) { |
| 276 | - self::setActionNonce($_GET['vimeography-action']); | |
| 277 | 274 | do_action('vimeography_action_' . $_GET['vimeography-action'], $_GET); |
| 278 | 275 | } |
| 279 | - } | |
| 280 | - | |
| 281 | - /** | |
| 282 | - * setActionNonce create and save nonce in the session | |
| 283 | - * | |
| 284 | - * @param mixed $key | |
| 285 | - * @return void | |
| 286 | - */ | |
| 287 | - private static function setActionNonce($key){ | |
| 288 | - $key = "nonce_$key"; | |
| 289 | - // Générer le nonce | |
| 290 | - $nonce = wp_create_nonce($key); | |
| 291 | - // Stocker le nonce dans la session | |
| 292 | - $_SESSION[$key] = $nonce; | |
| 293 | 276 | } |
| 294 | 277 | |
| 295 | 278 | /** |
| 296 | 279 | * Sets the galleries per page in the screen options on the gallery list page. |