Commit inicial - WordPress Análisis de Precios Unitarios

- 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>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Above Headline" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Above Headline.
*/
class Placement_Above_Headline extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Archive Pages" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Archive Pages.
*/
class Placement_Archive_Page extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Background Ad" placement.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Background Ad.
*/
class Placement_Background_Ad extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "BuddyPress" & "BuddyBoss" Comment placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Placements Placement Bbpress Comment.
*/
class Placement_Bbpress_Comment extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "BuddyPress" & "BuddyBoss" Static placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Placements Placement Bbpress Static.
*/
class Placement_Bbpress_Static extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "BuddyPress" & "BuddyBoss" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Placements Placement Buddypress.
*/
class Placement_Buddypress extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Post Content Middle" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Post Content Middle.
*/
class Placement_Content_Middle extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Post Content Random" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Post Content Random.
*/
class Placement_Content_Random extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Post Custom Position" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Post Custom Position.
*/
class Placement_Custom_Position extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,21 @@
<?php
/**
* This class represents the "Server" placement
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use AdvancedAds\Abstracts\Placement;
use AdvancedAds\Interfaces\Placement_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Server.
*/
class Placement_Server extends Placement implements Placement_Interface {
}

View File

@@ -0,0 +1,63 @@
<?php
/**
* Placements type manager
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements;
use Advanced_Ads_Pro;
use AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Framework\Interfaces\Integration_Interface;
defined( 'ABSPATH' ) || exit;
/**
* Placements Placement Types.
*/
class Placement_Types implements Integration_Interface {
/**
* Hook into WordPress.
*
* @return void
*/
public function hooks(): void {
add_action( 'advanced-ads-placement-types-manager', [ $this, 'add_pro_placements' ] );
}
/**
* Add pro placement to list of placements
*
* @since 2.26.0
*
* @param Types $manager Placement types manager.
*
* @return void
*/
public function add_pro_placements( $manager ) {
$manager->register_type( Types\Above_Headline::class );
$manager->register_type( Types\Archive_Pages::class );
$manager->register_type( Types\Content_Middle::class );
$manager->register_type( Types\Content_Random::class );
$manager->register_type( Types\Custom_Position::class );
$manager->register_type( Types\Background_Ad::class );
$options = Advanced_Ads_Pro::get_instance()->get_options();
if ( ! empty( $options['ad-server']['enabled'] ) ) {
$manager->register_type( Types\Server::class );
}
if ( class_exists( 'bbPress', false ) ) {
$manager->register_type( Types\Bbpress_Static::class );
$manager->register_type( Types\Bbpress_Comment::class );
}
if ( class_exists( 'BuddyPress', false ) ) {
$manager->register_type( Types\Buddypress::class );
}
}
}

View File

@@ -0,0 +1,101 @@
<?php
/**
* Placements Types Above Headline.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use Advanced_Ads_Pro;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Above_Headline;
defined( 'ABSPATH' ) || exit;
/**
* Placements Types Above Headline.
*/
class Above_Headline extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'post_above_headline';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Above_Headline::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Above Headline', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Above the main headline on the page (&lt;h1&gt;).', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/inject-content/assets/img/content-above-headline.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 90;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'show_position' => true,
'uses_the_content' => true,
'show_lazy_load' => 'php' === Advanced_Ads_Pro::get_instance()->get_options()['placement-positioning'],
]
);
}
}

View File

@@ -0,0 +1,99 @@
<?php
/**
* Placements Types Archive Pages.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Archive_Page;
defined( 'ABSPATH' ) || exit;
/**
* Placements Types Archive Pages.
*/
class Archive_Pages extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'archive_pages';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Archive_Page::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Post Lists', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Display the ad between posts on post lists, e.g. home, archives, search etc.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/inject-content/assets/img/post-list.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 105;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'show_position' => true,
'show_lazy_load' => true,
]
);
}
}

View File

@@ -0,0 +1,98 @@
<?php
/**
* Placements Types Background Ad.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Background_Ad;
defined( 'ABSPATH' ) || exit;
/**
* Placements Types Background Ad.
*/
class Background_Ad extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'background';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Background_Ad::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Background Ad', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Background of the website behind the main wrapper.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/background-ads/assets/img/background.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 80;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'allowed_ad_types' => [ 'image', 'plain' ],
]
);
}
}

View File

@@ -0,0 +1,94 @@
<?php
/**
* Placements Types Bbpress Comment.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Bbpress_Comment;
defined( 'ABSPATH' ) || exit;
/**
* Bbpress Comment.
*/
class Bbpress_Comment extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'bbPress comment';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Bbpress_Comment::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'bbPress Reply Content', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Display ads in bbPress replies.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/bbpress/assets/img/bbpress-reply.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 33;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options( [] );
}
}

View File

@@ -0,0 +1,94 @@
<?php
/**
* Placements Types Bbpress Static.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Bbpress_Static;
defined( 'ABSPATH' ) || exit;
/**
* Bbpress Static.
*/
class Bbpress_Static extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'bbPress static';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Bbpress_Static::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'bbPress Static Content', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Display ads on bbPress related pages.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/bbpress/assets/img/bbpress-static.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 32;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options( [] );
}
}

View File

@@ -0,0 +1,104 @@
<?php
/**
* Placements Types Buddypress.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Modules\BuddyPress\BuddyPress as BuddyPress_Main;
use AdvancedAds\Pro\Placements\Placement_Buddypress;
defined( 'ABSPATH' ) || exit;
/**
* Buddypress.
*/
class Buddypress extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'buddypress';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Buddypress::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
if ( BuddyPress_Main::is_buddyboss() ) {
return __( 'BuddyBoss Content', 'advanced-ads-pro' );
}
return __( 'BuddyPress Content', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
if ( BuddyPress_Main::is_buddyboss() ) {
return __( 'Display ads on BuddyBoss related pages.', 'advanced-ads-pro' );
}
return __( 'Display ads on BuddyPress related pages.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
if ( BuddyPress_Main::is_buddyboss() ) {
return AA_PRO_BASE_URL . 'modules/buddypress/assets/img/buddyboss.png';
}
return AA_PRO_BASE_URL . 'modules/buddypress/assets/img/buddypress-icon.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 31;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options( [ 'placement-display-conditions' => [ 'request_uri', 'buddypress_group' ] ] );
}
}

View File

@@ -0,0 +1,100 @@
<?php
/**
* Placements Types Content Middle.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Content_Middle;
defined( 'ABSPATH' ) || exit;
/**
* Placements Types Content Middle.
*/
class Content_Middle extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'post_content_middle';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Content_Middle::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Content Middle', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'In the middle of the main content based on the number of paragraphs.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/inject-content/assets/img/content-middle.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 95;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'show_position' => true,
'uses_the_content' => true,
'amp' => true,
]
);
}
}

View File

@@ -0,0 +1,100 @@
<?php
/**
* Placements Types Content Random.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Content_Random;
defined( 'ABSPATH' ) || exit;
/**
* Placements Types Content Random.
*/
class Content_Random extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'post_content_random';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Content_Random::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Random Paragraph', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'After a random paragraph in the main content.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/inject-content/assets/img/content-random.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 85;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'show_position' => true,
'uses_the_content' => true,
'amp' => true,
]
);
}
}

View File

@@ -0,0 +1,100 @@
<?php
/**
* Placements Types Custom Position.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
use Advanced_Ads_Pro;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Abstracts\Placement_Type as Base;
use AdvancedAds\Pro\Placements\Placement_Custom_Position;
defined( 'ABSPATH' ) || exit;
/**
* Placements Types Custom Position.
*/
class Custom_Position extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'custom_position';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Custom_Position::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Custom Position', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Attach the ad to any element in the frontend.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/inject-content/assets/img/custom-position.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 100;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'show_position' => true ,
'show_lazy_load' => 'php' === Advanced_Ads_Pro::get_instance()->get_options()['placement-positioning'],
]
);
}
}

View File

@@ -0,0 +1,102 @@
<?php
/**
* Placements Types Server.
*
* @package AdvancedAds\Pro
* @author Advanced Ads <info@wpadvancedads.com>
* @since 2.26.0
*/
namespace AdvancedAds\Pro\Placements\Types;
defined( 'ABSPATH' ) || exit;
use AdvancedAds\Interfaces\Placement_Type;
use AdvancedAds\Pro\Placements\Placement_Server;
use AdvancedAds\Abstracts\Placement_Type as Base;
/**
* Placements Types Server.
*/
class Server extends Base implements Placement_Type {
/**
* Get the unique identifier (ID) of the placement type.
*
* @return string The unique ID of the placement type.
*/
public function get_id(): string {
return 'server';
}
/**
* Get the class name of the object as a string.
*
* @return string
*/
public function get_classname(): string {
return Placement_Server::class;
}
/**
* Get the title or name of the placement type.
*
* @return string The title of the placement type.
*/
public function get_title(): string {
return __( 'Ad Server', 'advanced-ads-pro' );
}
/**
* Get a description of the placement type.
*
* @return string The description of the placement type.
*/
public function get_description(): string {
return __( 'Display ads on external websites.', 'advanced-ads-pro' );
}
/**
* Check if this placement type requires premium.
*
* @return bool True if premium is required; otherwise, false.
*/
public function is_premium(): bool {
return false;
}
/**
* Get the URL for upgrading to this placement type.
*
* @return string The upgrade URL for the placement type.
*/
public function get_image(): string {
return AA_PRO_BASE_URL . 'modules/ad-server/assets/img/server.png';
}
/**
* Get order number for this placement type.
*
* @return int The order number.
*/
public function get_order(): int {
return 110;
}
/**
* Get options for this placement type.
*
* @return array The options array.
*/
public function get_options(): array {
return $this->apply_filter_on_options(
[
'placement-cache-busting' => false,
'placement-display-conditions' => false,
'placement-visitor-conditions' => false,
'placement-item-alternative' => false,
'placement-tests' => false,
]
);
}
}