??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/monicslandscape.co.uk/wp-content/themes/astra/inc/core/class-astra-attr.php
⬅ Kembali
<?php
/**
* Astra Attributes Class.
*
* @package Astra
* @link https://wpastra.com/
* @since Astra 1.6.2
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if ( ! class_exists( 'Astra_Attr' ) ) {
/**
* Class Astra_Attr
*/
class Astra_Attr {
/**
* Store Instance on Current Class.
*
* @var object instance
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Initialuze the Class.
*
* @since 1.6.2
*/
private function __construct() {
}
/**
* Build list of attributes into a string and apply contextual filter on string.
*
* The contextual filter is of the form `astra_attr_{context}_output`.
*
* @since 1.6.2
*
* @param string $context The context, to build filter name.
* @param array $attributes Optional. Extra attributes to merge with defaults.
* @param array $args Optional. Custom data to pass to filter.
* @return string String of HTML attributes and values.
*/
public function astra_attr( $context, $attributes = array(), $args = array() ) {
$attributes = $this->astra_parse_attr( $context, $attributes, $args );
$output = '';
// Cycle through attributes, build tag attribute string.
foreach ( $attributes as $key => $value ) {
if ( ! $value ) {
continue;
}
if ( true === $value ) {
$output .= esc_html( $key ) . ' ';
} else {
$output .= sprintf( '%s="%s" ', esc_html( $key ), esc_attr( $value ) );
}
}
$output = apply_filters( "astra_attr_{$context}_output", $output, $attributes, $context, $args );
return trim( $output );
}
/**
* Merge array of attributes with defaults, and apply contextual filter on array.
*
* The contextual filter is of the form `astra_attr_{context}`.
*
* @since 1.6.2
*
* @param string $context The context, to build filter name.
* @param array $attributes Optional. Extra attributes to merge with defaults.
* @param array $args Optional. Custom data to pass to filter.
* @return array Merged and filtered attributes.
*/
public function astra_parse_attr( $context, $attributes = array(), $args = array() ) {
$defaults = array(
'class' => sanitize_html_class( $context ),
);
$attributes = wp_parse_args( $attributes, $defaults );
// Contextual filter.
return apply_filters( "astra_attr_{$context}", $attributes, $context, $args );
}
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Astra_Attr::get_instance();
Nama
Tipe
Ukuran
Diubah
Aksi
📁 builder
dir
—
2026-06-09 10:06
📁 deprecated
dir
—
2026-06-09 10:06
📁 markup
dir
—
2026-06-09 10:06
🐘 class-astra-admin-helper.php
php
2.1 KB
2025-04-02 11:04
🐘 class-astra-admin-settings.php
php
26.4 KB
2026-04-27 12:20
🐘 class-astra-attr.php
php
2.6 KB
2025-04-02 11:04
🐘 class-astra-command-palette.php
php
8.1 KB
2026-04-16 15:17
🐘 class-astra-enqueue-scripts.php
php
33.8 KB
2026-06-02 14:57
🐘 class-astra-icons.php
php
13.9 KB
2025-09-09 13:41
🐘 class-astra-theme-options.php
php
35.2 KB
2026-05-20 14:19
🐘 class-astra-walker-page.php
php
4.6 KB
2026-02-05 15:31
🐘 class-astra-wp-editor-css.php
php
64.9 KB
2026-04-08 14:31
🐘 class-gutenberg-editor-css.php
php
79.6 KB
2026-05-12 13:03
🐘 class-theme-strings.php
php
5.1 KB
2025-04-02 11:04
🐘 common-functions.php
php
68.5 KB
2026-04-08 14:31
🐘 index.php
php
111 B
2024-11-11 15:51
🐘 sidebar-manager.php
php
2.2 KB
2025-04-02 11:04
🐘 theme-hooks.php
php
8.9 KB
2024-11-11 15:51