Making the thumbnails in the backend Media section bigger

I don’t see any way of hooking into this. Following the lead of wp_get_attachment_image takes nowhere… // wp-admin/includes/class-wp-media-list-table.php // line 200 case ‘icon’: $attributes=”class=”column-icon media-icon”” . $style; ?> <td <?php echo $attributes ?>><?php if ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) { if ( $this->is_trash || ! $user_can_edit ) { … Read more

Integrate post tags in Post Edit page with qTranslate

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 after that. Looking at source … Read more

Hide allow trackbacks/pingbacks

Method 1 (CSS) You can hide it for all non-admins via CSS: function hide_ping_track_wpse_103502() { if( get_post_type() === “post” ){ if( ! current_user_can( ‘manage_options’ ) ){ // only for non-admins echo “<style>.meta-options label[for=ping_status], #ping_status{display:none !important;} </style>”; } } } add_action( ‘admin_head-post.php’, ‘hide_ping_track_wpse_103502’ ); Before: After: Method 2 (PHP) You can also remove the native discussion … Read more

Conditional check for front-end which includes ajax

DOING_AJAX and WP_ADMIN (this constant is checked within is_admin() ) are defined in admin-ajax.php and set tro true. Both are not very helpfull in this situation. Add a parameter to your ajax request if the request come from the front-end: <?php function my_action_javascript() { ?> <script type=”text/javascript” > jQuery(document).ready(function($) { var data = { action: … Read more

WordPress – wp-admin subdomain

The folder location /wp-admin is hardcoded into wordpress in multiple locations. It is pretty problematic to modify the location. WordPress will always go to /wp-admin. There are ways around this, but their are many steps. You can forward a subdomain to www.mydomain.net/wp-admin but WordPress will still always go through www.mydomain.net/wp-admin. Here is a reference if … Read more

Remove post from new menu in top bar

The users can still create new posts if the URL is known, like; domain.com/wp-admin/post-new.php Here is the code you can use for that … added it to the file functions.php function hide_add_new() { global $submenu; // For Removing New Posts from Admin Menu unset($submenu[‘post-new.php?post_type=post’][10]); // For Removing New Pages unset($submenu[‘post-new.php?post_type=page’][10]); // For Removing CPTs unset($submenu[‘post-new.php?post_type=custom_post_type’][10]); … Read more