- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
2.4 KiB
PHP
Executable File
65 lines
2.4 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Utilities Content Injection.
|
|
*
|
|
* @package AdvancedAds
|
|
* @author Advanced Ads <info@wpadvancedads.com>
|
|
* @since 1.50.0
|
|
*/
|
|
|
|
namespace AdvancedAds\Utilities;
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
/**
|
|
* Utilities Content Injection.
|
|
*/
|
|
class Content_Injection {
|
|
|
|
/**
|
|
* Get html tags for content injection
|
|
*
|
|
* @since 1.3.5
|
|
*
|
|
* @return array Tags that can be used for content injection
|
|
*/
|
|
public static function get_tags(): array {
|
|
$headline_tags = apply_filters( 'advanced-ads-headlines-for-ad-injection', [ 'h2', 'h3', 'h4' ] );
|
|
$headline_tags = '<' . implode( '>, <', $headline_tags ) . '>';
|
|
|
|
$tags = apply_filters(
|
|
'advanced-ads-tags-for-injection',
|
|
[
|
|
/* translators: %s is an html tag. */
|
|
'p' => sprintf( __( 'paragraph (%s)', 'advanced-ads' ), '<p>' ),
|
|
/* translators: %s is an html tag. */
|
|
'pwithoutimg' => sprintf( __( 'paragraph without image (%s)', 'advanced-ads' ), '<p>' ),
|
|
/* translators: %s is an html tag. */
|
|
'h2' => sprintf( __( 'headline 2 (%s)', 'advanced-ads' ), '<h2>' ),
|
|
/* translators: %s is an html tag. */
|
|
'h3' => sprintf( __( 'headline 3 (%s)', 'advanced-ads' ), '<h3>' ),
|
|
/* translators: %s is an html tag. */
|
|
'h4' => sprintf( __( 'headline 4 (%s)', 'advanced-ads' ), '<h4>' ),
|
|
/* translators: %s is an html tag. */
|
|
'headlines' => sprintf( __( 'any headline (%s)', 'advanced-ads' ), $headline_tags ),
|
|
/* translators: %s is an html tag. */
|
|
'img' => sprintf( __( 'image (%s)', 'advanced-ads' ), '<img>' ),
|
|
/* translators: %s is an html tag. */
|
|
'table' => sprintf( __( 'table (%s)', 'advanced-ads' ), '<table>' ),
|
|
/* translators: %s is an html tag. */
|
|
'li' => sprintf( __( 'list item (%s)', 'advanced-ads' ), '<li>' ),
|
|
/* translators: %s is an html tag. */
|
|
'blockquote' => sprintf( __( 'quote (%s)', 'advanced-ads' ), '<blockquote>' ),
|
|
/* translators: %s is an html tag. */
|
|
'iframe' => sprintf( __( 'iframe (%s)', 'advanced-ads' ), '<iframe>' ),
|
|
/* translators: %s is an html tag. */
|
|
'div' => sprintf( __( 'container (%s)', 'advanced-ads' ), '<div>' ),
|
|
'anyelement' => __( 'any element', 'advanced-ads' ),
|
|
'custom' => _x( 'custom', 'for the "custom" content placement option', 'advanced-ads' ),
|
|
]
|
|
);
|
|
|
|
return $tags;
|
|
}
|
|
}
|