How can I link a file in admin with a button?

Finally, I make it, the way without losing the access to WordPress environment: add_action( ‘edit_form_after_title’, ‘custom_button’ ); function custom_button() { $button = sprintf(‘<a href=”https://wordpress.stackexchange.com/questions/273582/%1$s” class=”button button-primary button-large”>%2$s</a>’, esc_url( add_query_arg( ‘link’ , true, get_the_permalink() ) ), ‘Custom Button’ ); print_r($button); } Update: Hint: Please make a function for validation the url for ssl and wrap get_the_permalink() … Read more

Change Admin Bar “Visit Site” URL

The admin bar is using the home_url() function which you can modify the result by using the “home_url” filter, this will change a lot of links on your admin area so looks like it’s not the best solution, anyway remember to use the is_admin() conditional tag or you will affect everything on the front end … Read more

current_user_can() always returns true if user is super admin

The documentation unfortunately not very clear on what “explicitly deny” actually entails. While setting a capability to false will normally explicitly deny the capability, that check is performed after super admins have been waved through. So even though the documentation says “unless explicitly denied”, denying it this way doesn’t work for super admins. Only the … Read more

How would I add a link to the profile editing page of the dashboard?

I assume you mean /wp-admin/profile.php page and want to hide native password fields. Try this (just test if form works ok with it): add_filter( ‘show_password_fields’, ‘modify_profile_password’ ); function modify_profile_password( $show ) { ?> <tr id=”password”> <th>Change your password at</th> <td><a href=””>password change page</a></td> </tr> <?php return false; }