Created
September 19, 2023 15:11
-
-
Save rilwis/af699bcf48cdcd4d17a5c2c402187ed3 to your computer and use it in GitHub Desktop.
Test WP update button always active
This file contains 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
<?php | |
// This code shows a simple meta box with a simple text, no inputs. | |
// And the "Update" button in WordPress is always active, e.g. never disabled, even if there's no changes, no updates. | |
add_action( 'add_meta_boxes', function() { | |
add_meta_box( 'test', 'Test', 'my_callback_func', 'post' ); | |
} ); | |
function my_callback_func() { | |
echo 'Just a text, and the Update button is always active.'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment