Why doesn’t the Media Browser use thumbnail sized images?
As per the comments, my theme was missing the system default medium image size. Applying @birgire’s workaround to make the system use a custom size did the trick.
As per the comments, my theme was missing the system default medium image size. Applying @birgire’s workaround to make the system use a custom size did the trick.
You need to check all online users and see if admin is logged-in or not. With this plugin you can get all online users. https://wordpress.org/plugins/wp-useronline/ Can use a function to check if list includes admin or not. Based on that you can display forms.
function my_login_logo_url() { return home_url(); } add_filter( ‘login_headerurl’, ‘my_login_logo_url’ ); function my_login_logo_url_title() { return ‘Your Site Name and Info’; } add_filter( ‘login_headertitle’, ‘my_login_logo_url_title’ ); For details follow link
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
Site fast when logged in, slow otherwise – How can I determine the cause, workaround or fix the issue?
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/
I discovered that by adding a call to get_currentuserinfo(); in header.php the problem appears to be solved. I still do not know why it happened, but at least this is a working solution for anyone else who happens to have this problem. Note: Following @jgraup’s suggestion above, I’m posting this as an answer. However, I … Read more
More importantly you should notice what link is produced by get_delete_post_link(). It’s an admin link is_admin() check will be always true. Instead you need something else that helps match the request. Try adding and query arg to your delete link. add_query_arg( ‘origin’, ‘fe’, get_delete_post_link( get_the_ID() ) ); then in the action add_action(‘deleted_post’, ‘woffice_trashed_post_handler’, 10); function … Read more
I found if you go to http://sitename.com/wp-admin/network/site-settings.php?id={{id}} and set it here, it doesnt require verification.
It is enough to add unfiltered_html capability to Editor role. Add the following code into your current theme’s functions.php: function wpse_change_capability() { $role = get_role( ‘editor’ ); if ( ! $role->has_cap( ‘unfiltered_html’ ) ) $role->add_cap( ‘unfiltered_html’ ); } add_action( ‘init’, ‘wpse_change_capability’, 10 ); Login as the user with Editor role. Test it by editing any … Read more