affyb ' . __('settings panel','affyb') . '', null, 'affyb-options');
add_settings_field('facebook_url', __('Facebook username','affyb'), 'set_facebook_element', 'affyb-options', 'section');
add_settings_field('twitter_url', __('Twitter username','affyb'), 'set_twitter_element', 'affyb-options', 'section');
add_settings_field('googleplus_url', __('Google plus username','affyb'), 'set_googleplus_element', 'affyb-options', 'section');
add_settings_field('instagram_url', __('Instagram username','affyb'), 'set_instagram_element', 'affyb-options', 'section');
add_settings_field('netiquette', __('Netiquette message','affyb'), 'set_netiquette', 'affyb-options', 'section');
add_settings_field('excerpt_lenght', __('Excerpt lenght - max 250, default 80','affyb'), 'set_excerpt_lenght', 'affyb-options', 'section');
register_setting('section', 'facebook_url');
register_setting('section', 'twitter_url');
register_setting('section', 'googleplus_url');
register_setting('section', 'instagram_url');
register_setting('section', 'netiquette');
register_setting('section', 'excerpt_lenght');
}
add_action('admin_init', 'display_affyb_panel_fields');
function display_facebook_URL() {
if ( get_option( 'facebook_url' ) ) {
echo '' . get_option('facebook_url') . '
';
}
}
function display_twitter_URL() {
if ( get_option( 'twitter_url' ) ) {
echo '';
}
}
function display_googleplus_URL() {
if ( get_option( 'googleplus_url' ) ) {
echo '' . get_option('googleplus_url') . '
';
}
}
function display_instagram_URL() {
if ( get_option( 'instagram_url' ) ) {
echo '' . get_option('instagram_url') . '
';
}
}
function display_netiquette() {
if ( get_option( 'netiquette' ) ) {
echo '' . get_option('netiquette') . '
';
}
}
function affyb_show_extra_profile_fields( $user ) { ?>