Title: deprecated argument errors fix
Last modified: May 29, 2019

---

# deprecated argument errors fix

 *  [alx359](https://wordpress.org/support/users/alx359/)
 * (@alx359)
 * [7 years ago](https://wordpress.org/support/topic/deprecated-argument-errors-fix/)
 * Nice plugin, but needs some compatibility adjustments for newer WP.
 * I’m getting the debug.log `[WP_DEBUG=1]` filled with these every time a theme
   color is changed:
 *     ```
       options.php was called with an argument that is deprecated since version 2.7.0! The _colorthemeadmin setting is unregistered. Unregistered settings are deprecated. 
       options.php was called with an argument that is deprecated since version 2.7.0! The _colorthemeadmintop setting is unregistered. Unregistered settings are deprecated.
       options.php was called with an argument that is deprecated since version 2.7.0! The _colorthemeadminwptop setting is unregistered. Unregistered settings are deprecated.
       options.php was called with an argument that is deprecated since version 2.7.0! The _colorthemeadminmain setting is unregistered. Unregistered settings are deprecated.
       ```
   
 * How to get rid of those warnings is explained here:
    [https://codex.wordpress.org/Creating_Options_Pages](https://codex.wordpress.org/Creating_Options_Pages)
 * Options have to be registered first. I put that reg here:
 * `\plugins\colorize-admin\inc\settings.php` ~line 4
 *     ```
       if( is_admin() ) add_action( 'admin_init', 'register_colorthemeadmin_settings' );
       function register_colorthemeadmin_settings() { // whitelist options
         register_setting( 'colorthemeadmin', '_colorthemeadmin' );
         register_setting( 'colorthemeadmin', '_colorthemeadmintop' );
         register_setting( 'colorthemeadmin', '_colorthemeadminwptop' );
         register_setting( 'colorthemeadmin', '_colorthemeadminmain' );
       }
       ```
   
 * Then the form needs to be submitted differently:
 * `\plugins\colorize-admin\inc\admin-options.php` after the opening form tag in
   line 35:
 *     ```
       <form method="post" action="options.php" id="htmlForm">
       <?php settings_fields( 'colorthemeadmin' ); ?>
       <?php do_settings_sections( 'colorthemeadmin' ); ?>
       <?php //wp_nonce_field('update-options'); ?>
       ```
   
 * HTH.
 * Thanks.

The topic ‘deprecated argument errors fix’ is closed to new replies.

 * ![](https://ps.w.org/colorize-admin/assets/icon-128x128.png?rev=1304659)
 * [Colorize Admin](https://wordpress.org/plugins/colorize-admin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/colorize-admin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/colorize-admin/)
 * [Active Topics](https://wordpress.org/support/plugin/colorize-admin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/colorize-admin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/colorize-admin/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [alx359](https://wordpress.org/support/users/alx359/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/deprecated-argument-errors-fix/)
 * Status: not resolved