Skip to content

Instantly share code, notes, and snippets.

View Liam-Nothing's full-sized avatar
🌟
Working

Liam Liam-Nothing

🌟
Working
View GitHub Profile
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 28, 2024 16:07
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@omniacode
omniacode / wp-remove-yoast.php
Created October 24, 2017 20:54
Remove Yoast Metabox for Everyone Except Admins
// Removes the Yoast Metabox for Roles other then Admins
// Returns true if user has specific role
function check_user_role( $role, $user_id = null ) {
if ( is_numeric( $user_id ) )
$user = get_userdata( $user_id );
else
$user = wp_get_current_user();
if ( empty( $user ) )
return false;
return in_array( $role, (array) $user->roles );