WP_Editor – Saving Value into Plugin Option – Stripping HTML

The Problem This turned out to be a common case of needing to use stripslashes();. How did I figure this out? I logged into phpMyAdmin, navigated to the options table, found my option name, and edited it. Here’s what I discovered… s:11:”description”;s:90:”<span style=\”text-decoration: underline;\”>This is supposed to be underlined text.</span>”; So obviously my plugin is … Read more

Preserve old values on error in setting API

Unfortunately WordPress does not provide the old value as an additional argument to your sanitize_callback callable. This is supported in general by the option validator hook that WordPress calls when saving the updated setting… return apply_filters( “sanitize_option_{$option}”, $value, $option, $original_value ); …but in practice it is not actually registered with any additional arguments when the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)