This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************* Jqueey For Input On Keyup *******************************************/ | |
$('body').on('keyup','#search-query',function(e){ | |
var keyword = $(this).val(); | |
var tablename = $('#table-name').val(); | |
var allColumns = {}; | |
$('.filter-select').each(function () { | |
if($(this).val() != ''){ | |
allColumns[$(this).attr('id')] = $(this).val(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*==================================================== Add New User Roles ======================================== */ | |
add_role( 'author', __( 'Author' ), | |
array( | |
'read' => false, | |
'edit_posts' => false, | |
'edit_pages' => false, | |
'edit_others_posts' => false, | |
'create_posts' => false, | |
'manage_categories' => false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================= Custom Meta Box (Assign Articles) To Custom Post Type ============================ */ | |
function assign_article_metabox() { | |
$post_types = array( 'your-post-type' ); // you can use multiple post types here(array of post types) | |
foreach ( $post_types as $post_type ) { | |
add_meta_box( | |
'member_sectionid', | |
__( 'Name Of Metabox', 'member_textdomain' ), | |
'assign_article_metafields', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*========= Extra Field Function ======== */ | |
function extra_profile_fields( $user ) { | |
$user_meta = get_userdata($user->ID); | |
$user_roles = $user_meta->roles; | |
$role = $user_roles[0]; | |
$contactnumber = get_the_author_meta( 'contactnumber', $user->ID ); | |
$city = get_the_author_meta( 'city', $user->ID ); | |
$pincode = get_the_author_meta( 'pincode', $user->ID ); | |
$state = get_the_author_meta( 'state', $user->ID ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function job_applicants(){ | |
$labels = array( | |
'view_item' => __( 'View Applicant', 'text_domain' ), | |
'add_new_item' => __( 'Add New Applicant', 'text_domain' ), | |
'add_new' => __( 'Add New Applicant', 'text_domain' ), | |
'edit_item' => __( 'Edit Applicant', 'text_domain' ), | |
'update_item' => __( 'Update Applicant', 'text_domain' ), | |
'search_items' => __( 'Search Applicant', 'text_domain' ), | |
'not_found' => __( 'Not found', 'text_domain' ), | |
'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ======================================== Custom Post ============================================= */ | |
function education_post() { | |
$labels = array( | |
'name' => _x( 'Education Blogs', 'Post Type General Name', 'text_domain' ), | |
'singular_name' => _x( 'Education Blog', 'Post Type Singular Name', 'text_domain' ), | |
'menu_name' => __( 'Education Blogs', 'text_domain' ), | |
'parent_item_colon' => __( 'Parent Education Blog:', 'text_domain' ), | |
'all_items' => __( 'All Education Blogs', 'text_domain' ), | |
'view_item' => __( 'View Education Blog', 'text_domain' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function all_woocommerce_cart_expire_timeout(){ | |
global $prod_ids; | |
global $product_timeout; | |
function action_woocommerce_add_to_cart( $array, $int, $int ) { | |
function perform_task() { | |
$start_time = time(); | |
return $start_time; | |
} |