Multisite Admin Roles

You can write a small custom function, that loop about the network and add in each site of the network the new role. See the source below als example to add_role. If you like update or change a existing role, then switch from add_role to add_cap. function fb_change_role_network_wide( $role ) { global $wpdb; $args = … Read more

Add button in admin columns

You are looking code to add a column next to short link. It’s pretty much simple. There are two things here. You can add it for specific post type or common to all the post types you have. // add a thumbnail column to the edit posts screen function kv_post_thumbnail_column($cols) { $cols[‘thumbnail’] = __(‘Thumbnail’, ‘1stopwebsolution’); … Read more

Get content of publish box

add_action( ‘post_submitbox_misc_actions’, ‘show_current_filter’ ); add_action( ‘post_submitbox_start’, ‘show_current_filter’ ); function show_current_filter() { $post = get_post(); print ‘<pre>’ . $post->ID . ‘ : ‘ . current_filter() . ‘</pre>’; } https://codex.wordpress.org/Plugin_API/Action_Reference/post_submitbox_misc_actions https://developer.wordpress.org/reference/hooks/post_submitbox_start/