Last active
August 31, 2017 20:27
-
-
Save marcosnakamine/16be0921316977fc5ea34e643fdeea6e to your computer and use it in GitHub Desktop.
WordPress - Add new page in dashboard (iframe Google)
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 | |
add_action('admin_menu','add_new_page'); | |
function add_new_page(){ | |
function add_new_page_content(){ | |
include('inc-admin-new-page.php'); | |
} | |
add_menu_page('New Page', 'New Page', 'publish_posts', 'new-page','add_new_page_content',''); | |
} | |
// Google Presentation | |
/* | |
add_action('wp_dashboard_setup', 'add_dashboard_widgets' ); | |
function add_dashboard_widgets() { | |
wp_add_dashboard_widget('dashboard_widget', 'Tutoriais', function($post, $callback_args){ | |
echo '<iframe src="https://docs.google.com/presentation/d/1keoR1COIST1HtOI1TcONd0H-WOEsMzAjYmx43xZ8y/embed?start=false&loop=false&delayms=3000" frameborder="0" width="390" height="250" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>'; | |
}); | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment