weskoop
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Plugins
In reply to: [Yoast SEO] Disable / Hide / Supress Error Notification Alertsremove_action( 'admin_notices', array( Yoast_Notification_Center::get(), 'display_notifications' ) ); remove_action( 'all_admin_notices', array( Yoast_Notification_Center::get(), 'display_notifications' ) );
Forum: Plugins
In reply to: [Yoast SEO] Remove thank you for updating pageOh yes please. It even overrides the WP upgrade screen.
Line 35 of admin/class-admin-init.php:
add_action( 'admin_init', array( $this, 'redirect_to_about_page' ), 15 );
but the object is loaded without reference, so I’m not sure how to trigger a remove_filter() from my own plugin.
remove_action( 'admin_init', array( ___????__, 'redirect_to_about_page' ), 15 );
+1 Can you post the fix technomad42?
Forum: Plugins
In reply to: [JSON API] thumbnails not included for attachment fixEven safer is to use wp_upload_dir();
function query_images() { $sizes = array('thumbnail', 'medium', 'large', 'full'); if (function_exists('get_intermediate_image_sizes')) { $sizes = array_merge(array('full'), get_intermediate_image_sizes()); } $this->images = array(); $upload_dir = wp_upload_dir(); foreach ($sizes as $size) { list($url, $width, $height) = wp_get_attachment_image_src($this->id, $size); $filename = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $url); if (file_exists($filename)) { list($measured_width, $measured_height) = getimagesize($filename); if ($measured_width == $width && $measured_height == $height) { $this->images[$size] = (object) array( 'url' => $url, 'width' => $width, 'height' => $height ); } } } }
Viewing 4 replies - 1 through 4 (of 4 total)