I ended up going with another approach. I check to see what the current user’s role is, then if the role is ‘author’, enqueued a CSS file to hide the sticky option’s checkbox.
In the theme’s functions.php file:
function hide_sticky_option($hook) {
global $current_user;
if('post.php'== $hook || 'post-new.php'==$hook){
$role = array_shift($current_user->roles); //get role of current user
if($role=='author'){ //if role of current user is 'author'
wp_enqueue_style('hide_sticky_option', get_template_directory_uri() . '/css/admin-post-style.css' );
}
}
}
add_action( 'admin_enqueue_scripts', 'hide_sticky_option' );
admin-post-style.css:
#sticky-span {
display:none !important;
}