Is it possible to create a custom admin page for users?

Assuming that you want to show only some Admin page items to a user-type, this page might get you started: https://www.johnparris.com/how-to-restrict-access-to-menu-items-in-the-wordpress-admin/ . Not much detail there, but might get you started. You would then limit access based on the person’s login level (Editor, Subscriber, etc). Or create a new login-level, and use that to limit … Read more

Admin hook after editing an image?

Unless I’ve missed something in the flow of this, It seems the mentioned WPSE answer is correct. The filter hook referenced, wp_save_image_editor_file, is applied in the wp_save_image_file() function when dealing with an instance of WP_Image_Editor class; giving access to $filename (trac link for below): * @param mixed $override Value to return instead of saving. Default … Read more

How can I create multiple different admin roles with their own capabilities

Yes it’s very easy. You’ll want to use the add_role() function to add your custom roles – https://codex.wordpress.org/Function_Reference/add_role Then you can use add_cap to add custom capabilities – https://codex.wordpress.org/Function_Reference/add_cap One important thing to mention is that both add_role and add_cap are saved to the database so they only need to run 1x so it’s good … Read more

Get Link of Page Selected through a Select Field in Custom Admin Page

First, you register your setting like this: function my_awesome_register_fields_for_additional_settings(){ register_setting(‘reading’, ‘my_awesome_pagelink_for_frontend_button’); add_settings_field(‘my_awesome_pagelink_for_frontend_button’, ‘<label for=”my_awesome_pagelink_for_frontend_button”>The Frontend Button shall link to this page:</label>’ , ‘my_awesome_pagelink_for_frontend_button_html’, ‘reading’); } add_filter(‘admin_init’, ‘my_awesome_register_fields_for_additional_settings’); After that, you define the callback for your settings field: function my_awesome_pagelink_for_frontend_button_html(){ $option = (int)get_option(‘my_awesome_pagelink_for_frontend_button’,0); wp_dropdown_pages(array( ‘selected’ => $option, ‘name’ => ‘my_awesome_pagelink_for_frontend_button’, ‘show_option_none’ => ‘Please Choose’, ‘option_none_value’ => … Read more