__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Imagely\NGG\Display;
/**
* Markup helpers for gallery image tags.
*/
class GalleryImage {
/**
* Default CSS class added to every front-end gallery image tag.
*
* Site owners paste this into the exclusion list of lazy-load and image
* optimization plugins to opt galleries out of rewriting.
*
* @var string
*/
const DEFAULT_CLASS = 'ngg-gallery-thumbnail-img';
/**
* Build an escaped HTML attribute string for a gallery image tag.
*
* The returned string has a leading space and is meant to be echoed
* immediately after "<img", e.g. `<img<?php echo GalleryImage::attributes(); ?> ...`.
*
* The `ngg_gallery_image_attributes` filter lets site owners and add-ons
* add attributes such as `skip-lazy` or `data-no-lazy` without overriding a
* template. Return `true` as the value for boolean attributes, or `false`
* / `null` to drop one.
*
* @param array $extra Extra attributes to merge in, as name => value pairs.
* @return string Escaped attribute string with a leading space.
*/
public static function attributes( $extra = [] ) {
$attributes = array_merge( [ 'class' => self::DEFAULT_CLASS ], $extra );
/**
* Filters the attributes rendered on a front-end gallery image tag.
*
* @param array $attributes Attribute name => value pairs.
*/
$attributes = \apply_filters( 'ngg_gallery_image_attributes', $attributes );
// A filter callback that returns a non-array (e.g. forgets to return)
// would otherwise empty the tag and strip the class from every image.
if ( ! is_array( $attributes ) ) {
$attributes = [ 'class' => self::DEFAULT_CLASS ];
}
$html = '';
foreach ( $attributes as $name => $value ) {
if ( false === $value || null === $value ) {
continue;
}
if ( true === $value ) {
$html .= ' ' . \esc_attr( $name );
continue;
}
$html .= ' ' . \esc_attr( $name ) . '="' . \esc_attr( $value ) . '"';
}
return $html;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| DisplayManager.php | File | 35.87 KB | 0644 |
|
| GalleryDetector.php | File | 9.1 KB | 0644 |
|
| GalleryImage.php | File | 1.91 KB | 0644 |
|
| I18N.php | File | 15.47 KB | 0644 |
|
| LightboxManager.php | File | 15.62 KB | 0644 |
|
| ResourceManager.php | File | 11.33 KB | 0644 |
|
| Shortcodes.php | File | 12.76 KB | 0644 |
|
| StaticAssets.php | File | 2.93 KB | 0644 |
|
| StaticPopeAssets.php | File | 4.04 KB | 0644 |
|
| View.php | File | 14.3 KB | 0644 |
|
| ViewElement.php | File | 3.32 KB | 0644 |
|