Saving plugin’s settings in 1 field in json format

There’s always a character limit, but option_value is LONGTEXT so unless you anticipate more than 4GB of data you should be fine. I’d suggest json is unnecessary – you can save a PHP array as the value and it will be serialized/deserialized automatically. That said, as Tom points out, this is really micro-optimising, and won’t … Read more

Output ‘do_settings_sections()’ as tabs, not one under the other

So because I couldn’t find an out of the box way, I created this. Don’t forget to enqueue the jquery-ui-tabs script – /** Replace the call to ‘do_settings_sections()’ with a call to this function */ function do_settings_sections_tabs($page){ global $wp_settings_sections, $wp_settings_fields; if(!isset($wp_settings_sections[$page])) : return; endif; echo ‘<div id=”abb-tabs”>’; echo ‘<ul>’; foreach((array)$wp_settings_sections[$page] as $section) : if(!isset($section[‘title’])) continue; … Read more

Settings Page won’t save

For anyone else that may not have read the above comments and are having a possibly similar issue, @epilektric has answered the question stating that the = sign was missing after the value attribute under the field_1 and field_2 functions.

wordpress settings API and option array structure

The Settings API generally expects data in the key => value form. I’m sure it is possible to save array data using the Settings API, but it somewhat circumvents the purpose of the API. If I’m understanding your question correctly, you’re trying to take a Plugin Option, and use the value of that option to … Read more

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