drincruz
Forum Replies Created
-
Forum: Hacks
In reply to: How to add a submenu to a previusly created menu page?everything looks fine. maybe some sort of error in your b1_admin() function, though i can’t be too sure without seeing the code.
g’luck. cheers!
Forum: Fixing WordPress
In reply to: When posting, page scrolls up automatically? Can we disable?was there any follow up on this? one of my users is having the same issue but i can’t replicate the issue.
i find this really odd since this is only 1 user out of ~300 using the same code base.
anybody? ideas?
cheers,
~drinForum: Fixing WordPress
In reply to: Default Screen Optionsi’ll be honest, i haven’t had time to check out that plugin. though, i guess i’ll have to check it out since you speak so highly of it. ??
i’ll keep you guys posted.
cheers!
Forum: Fixing WordPress
In reply to: Default Screen Optionsactually, i just found a function i can use so that this can be worked out as a plugin.
so, you can use the
remove_meta_box()
function to remove those unwanted meta boxes.so for example, i still don’t want my users using the ‘tags’. i simply made a new plugin that has the following:
function unused_meta_boxes() { remove_meta_box('tagsdiv','post','side'); } add_action('admin_head', 'unused_meta_boxes');
a lot easier than i thought.
the add_meta_box is defined as follows:
add_meta_box($id, $title, $callback, $page, $context = 'advanced', $priority = 'default', $callback_args=null)
and the remove_meta_box is defined as follows:
remove_meta_box($id, $page, $context)
you should still reference the wp-admin/edit-form-advanced.php file if you’re not sure what arguments the remove_meta_box take for whatever you’d like to remove.
hope this helps! cheers!
Forum: Fixing WordPress
In reply to: Default Screen Optionsyou can also modify the wp_usermeta table to “hide” their metaboxes. (though, of course this isn’t exactly disabling users from unhiding them)
you can run the following to get a better understanding:
select * from wp_usermeta where meta_key like '%meta%';
Forum: Fixing WordPress
In reply to: Default Screen Optionshey guys, i’m just reading this thread now.
our wordpress install needed the same thing; we didn’t want users to use categories, tags, etc. (we have our own custom tagging and such).
anyhow, if you edit wp-admin/edit-form-advanced.php you can comment out the modules you’d like not to be shown.
for example, we removed “Tags”, so if you look at line 287 you can comment it out like so:
//add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'side', 'core');
/********************
********************/side note: you can obviously do the same concept and add new meta boxes. our users liked the in-line preview as opposed to opening preview in a new window.
just add the following somewhere in the file:
/** * Display in-line preview. * * 2009-03-18 */ function post_preview_meta_box($post) { ?> <label class="hidden" for="preview"><?php _e('Post Preview') ?></label> <?php $uri_params = array('p' => "$post->ID", 'preview' => "true"); ?> <div id='preview' class='wrap'> <h2 id="preview-post"><?php _e('Updated when post is saved'); ?></h2> <iframe src="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg($uri_params, get_option('siteurl')))); ?>" width="100%" height="300" ></i frame> </div> <?php } add_meta_box('preview', __('Post Preview'), 'post_preview_meta_box', 'post', 'normal', 'core');
good luck. cheers!