Emoji | Commit Type |
---|---|
🎉 :tada: |
Initial Commit |
✨ :sparkles: |
New Feature |
🔖 :bookmark: |
Version Tag |
🐛 :bug: |
BugFix |
💥 :boom: |
HotFix |
💄 :lipstick: |
UIFix |
📚 :books: |
Documentation |
🧪 :test_tube: |
Test |
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
const contrast: string = r * 0.299 + g * 0.587 + b * 0.114 > 186 ? 'black' : 'white' |
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
<?php | |
// disallow users from accessing other users posts | |
function posts_for_current_author($query) { | |
global $pagenow; | |
if( 'edit.php' != $pagenow || !$query->is_admin ) | |
return $query; | |
if( !current_user_can( 'manage_options' ) ) { |
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
<?php | |
function enqueue_debug_scripts ($hook) { | |
echo "<p style='text-align:center;'>" .$hook. "</p>"; | |
} | |
add_action('admin_enqueue_scripts', 'enqueue_debug_scripts'); | |
?> |
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
<?php | |
function woo_order_status_changed_to_pending($order_id) { | |
error_log("$order_id set to PENDING", 0); | |
} | |
function woo_order_status_changed_to_failed($order_id) { | |
error_log("$order_id set to FAILED", 0); | |
} | |
function woo_order_status_changed_to_hold($order_id) { | |
error_log("$order_id set to ON HOLD", 0); | |
} |