How to create Admin plugin page?
-
Hi there!
First of all I really like the plugin you’ve created!
I am using it for a website that will also be modified by digital illiterates. Hence, I prefer to create an admin page inlcuding FileUp and FileAway. Next, I would like to have this as a separate item in the admin bar.Yet, I’ve created a menu button opening a page. But I can’t manage to replace the shortcodes of fileAway. I am quite new to WordPress, so perhaps this is quite easy to solve? Currently, I couldn’t find anything online, or the correct keywords to search. I hope someone can help me.
My current code:
function add_wp_files_link() { if(is_admin()){ add_menu_page("Manage files", "Files Admin", 'upload_files', 'wp_files_admin', 'wp_function_open_admin_page', 'dashicons-media-archive'); } } add_action('admin_menu', 'add_wp_files_link'); function wp_function_open_admin_page(){ $p = get_page(192); echo apply_filters('the_content', $p->post_content); }
It is possible when using a Iframe, but I prefer to not use that. Besides, I would prefer to have it working without a page needed (thus by providing the FileAway code as a string to display).
Looking forward to see whether someone can explain to me how to let WP replace the FileAway shortcodes.
Thanks in advance!!
Kind regards,
Reinier
- The topic ‘How to create Admin plugin page?’ is closed to new replies.