PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
admin-site-enhancements
/
classes
<?php namespace ASENHA\Classes; /** * Class for Image Sizes Panel module * * @since 6.9.5 */ class Image_Sizes_Panel { /** * Add image sizes meta box in image view/edit screen * * @since 6.3.0 */ public function add_image_sizes_meta_box() { global $post; // Only add meta box if the attachment is an image if ( is_object( $post ) && property_exists( $post, 'post_mime_type' ) && false !== strpos( $post->post_mime_type, 'image' ) ) { add_meta_box( 'image_sizes', 'Image Sizes', [$this, 'image_sizes_table'], 'attachment', 'side' ); } } /** * Output table of image sizes * * @link https://plugins.trac.wordpress.org/browser/image-sizes-panel/tags/0.4/admin/admin.php * @since 6.3.0 */ public function image_sizes_table( $post ) { global $_wp_additional_image_sizes; $image_sizes = get_intermediate_image_sizes(); $metadata = wp_get_attachment_metadata( $post->ID ); $generated_sizes = array(); // Merge defined image sizes with generated image sizes if ( isset( $metadata['sizes'] ) && count( $metadata['sizes'] ) > 0 ) { $generated_sizes = array_keys( $metadata['sizes'] ); $image_sizes = array_unique( array_merge( $image_sizes, $generated_sizes ) ); } $image_sizes[] = 'full'; $full = wp_get_attachment_image_src( $post->ID, 'full' ); sort( $image_sizes ); if ( count( $image_sizes ) > 0 ) { echo '<table>'; foreach ( $image_sizes as $size ) { $src = wp_get_attachment_image_src( $post->ID, $size ); if ( isset( $metadata['sizes'][$size] ) ) { $width = $metadata['sizes'][$size]['width']; $height = $metadata['sizes'][$size]['height']; } else { if ( 'full' == $size ) { $width = $full[1]; $height = $full[2]; } else { $width = $src[1]; $height = $src[2]; } } if ( in_array( $size, $generated_sizes ) || 'full' == $size ) { echo '<tr id="image-sizes-panel-' . sanitize_html_class( $size ) . '" class="image-size-row">'; echo '<td class="size"><span class="name"><a href="' . esc_url( $src[0] ) . '" target="_blank" class="image-url">' . esc_html( $size ) . '</a></span></td>'; echo '<td class="dim">' . esc_html( $width ) . ' × ' . esc_html( $height ) . '</td>'; echo '</tr>'; } } echo '</table>'; } else { echo '<p>No image sizes</p>'; } } }
[-] class-hide-admin-bar.php
[edit]
[-] class-svg-upload.php
[edit]
[-] class-disable-gutenberg.php
[edit]
[-] class-cleanup-admin-bar.php
[edit]
[-] class-disable-rest-api.php
[edit]
[-] class-multiple-user-roles.php
[edit]
[-] class-disable-updates.php
[edit]
[-] class-image-upload-control.php
[edit]
[-] class-hide-admin-notices.php
[edit]
[-] class-content-duplication.php
[edit]
[-] class-insert-head-body-footer-code.php
[edit]
[-] class-media-replacement.php
[edit]
[-] class-password-protection.php
[edit]
[-] class-heartbeat-control.php
[edit]
[-] class-email-address-obfuscator.php
[edit]
[-] class-settings-sanitization.php
[edit]
[-] class-wp-config-transformer.php
[edit]
[-] class-content-order.php
[edit]
[-] class-custom-css.php
[edit]
[-] class-enhance-list-tables.php
[edit]
[-] class-login-logout-menu.php
[edit]
[-] class-search-engines-visibility.php
[edit]
[-] class-limit-login-attempts.php
[edit]
[-] class-disable-xml-rpc.php
[edit]
[-] class-common-methods.php
[edit]
[-] class-email-delivery.php
[edit]
[-] class-obfuscate-author-slugs.php
[edit]
[-] class-external-permalinks.php
[edit]
[-] class-wider-admin-menu.php
[edit]
[-] class-display-system-summary.php
[edit]
[-] class-admin-menu-organizer.php
[edit]
[-] class-redirect-fourofour.php
[edit]
[-] class-manage-robots-txt.php
[edit]
[-] class-site-identity-on-login-page.php
[edit]
[-] class-avif-upload.php
[edit]
[-] class-disable-comments.php
[edit]
[-] class-manage-ads-appads-txt.php
[edit]
[-] class-various-admin-ui-enhancements.php
[edit]
[-] class-admin-menu-svg-icon-mask.php
[edit]
[-] class-deactivation.php
[edit]
[-] class-activation.php
[edit]
[-] class-view-admin-as-role.php
[edit]
[-] class-maintenance-mode.php
[edit]
[-] class-custom-body-class.php
[edit]
[-] class-disable-dashboard-widgets.php
[edit]
[-] class-login-id-type.php
[edit]
[-] class-image-sizes-panel.php
[edit]
[-] class-redirect-after-login.php
[edit]
[-] class-settings-sections-fields.php
[edit]
[-] class-auto-publish-posts-with-missed-schedule.php
[edit]
[-] class-revisions-control.php
[edit]
[+]
..
[-] class-registration-date-column.php
[edit]
[-] class-disable-embeds.php
[edit]
[-] class-show-custom-taxonomy-filters.php
[edit]
[-] class-custom-nav-menu-items-in-new-tab.php
[edit]
[-] class-disable-feeds.php
[edit]
[-] class-captcha-protection.php
[edit]
[-] class-custom-admin-footer-text.php
[edit]
[-] class-change-login-url.php
[edit]
[-] class-last-login-column.php
[edit]
[-] class-settings-fields-render.php
[edit]
[-] class-disable-smaller-components.php
[edit]
[-] class-disable-author-archives.php
[edit]
[-] class-redirect-after-logout.php
[edit]
[-] class-open-external-links-in-new-tab.php
[edit]