Last active
December 8, 2018 15:30
-
-
Save cagriuckan/57f7fee8a8bbd7b32dbd0b3d8fc8b757 to your computer and use it in GitHub Desktop.
Wordpress 5.0 ve üstü versiyonlarda gutenberg editörü yerine eski klasik editörü kullanmaya devam etmek için functions.php'ye eklenmesi gereken kod.
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 | |
function kan_gulegule_gutenberg() { | |
if (version_compare($GLOBALS['wp_version'], '5.0-beta', '>')) { | |
// WP > 5 beta | |
add_filter('use_block_editor_for_post_type', '__return_false', 100); | |
} else { | |
// WP < 5 beta | |
add_filter('gutenberg_can_edit_post_type', '__return_false'); | |
} | |
} | |
add_action('admin_init', 'kan_gulegule_gutenberg' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment