Skip to content

Instantly share code, notes, and snippets.

View 1naveengiri's full-sized avatar
🏠
Working from home

Naveen Giri 1naveengiri

🏠
Working from home
View GitHub Profile
@1naveengiri
1naveengiri / uwp-quora-icon.php
Last active September 21, 2022 04:48
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(
@1naveengiri
1naveengiri / functions.php
Last active December 13, 2023 15:33
Disable admin panel for the subscribers and add wp-login.php to custom login page
<?php
add_filter( 'show_admin_bar' , 'bd_disable_admin_bar');
function bd_disable_admin_bar($show_admin_bar) {
return ( current_user_can( 'administrator' ) ) ? $show_admin_bar : false;
}
add_action('init','redirect_to_login_page');
function redirect_to_login_page(){
global $pagenow;
@1naveengiri
1naveengiri / gist:53777e7ec18dd11537135e0a3f55761f
Last active May 3, 2024 08:07
Change and Add lists names
<?php
// Define the custom function to modify Trello card stages.
function bd_custom_job_stages( $stages ) {
// Modify the stages name in the array as needed.
$stages = array(
'Job Started',
'Survey',
'Approval',
'Manufacturing',
'Book Job',