Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/wp-rocket/views/settings/buttons/link.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
/**
3
+
* Action button link template.
4
+
*
5
+
* @since 3.0
6
+
*
7
+
* @data array {
8
+
* Data to populate the template.
9
+
*
10
+
* @type string $label Link text.
11
+
* @type string $url URL for the href attribute.
12
+
* @type string $attributes String of attribute=value for the <a> tag, e.g. class, target, etc.
13
+
* @type string $tooltip Tooltip text.
14
+
* }
15
+
*/
16
+
17
+
defined( 'ABSPATH' ) || exit;
18
+
19
+
$data['url'] = ! empty( $data['url'] ) ? esc_url( $data['url'] ) : 'javascript:void(0);'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
20
+
?>
21
+
<a href="<?php echo $data['url']; ?>" <?php echo $data['attributes']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $data['attributes'] escaped with sanitize_key & esc_attr ?>><?php echo $data['label']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Dynamic content is properly escaped in the view. ?>
22
+
<?php if ( ! empty( $data['tooltip'] ) ) : ?>
23
+
<div class="wpr-tooltip">
24
+
<div class="wpr-tooltip-content">
25
+
<?php echo esc_html( $data['tooltip'] ); ?>
26
+
</div>
27
+
</div>
28
+
<?php endif; ?>
29
+
</a>
30
+