Hot answers tagged admin
3
One problem is that your 'capability_type' parameter 'community' doesn't match your 'capabilities' array values.
From the Codex:
capability_type
(string or array) (optional) The string to use to build the read, edit, and delete capabilities. May be passed as an array to allow for alternative plurals when using this argument as a base to construct ...
3
When user starts typing something into tag input, JavaScript makes request to admin-ajax.php with action set to ajax-tag-search to receive list of suggestions (if any).
In that file that action is recognized as belonging to core and wp_ajax_tag_search() function is added to dynamically generated wp_ajax_ajax-tag-search hook, which fires almost immediately ...
3
The first menu item typically is the parent item and shares the name with that item, you can however manually update the entry directly in the $submenu variable, like so..
add_action( 'admin_menu', 'jp_create_admin_pages' );
function jp_create_admin_pages() {
global $submenu;
...
2
You can’t. Create a function that loads that file:
function load_admin_page_file()
{
require 'admin-members.php';
}
Then use that function name as callback argument.
In PHP 5.3 you can use a lambda:
add_menu_page(
'Members',
'Members',
'manage_options',
'members',
function() { require 'admin-members.php'; }
);
1
Menu items are added to the left hand dashboard menu with a few different functions, depending on where you want it to display. You will probably want to use add_menu_page. The last parameter of this function will determine how far up/down it displays. These are the defaults that you can position your item around:
Positions for Core Menu Items
2 ...
1
The "Contributor" role has very little access to anything on the back end but can created posts.
delete_posts
edit_posts
read
http://codex.wordpress.org/Roles_and_Capabilities#Contributor
For comparison, an ordinary "Subscriber" has the last of the three, so "Contributor" has only two extra capabilities.
I am not quite sure what "access ...
1
Try replacing everything from the comment downwards with this. Basically you seemed to have a function in there that wasn't getting called, and you need to add the case "incr_number" test to the woo_supportpress_ticket_custom_columns function:
/*-----------------------------------------------------------------------------------*/
/* Admin columns for post ...
1
Have you tried changing the Menu title to 'All Membership Types'?
add_submenu_page(
'members',
'Membership Types',
'All Membership Types',
'manage_options',
'jp_handle_admin_membership_types');
http://codex.wordpress.org/Function_Reference/add_submenu_page
Not sure if it's possible to do it any other way.
I know ...
1
Programming and machines
As machines are "stupid", they need to be programmed. And programming languages don't work like languages spoken by humans as programs/machines as they can't interpret what the human thinks. They need a clear and unique advice what and when to something we order them. If you for e.g. define the function getBlock() twice, the machine ...
1
The HTML
echo '<div id="screen-meta-links">';
echo ' <div id="contextual-help-link-wrap" class="hide-if-no-js screen-meta-toggle">';
echo ' <a href="#" id="your-own-button" class="show-settings">Text for your button</a>';
echo ' </div>';
echo '</div>';
echo '<br style="clera:both" />';
echo '<div ...
1
Not sure why this question was dismissed so quickly. It's actually a valid question, and would be really useful to be able to add a button up there, or even edit the content of each screen option.
I know this is an old question, but...
If you want it to just add a button up there that would link somewhere else. You could just add some jQuery to add the ...
Only top voted, non community-wiki answers of a minimum length are eligible
