Last active
March 23, 2018 13:50
-
-
Save kylephillips/cab2dae551fb091ae0c4c2d176c00cab to your computer and use it in GitHub Desktop.
Point the "edit" links in Nested Pages to the Gutenberg editor if installed.
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 | |
| add_filter('nestedpages_edit_link', 'gutenbergEditLink', 10, 2); | |
| function gutenbergEditLink($link, $post) | |
| { | |
| if ( !is_plugin_active('gutenberg/gutenberg.php') ) return $link; | |
| $link = admin_url('admin.php?page=gutenberg&post_id=' . $post->id); | |
| return $link; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment