function wp_vendor_products_upload_limit( $user ) {
if ( is_super_admin() ) {
?>
<h3><?php _e('Vendor Product Upload Limit'); ?></h3>
<table class="form-table">
<tr>
<th>
<label for="no_of_vendor_products"><?php _e('No of Products'); ?>
</label></th>
<td>
<input type="text" name="no_of_vendor_products" id="no_of_vendor_products" value="<?php echo esc_attr( get_the_author_meta( 'no_of_vendor_products', $user->ID ) ); ?>" class="regular-text" /><br />
<span class="description"><?php _e('Please enter no. of products.'); ?></span>
</td>
</tr>
</table>
<?php
}
}
function wp_save_vendor_products_upload_limit( $user_id ) {
if ( !current_user_can( 'edit_user', $user_id ) )
return FALSE;
update_usermeta( $user_id, 'no_of_vendor_products', $_POST['no_of_vendor_products'] );
}
add_action( 'show_user_profile', 'wp_vendor_products_upload_limit' );
add_action( 'edit_user_profile', 'wp_vendor_products_upload_limit' );
add_action( 'personal_options_update', 'wp_save_vendor_products_upload_limit' );
add_action( 'edit_user_profile_update', 'wp_save_vendor_products_upload_limit' );
add_action('manage_users_columns','remove_user_posts_column');
function remove_user_posts_column($column_headers) {
unset($column_headers['posts']);
return $column_headers;
}