Get_setting: Deprecated
-
Hello everybody !
Actually, i want to create a wordpress theme
to diffuse it for free.
But i got a problem :
I followed this example : http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/
But he’s using twice this function : get_setting, who’s
deprecated.This is the location of these functions :
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser. Or use pastebin.com instead. ]
// This will keep track of the checkbox options for the validate_settings function. $this->checkboxes = array(); $this->settings = array(); $this-><strong>get_settings();</strong> $this->sections['header'] = __( 'Header' ); $this->sections['menu'] = __( 'Menu' );And :
register_settings() { register_setting( 'mytheme_options', 'mytheme_options', array ( &$this, 'validate_settings' ) ); foreach ( $this->sections as $slug => $title ) { if ( $slug == 'about' ) add_settings_section( $slug, $title, array( &$this, 'display_about_section' ), 'mytheme-options' ); else add_settings_section( $slug, $title, array( &$this, 'display_section' ), 'mytheme-options' ); } $this-><strong>get_settings();</strong> foreach ( $this->settings as $id => $setting ) { $setting['id'] = $id; $this->create_setting( $setting ); } }I need help guys !
Thank you for reading !
The topic ‘Get_setting: Deprecated’ is closed to new replies.