Skip to content

Instantly share code, notes, and snippets.

@1naveengiri
Last active September 21, 2022 04:48
Show Gist options
  • Save 1naveengiri/124008698756bf745ab8311de04bb3f6 to your computer and use it in GitHub Desktop.
Save 1naveengiri/124008698756bf745ab8311de04bb3f6 to your computer and use it in GitHub Desktop.
UsersWP quora social icon
<?php
add_filter( 'uwp_form_fields_predefined', 'uwp_form_fields_predefined_custom_callback', 10, 2 );
function uwp_form_fields_predefined_custom_callback( $custom_fields, $type ){
$custom_fields['quora'] = array(
'field_type' => 'url',
'class' => 'uwp-quora',
'field_icon' => 'fab fa-quora',
'site_title' => __( 'quora', 'userswp' ),
'help_text' => __( 'Let users enter their quora url.', 'userswp' ),
'defaults' => array(
'admin_title' => 'quora',
'site_title' => 'quora',
'form_label' => __( 'quora url', 'userswp' ),
'htmlvar_name' => 'quora',
'is_active' => 1,
'default_value' => '',
'is_required' => 0,
'required_msg' => '',
'field_icon' => 'fab fa-quora',
'css_class' => 'btn-quora'
)
);
return $custom_fields;
}
add_filter( 'uwp_widget_button_group_args', 'uwp_widget_button_group_btn_args_custom_callback', 10, 3 );
function uwp_widget_button_group_btn_args_custom_callback( $args, $widget_args, $handle ){
$args['fields'] = 'facebook,twitter,instagram, quora, linkedin,flickr,github,youtube,wordpress,tiktok,user_url';
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment