Filter Media Library by author or post_parent

The only way to do it is using a query filter I think function wpse156319_posts_where( $where, $query ) { global $wpdb; $where .= $wpdb->prepare( ‘ AND (‘ . $wpdb->posts . ‘.post_parent = %s OR ‘ . $wpdb->posts . ‘.post_author = %s)’, $_POST[‘id’], get_current_user_id() ); return $where; } which you just add in the ajax_query_attachments_args instead … Read more

When attempting to update a self-hosted WordPress site, I’m seeing “ASN1 unknown message digest algorithm”

@Kika is right that you have an older, insecure, version of OpenSSL. This sounds like: https://wordpress.org/support/topic/getting-download-failed-error0d0890a1asn1-encoding-routinesfunc137reason I wrote a small bit of code to skip the SSL test when trying to access the download server. It is not a good idea to use this code but will get you out of a pinch. <?php /* … Read more

Dashboard links not working

Those links are supposed to show submenus. If they are not showing up, that usually means your theme has a conflict with our plugin (90% of the time, this is boostrap). Please check our documentation about conflicts with Bootstrap as well as our FAQ entry about that.

Options for restricting access to wp-admin

You could make it a mu-plugin (‘Must Use’ plugin). Any PHP file you put into /wp-content/mu-plugins/ will automatically get included in WordPress. You can’t deactivate the plugin (unless you have ftp access to the server). If you go with a mu-plugin, make sure to put the functionality into a subdirectory and bootstrap it with a … Read more

wp-admin slow in multisite

I ended up enabling WP_DEBUG and found an error – something about fsockopen() not being able to connect to my host (I didn’t write it down and now can’t reproduce it) – and found that it was a DNS issue;- my subdomain (foo.example.com) was resolving to the correct IP (10.0.0.1) but the primary domain wasn’t. … Read more