function createSlideCallback() { mpslVerifyNonce(); require_once $this->pluginDir . 'SlideOptions.php'; if (isset($_POST['slider_id'])) { $sliderId = (int) $_POST['slider_id']; $mpsl_options = new MPSLSlideOptions(); $mpsl_options->create($sliderId); } else { mpslSetError(__('Slider ID is not set.', MPSL_TEXTDOMAIN)); } die; }