Skip to content

Instantly share code, notes, and snippets.

View gfdesign's full-sized avatar

Fernando gfdesign

View GitHub Profile
@diggeddy
diggeddy / Elementor - Check Radio button by default
Created January 2, 2018 00:08
Make a Elementor form radio button checked by default
/*---- JavaScript Check radio button ------*/
/*---- change ElementID to match the ------*/
<script type="text/javascript">
window.onload = function check() {
document.getElementById("form-field-LABEL-#").checked = true;
}
</script>
@numediaweb
numediaweb / functions.php
Last active October 25, 2022 22:46
Filter WordPress admin side navigation menues
function filter_admin_menues() {
// If administrator then do nothing
if (current_user_can('activate_plugins')) return;
// Remove main menus
$main_menus_to_stay = array(
// Dashboard
'index.php',
@patrickgilmour
patrickgilmour / woocommerce-remove-admin-menu.php
Created June 26, 2014 14:39
Remove WooCommerce Admin Menu for everyone except Administrators
<?php
/**
* Remove the WooCommerce admin menu for everyone except WordPress Administrators
*
*/
add_action( 'admin_menu', 'remove_menus' );
function remove_menus(){
// If the current user is not an admin