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,57 @@
<?php
class BWFCRM_API_Get_Recent_Contacts extends BWFCRM_API_Base {
public static $ins;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public $contact;
public $total_count;
public function __construct() {
parent::__construct();
$this->method = WP_REST_Server::READABLE;
$this->route = '/dashboard/recent-contacts';
$this->pagination->limit = 5;
$this->pagination->offset = 0;
}
public function default_args_values() {
}
public function process_api_call() {
/** checking if id or email present in params **/ // $additional_filter = array(
// 'exclude_unsubscribe' => true,
// 'customer_data' => true,
// );
// $contacts = BWFCRM_Contact::get_recent_contacts( 0, $this->pagination->limit, $additional_filter );
$contacts = BWFAN_Dashboards::get_recent_contacts();
if ( ! is_array( $contacts ) ) {
$this->response_code = 500;
return $this->error_response( is_string( $contacts ) ? $contacts : __( 'Unknown Error', 'wp-marketing-automations-pro' ) );
}
if ( ! isset( $contacts ) || empty( $contacts ) ) {
return $this->success_response( [] );
}
$this->response_code = 200;
$this->total_count = count( $contacts );
return $this->success_response( $contacts );
}
public function get_result_total_count() {
return $this->total_count;
}
}
BWFCRM_API_Loader::register( 'BWFCRM_API_Get_Recent_Contacts' );

View File

@@ -0,0 +1,47 @@
<?php
class BWFCRM_API_Get_Top_Automations extends BWFCRM_API_Base {
public static $ins;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public $contact;
public $total_count;
public function __construct() {
parent::__construct();
$this->method = WP_REST_Server::READABLE;
$this->route = '/dashboard/top-automations';
$this->pagination->limit = 5;
$this->pagination->offset = 0;
}
public function default_args_values() {
}
public function process_api_call() {
$top_automations = BWFCRM_Automations::get_top_automations();
if ( ! isset( $top_automations['top_automations'] ) || empty( $top_automations['top_automations'] ) ) {
return $this->success_response( [] );
}
$this->response_code = 200;
$this->total_count = count( $top_automations['top_automations'] );
return $this->success_response( $top_automations['top_automations'] );
}
public function get_result_total_count() {
return $this->total_count;
}
}
BWFCRM_API_Loader::register( 'BWFCRM_API_Get_Top_Automations' );

View File

@@ -0,0 +1,47 @@
<?php
class BWFCRM_API_Get_Top_Broadcast extends BWFCRM_API_Base {
public static $ins;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public $contact;
public $total_count;
public function __construct() {
parent::__construct();
$this->method = WP_REST_Server::READABLE;
$this->route = '/dashboard/top-broadcast';
$this->pagination->limit = 5;
$this->pagination->offset = 0;
}
public function default_args_values() {
}
public function process_api_call() {
$top_broadcast = BWFCRM_Campaigns::get_top_broadcast();
if ( ! isset( $top_broadcast['top_broadcast'] ) || empty( $top_broadcast['top_broadcast'] ) ) {
return $this->success_response( [] );
}
$this->response_code = 200;
$this->total_count = count( $top_broadcast['top_broadcast'] );
return $this->success_response( $top_broadcast['top_broadcast'] );
}
public function get_result_total_count() {
return $this->total_count;
}
}
BWFCRM_API_Loader::register( 'BWFCRM_API_Get_Top_Broadcast' );

View File

@@ -0,0 +1,47 @@
<?php
class BWFCRM_API_Get_Popular_Emails extends BWFCRM_API_Base {
public static $ins;
public static function get_instance() {
if ( null === self::$ins ) {
self::$ins = new self();
}
return self::$ins;
}
public $contact;
public $total_count;
public function __construct() {
parent::__construct();
$this->method = WP_REST_Server::READABLE;
$this->route = '/dashboard/popular-emails';
$this->pagination->limit = 5;
$this->pagination->offset = 0;
}
public function default_args_values() {
}
public function process_api_call() {
$popular_emails = BWFCRM_Conversation::get_popular_emails();
if ( ! isset( $popular_emails['popular_emails'] ) || empty( $popular_emails['popular_emails'] ) ) {
return $this->success_response( [] );
}
$this->response_code = 200;
$this->total_count = count( $popular_emails['popular_emails'] );
return $this->success_response( $popular_emails['popular_emails'] );
}
public function get_result_total_count() {
return $this->total_count;
}
}
BWFCRM_API_Loader::register( 'BWFCRM_API_Get_Popular_Emails' );

View File

@@ -0,0 +1,3 @@
<?php
//silence is golden