Add mass action to wp-admin/users.php

Unfortunately this isn’t possible. Custom actions cannot be added to the bulk actions dropdown (see trac tickets: http://core.trac.wordpress.org/ticket/12732 and http://core.trac.wordpress.org/ticket/16031). For posts you can use the restrict_manage_posts hook to create another drop-down / add buttons to trigger your custom action. But there is no restrict_manage_* hook available for the user table. So the only (and … Read more

Securing wp-admin folder – Purpose? Importance?

But if you protect wp-login.php, how would a hacker even get into the dashboard anyways? An attacker could try to hijack or forge a valid authentication cookie. Recently there was a possibly vulnerability which made it »easier« to forge such a cookie: CVE-2014-0166 It was fixed with Version 3.7.3/3.8.3 How does “Code A” compare to … Read more

Adding a menu item in the admin bar

every menu have an number . lower the number priority. add_action( ‘admin_bar_menu’, ‘wp_admin_bar_sidebar_toggle’, 0 ); add_action( ‘admin_bar_menu’, ‘wp_admin_bar_wp_menu’, 10 ); add_action( ‘admin_bar_menu’, ‘wp_admin_bar_my_sites_menu’, 20 ); add_action( ‘admin_bar_menu’, ‘wp_admin_bar_site_menu’, 30 ); more clear idea you can check the link below http://natko.com/custom-menu-item-position-in-wordpress-admin-bar-toolbar/

wp-admin pages return ERR_EMPTY_RESPONSE

https://core.trac.wordpress.org/ticket/42345 After a lot of digging and following segfaults in strace and parsing out apache core dumps (and enlisting some outside help from a much more knowledgeable Linux guy) I dug this up on WordPress’s site. The short answer to the problem is that there is an issue with PHP5 and libssh2 that was introduced … Read more

Custom user role that can only edit specific (non-custom-type) page and all child pages [duplicate]

There’s no way in WordPress to assign the capability for editing (or any action) a specific post to a role. However, you can filter capabilities checks and change them on the fly using the map_meta_cap. When handling post permissions, WordPress ultimately deals in just 4 capabilties: edit_post read_post delete_post publish_post Then whenever an action is … Read more

How to create sub menu with a URL parameter?

You’d have to manipulate the global $submenu and modify the link in it. Or use jQuery. The following example adds a submenu in the Dashboard menu and changes the destination link just after. The submenu page will dump the contents of the global var. add_action( ‘admin_menu’, function() { add_submenu_page( ‘index.php’, ‘Sandbox Options’, ‘Options’, ‘administrator’, ‘sandbox_options’, … Read more

How to remove the site health dashboard widget?

The following snippet removes the registered site health dashboard widget from the dashboard. Add the code to your plugin or functions.php file: add_action(‘wp_dashboard_setup’, ‘remove_site_health_dashboard_widget’); function remove_site_health_dashboard_widget() { remove_meta_box(‘dashboard_site_health’, ‘dashboard’, ‘normal’); }

Making a client area in WordPress – Any good tutorials or plugins?

First, for invoicing/billing use the WP Invoice plugin: http://wordpress.org/extend/plugins/wp-invoice/ The “members” plugin may also be useful: http://wordpress.org/extend/plugins/members/ For a custom redirect, to send them to custom pages rather than just the admin panel use: http://wordpress.org/extend/plugins/peters-login-redirect/ If you had them register, greet them with a custom welcome message on the page they log-in to using this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)