Skip to content

Instantly share code, notes, and snippets.

@gabrielmerovingi
Created April 13, 2017 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielmerovingi/61e44fe622555b9095feef7379601943 to your computer and use it in GitHub Desktop.
Save gabrielmerovingi/61e44fe622555b9095feef7379601943 to your computer and use it in GitHub Desktop.
FIX: When editing a Scratch Card Set, we should see a metabox called "Actions" instead of the default "Publish". If this is not the case, add the following code snippet to your theme's functions.php file. If the code does not work, try incrementing the priority of the function 999 to 9999 (or higher if needed).
/**
* Scratch Card Metabox Fix
* @version 1.0
*/
function mycred_scratch_metabox_fix( $post ) {
remove_meta_box( 'submitdiv', 'scratch_card_set', 'side' );
add_meta_box( 'submitdiv', __( 'Actions', 'mycred' ), 'mycred_scratch_card_submit_metabox', 'scratch_card_set', 'side', 'high' );
}
add_action( 'add_meta_boxes_scratch_card_set', 'mycred_scratch_metabox_fix', 999 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment