This file contains hidden or 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_filter('upload_mimes', 'admin_upload_svg'); | |
function admin_upload_svg ( $existing_mimes=array() ) { | |
$user = wp_get_current_user(); | |
// If the user is an admin, add the svg mimetype to the list. | |
if(in_array( 'administrator', (array) $user->roles )) { |
This file contains hidden or 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 add_member_link_item_to_menu( $items, $args ){ | |
//change theme location with your them location name | |
if( is_admin() || $args->theme_location != 'primary-right-menu' ) | |
return $items; | |
$link = '<a href="#">Member Area</a>'; | |
return $items .= '<li id="members-only-link" class="menu-item menu-type-link">'. $link . '</li>'; | |
} |
This file contains hidden or 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
/** | |
* A Little Helper for getting specific image sizes from image custom fields. | |
*/ | |
function get_image_field($field, $size = 'thumbnail') | |
{ | |
return acf_get_image_thumnails($field, $size, 'field'); | |
} | |
function get_image_sub_field($field, $size = 'thumbnail') |
This file contains hidden or 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
/* Print Styles for wp_help */ | |
@media print { | |
/* WP Admin Elements */ | |
#adminmenuwrap { | |
display:none; | |
} |