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,73 @@
<?php
class Tve_Dash_Icon_Manager {
/**
* Get retina icons from dashboard and also if the imported page had retina icons too
*
* @param null $post_id - edited page id
*
* @return array
*/
public static function get_custom_icons( $post_id = null ) {
if ( empty( $post_id ) ) {
$post_id = get_the_ID();
}
$icon_data = get_option( 'thrive_icon_pack' );
if ( empty( $icon_data['icons'] ) ) {
$icon_data['icons'] = array();
}
$icon_data['icons'] = apply_filters( 'tcb_get_extra_icons', $icon_data['icons'], $post_id ); //
$data = array(
'style' => 'icomoon',
'prefix' => 'icon',
'icons' => $icon_data['icons'],
);
return $data;
}
/**
* Enqueue Fontawesome and Material icons css styles
* Needed for icon modal to use fonts instead of svgs
*/
public static function enqueue_fontawesome_styles() {
$license = 'use';
if ( get_option( 'tvd_fa_kit' ) ) {
$license = 'pro';
}
wp_enqueue_style( 'tvd_material', '//fonts.googleapis.com/css?family=Material+Icons+Two+Tone' );
wp_enqueue_style( 'tvd_material_community', '//cdn.materialdesignicons.com/5.3.45/css/materialdesignicons.min.css' );
wp_enqueue_style( 'tvd_fa', "//$license.fontawesome.com/releases/v6.7.1/css/all.css" );
}
/**
* Enqueue the CSS for the icon pack used by the user
*
* @return false|string url
*/
public static function enqueue_icon_pack() {
$handle = 'thrive_icon_pack';
if ( wp_style_is( $handle, 'enqueued' ) ) {
return false;
}
$icon_pack = get_option( 'thrive_icon_pack' );
if ( empty( $icon_pack['css'] ) ) {
return false;
}
$css_url = $icon_pack['css'];
$css_version = isset( $icon_pack['css_version'] ) ? $icon_pack['css_version'] : TVE_DASH_VERSION;
$_url = tve_dash_url_no_protocol( $css_url );
wp_enqueue_style( $handle, $_url, array(), $css_version );
return $_url . '?ver=' . $css_version;
}
}

View File

@@ -0,0 +1,150 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
require_once dirname( __FILE__ ) . '/Tve_Dash_Thrive_Icon_Manager_Data.php';
require_once dirname( __FILE__ ) . '/Tve_Dash_Thrive_Icon_Manager_View.php';
if ( ! class_exists( 'Tve_Dash_Thrive_Icon_Manager' ) ) {
class Tve_Dash_Thrive_Icon_Manager {
/**
* singleton instance
*
* @var Tve_Dash_Thrive_Icon_Manager
*/
protected static $instance = null;
/**
* @var Tve_Dash_Thrive_Icon_Manager_View
*/
protected $view = null;
/**
* success / error messages
*
* @var array
*
*/
protected $messages = array();
/**
* singleton implementation
*
* @return Tve_Dash_Thrive_Icon_Manager
*/
public static function instance() {
if ( static::$instance === null ) {
static::$instance = new Tve_Dash_Thrive_Icon_Manager();
}
return static::$instance;
}
/**
* Class Constructor
*/
public function __construct() {
$this->view = new Tve_Dash_Thrive_Icon_Manager_View( dirname( dirname( __FILE__ ) ) . '/views' );
}
/**
* main page displaying all options
*/
public function mainPage() {
if ( ! empty( $_POST['tve_save_icon_pack'] ) ) {
$this->handlePost();
}
$this->enqueue();
$icon_pack = get_option( 'thrive_icon_pack' );
if ( ! empty( $icon_pack['css'] ) ) {
wp_enqueue_style( 'thrive_icon_pack', tve_dash_url_no_protocol( $icon_pack['css'] ), array(), $icon_pack['css_version'] );
}
$data = array(
'icons' => empty( $icon_pack ) ? array() : $icon_pack['icons'],
'icon_pack_name' => empty( $icon_pack ) ? '' : $icon_pack['attachment_name'],
'icon_pack_id' => empty( $icon_pack ) ? '' : $icon_pack['attachment_id'],
'variations' => empty( $icon_pack ) || empty( $icon_pack['variations'] ) ? array() : $icon_pack['variations'],
'messages' => $this->messages,
);
$this->view->render( 'main', $data );
}
/**
* handles the user-submitted data and redirects to the same Icon Manager page, with success / error messages
*/
public function handlePost() {
$icon_pack = get_option( 'thrive_icon_pack' );
$new_icon_pack = array();
$handler = new Tve_Dash_Thrive_Icon_Manager_Data();
if ( ! empty( $_POST['attachment_id'] ) ) {
$maybe_zip_file = get_attached_file( absint( $_POST['attachment_id'] ) );
$maybe_zip_url = wp_get_attachment_url( absint( $_POST['attachment_id'] ) );
try {
$new_icon_pack = $handler->processZip( $maybe_zip_file, $maybe_zip_url );
if ( ! empty( $icon_pack['folder'] ) && $icon_pack['folder'] != $new_icon_pack['folder'] ) {
/* remove old folder */
$old_handler = new Tve_Dash_Thrive_Icon_Manager_Data();
$font_family = isset( $icon_pack['fontFamily'] ) ? $icon_pack['fontFamily'] : '';
$old_handler->removeIcoMoonFolder( $icon_pack['folder'], $font_family );
}
$new_icon_pack['attachment_id'] = absint( $_POST['attachment_id'] );
$new_icon_pack['attachment_name'] = basename( $maybe_zip_file );
$success = __( 'New IcoMoon Font Pack installed. ', 'thrive-dash' );
} catch ( Exception $e ) {
$this->messages['error'] = $e->getMessage();
}
} else { // remove existing IcoMoon font
if ( ! empty( $icon_pack['folder'] ) ) {
/* remove old folder */
$old_handler = new Tve_Dash_Thrive_Icon_Manager_Data();
$font_family = isset( $icon_pack['fontFamily'] ) ? $icon_pack['fontFamily'] : '';
$old_handler->removeIcoMoonFolder( $icon_pack['folder'], $font_family );
}
$success = __( 'IcoMoon Font Pack has been removed. ', 'thrive-dash' );
}
if ( isset( $success ) ) {
update_option( 'thrive_icon_pack', $new_icon_pack );
$this->messages['success'] = $success . 'You will be redirected to the previous page in %s seconds.';
$this->messages['redirect'] = admin_url( 'admin.php?page=tve_dash_icon_manager' );
}
}
/**
* enqueue scripts and css files for the icon manger admin page
*/
protected function enqueue() {
tve_dash_enqueue();
wp_enqueue_media();
tve_dash_enqueue_script( 'tve_dash_icon_manager_options', TVE_DASH_URL . '/inc/icon-manager/views/js/manager.js', array(
'jquery',
'media-upload',
'thickbox',
) );
tve_dash_enqueue_style( 'tve_dash_icon_manager_style', TVE_DASH_URL . '/inc/icon-manager/views/css/manager.css' );
}
}
}

View File

@@ -0,0 +1,261 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
if ( ! class_exists( 'Tve_Dash_Thrive_Icon_Manager_Data' ) ) {
/**
*
* handles the processing and retrieving of all icon-manager related data
*
* Class Thrive_Icon_Manager_Data
*/
class Tve_Dash_Thrive_Icon_Manager_Data {
/**
* a list containing all expected files inside a zip archive - relative to the archive root folder
*
* @var array
*/
protected $zip_contents
= array(
'demo.html',
'style.css',
'selection.json',
'fonts/[fontFamily].eot',
'fonts/[fontFamily].svg',
'fonts/[fontFamily].ttf',
'fonts/[fontFamily].woff',
);
/**
*
* @param string $zip_file full path to IcoMoon zip file
* @param string $zip_url
*
* @throws Exception
*
* @return array processed icons - Icon classes and the url to the css file
*/
public function processZip( $zip_file, $zip_url ) {
$clean_filename = $this->validateZip( $zip_file );
//Step 1: make sure the destination folder exists
$font_dir_path = dirname( $zip_file ) . '/' . $clean_filename;
//Step 1.1 prepare the filesystem
$extra = array(
'tve_save_icon_pack',
'tve_icon_pack_url',
'attachment_id',
);
$credentials = request_filesystem_credentials( admin_url( "admin.php?page=tve_dash_icon_manager" ), '', false, false, $extra );
if ( ! $credentials ) {
//show FTP form
die;
}
if ( ! WP_Filesystem( $credentials ) ) {
throw new Exception( "Invalid credentials" );
}
/** @var WP_Filesystem_Base $wp_filesystem */
global $wp_filesystem;
if ( defined( 'FTP_BASE' ) && $wp_filesystem instanceof WP_Filesystem_FTPext ) {
$font_dir_path = ltrim( str_replace( FTP_BASE, '', $font_dir_path ), '/' );
}
//Step 2: unzip
$result = unzip_file( $zip_file, $font_dir_path );
if ( is_wp_error( $result ) ) {
throw new Exception( 'Error (unzip): ' . $result->get_error_message() );
}
//Step 3: process the zip
//check for selection.json file to be able to check the font family from within it
$this->checkExtractedFiles( $font_dir_path, 'selection.json' );
//read the config
$config = @json_decode( $wp_filesystem->get_contents( $font_dir_path . '/selection.json' ), true );
//read the font family from config
$font_family = $config['preferences']["fontPref"]["metadata"]["fontFamily"];
//replace the placeholders for expecting files
$this->prepareRequiredFiles( $font_family );
//check the files expected to be in zip
$this->checkExtractedFiles( $font_dir_path );
$this->applyChangesOnStyle( $font_dir_path . '/style.css', $font_family );
if ( empty( $config ) || empty( $config['icons'] ) ) {
throw new Exception( 'It seems something is wrong inside the selection.json config file' );
}
$data = array(
'folder' => $font_dir_path,
'css' => dirname( $zip_url ) . '/' . $clean_filename . '/style.css',
'icons' => array(),
'fontFamily' => $font_family,
'css_version' => rand( 1, 9 ) . '.' . str_pad( rand( 1, 99 ), 2, '0', STR_PAD_LEFT ),
'variations' => array(),
);
$prefix = empty( $config['preferences']['fontPref']['prefix'] ) ? 'icon-' : $config['preferences']['fontPref']['prefix'];
$class_selector = ! empty( $config['preferences']['fontPref']['classSelector'] ) ? str_replace( '.', '', $config['preferences']['fontPref']['classSelector'] ) : '';
foreach ( $config['icons'] as $icon_data ) {
if ( empty( $icon_data['properties']['name'] ) ) {
continue;
}
$variations = $this->get_icon_variations( $icon_data['properties']['name'], $prefix );
$name = reset( $variations );
$data['icons'] [] = ( $class_selector ? $class_selector . ' ' : '' ) . $name;
if ( count( $variations ) > 1 ) {
$data['variations'][ $name ] = implode( ', ', $variations );
}
}
return $data;
}
/**
* users can define multiple classes for an icon, separated by comma. this will make sure that we also handle those cases
*
* @param string $name
* @param string $prefix prefix for the icon names
*
* @return array
*/
protected function get_icon_variations( $name, $prefix ) {
$variations = explode( ',', $name );
$variations = array_map( 'trim', $variations );
$variations = array_filter( $variations );
foreach ( $variations as $i => $variation ) {
$variations[ $i ] = $prefix . $variation;
}
return $variations;
}
/**
* Replace the placeholders from required file names with $font_family
*
* @param $font_family
*/
public function prepareRequiredFiles( $font_family ) {
foreach ( $this->zip_contents as $key => $file ) {
$this->zip_contents[ $key ] = str_replace( "[fontFamily]", $font_family, $file );
}
}
public function applyChangesOnStyle( $css_file, $font_family ) {
/* @var WP_Filesystem_Base $wp_filesystem */
global $wp_filesystem;
if ( ! $wp_filesystem->is_file( $css_file ) ) {
throw new Exception( $css_file . " cannot be found to apply changes on it !" );
}
$file_content = $wp_filesystem->get_contents( $css_file );
$search = "font-family: '{$font_family}';";
$replacement = "font-family: '{$font_family}' !important;";
/**
* make sure the replace is done after the @font-face declaration
*/
if ( ! preg_match( '#@font-face([^\}]+)\}#si', $file_content, $m, PREG_OFFSET_CAPTURE ) ) {
return true;
}
$position = strlen( $m[0][0] ) + $m[0][1];
$position = strpos( $file_content, $search, $position );
if ( $position === false ) {
return true;
}
$file_content = substr_replace( $file_content, $replacement, $position, strlen( $search ) );
return $wp_filesystem->put_contents( $css_file, $file_content );
}
/**
* validate the file
*
* @param string $file
*/
public function validateZip( $file ) {
if ( empty( $file ) || ! is_file( $file ) ) {
throw new Exception( 'Invalid or empty file' );
}
$info = wp_check_filetype( $file );
if ( strtolower( $info['ext'] ) !== 'zip' ) {
throw new Exception( 'The selected file is not a zip archive' );
}
return trim( str_replace( $info['ext'], '', basename( $file ) ), '/. ' );
}
/**
* check if all the necessary files exist in the specified $dir
*
* @param string $dir
*/
public function checkExtractedFiles( $dir, $specific_files = array() ) {
if ( empty( $dir ) ) {
throw new Exception( 'Empty folder' );
}
/** @var WP_Filesystem_Base $wp_filesystem */
global $wp_filesystem;
if ( ! is_array( $specific_files ) ) {
$specific_files = array( $specific_files );
}
$files_to_check = array_intersect( $this->zip_contents, $specific_files );
if ( empty( $files_to_check ) ) {
$files_to_check = $this->zip_contents;
}
foreach ( $files_to_check as $expected_file ) {
if ( ! $wp_filesystem->is_file( $dir . '/' . $expected_file ) ) {
throw new Exception( 'Could not find the following file inside the archive: ' . $expected_file );
}
}
}
/**
* try to completely remove the $folder
*
* @param string $folder full path to the IcoMoon folder
*/
public function removeIcoMoonFolder( $folder, $fontFamily = '' ) {
$this->prepareRequiredFiles( $fontFamily );
foreach ( $this->zip_contents as $file ) {
if ( is_file( $folder . '/' . $file ) ) {
@unlink( $folder . '/' . $file );
}
}
@rmdir( $folder . '/fonts' );
@unlink( $folder . '/demo-files/demo.css' );
@unlink( $folder . '/demo-files/demo.js' );
@rmdir( $folder . '/demo-files' );
@unlink( $folder . '/Read Me.txt' );
@rmdir( $folder );
}
}
}

View File

@@ -0,0 +1,88 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
if ( ! class_exists( 'Tve_Dash_Thrive_Icon_Manager_View' ) ) {
/**
* handles the output of the partial views, as well as assigning variables to them
* Class Thrive_Icon_Manager_View
*/
class Tve_Dash_Thrive_Icon_Manager_View {
/**
* @var string path to the view templates
*/
protected $path = '';
/**
* this will hold the view data
* (accessible inside the view with $this->xxx)
* @var array
*/
protected $data = array();
/**
* @param string $basePath
*/
public function __construct( $basePath ) {
$this->path = $basePath;
}
/**
* render a view file, with optional data to assign to it
*
* @param $file
* @param array $withData
*/
public function render( $file, $withData = array() ) {
if ( strpos( $file, '.php' ) === false ) {
$file .= '.php';
}
if ( ! is_file( $this->path . '/' . $file ) ) {
echo 'No template found for ' . esc_html( $file );
return;
}
if ( ! is_array( $withData ) ) {
$withData = array( 'data' => $withData );
}
if ( ! empty( $withData ) ) {
$this->data = array_merge_recursive( $this->data, $withData );
}
include $this->path . '/' . $file;
}
/**
* magic getter - get data from $this->data array
*
* @param $key
*
* @return
*/
public function __get( $key ) {
return isset( $this->data[ $key ] ) ? $this->data[ $key ] : null;
}
/**
* magic setter
*
* @param $key
* @param $value
*/
public function __set( $key, $value ) {
$this->data[ $key ] = $value;
}
}
}

View File

@@ -0,0 +1,52 @@
.iconmanager-messages {
padding: 20px 0 10px 0;
}
.iconmanager-messages div.error, .iconmanager-messages div.updated {
margin: 0;
}
.iconmanager-messages div.error p {
color: #dd3d36;
}
.icomoon-icon {
display: inline-block;
margin: 0 10px 10px 0;
padding: 20px 0;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
font-size: 30px;
line-height: 30px;
height: 70px;
width: 70px;
text-align: center;
color: #444;
background-color: #eee;
vertical-align: middle;
}
.icomoon-icon:hover {
background: #ccc;
color: #000;
}
.dash-icon-manager-settings {
background: #fff;
border: 1px solid #E1E1E1;
margin: 0 20px 0 0;
padding: 25px;
color: #323232;
font-family: 'Source Sans Pro', sans-serif;
}
.dash-icon-manager-settings h3 {
border-bottom: 1px solid #e1e1e1;
font-weight: 300;
font-style: italic;
font-size: 25px;
padding-bottom: 10px;
padding-top: 0px;
margin: 0;
}

View File

@@ -0,0 +1,32 @@
<form action="" method="post">
<div class="tvd-row">
<div class="tvd-col tvd-s12 tvd-m3 tvd-l2">
<?php echo esc_html__( "Upload Icon Pack", 'thrive-dash' ) ?>
</div>
<div class="tvd-col tvd-s12 tvd-m9 tvd-l10">
<input type="hidden" name="tve_save_icon_pack" value="1">
<input type="text" value="<?php echo esc_attr( $this->icon_pack_name ); ?>" id="tve_icon_pack_file" name="tve_icon_pack_url" class="thrive_options" readonly="readonly">
<input type="hidden" value="<?php echo esc_attr( $this->icon_pack_id ); ?>" id="tve_icon_pack_file_id" name="attachment_id">
<a class="tvd-waves-effect tvd-waves-light tvd-btn-small tvd-btn-green" id="tve_icon_pack_upload" href="javascript:void(0)">
<i class="tvd-icon-plus"></i> <?php echo esc_html__( "Upload", 'thrive-dash' ) ?>
</a>
<a class="tvd-waves-effect tvd-waves-light tvd-btn-small tvd-btn-red" id="tve_icon_pack_remove" href="javascript:void(0)">
<i class="tvd-icon-remove"></i> <?php echo esc_html__( "Remove", 'thrive-dash' ) ?>
</a>
</div>
</div>
<div class="tvd-row">
<div class="tvd-col tvd-s12 tvd-m3 tvd-l2">
<?php echo esc_html__( "Save options", 'thrive-dash' ) ?>
</div>
<div class="tvd-col tvd-s12 tvd-m9 tvd-l10">
<input type="submit" id="tve_icon_pack_save" value="<?php echo esc_html__( "Save and Generate Icons", 'thrive-dash' ) ?>" class="tvd-waves-effect tvd-waves-light tvd-btn-small tvd-btn-blue"/>
</div>
</div>
</form>

View File

@@ -0,0 +1,9 @@
<h3><?php echo esc_html__( "Your Custom Icons", 'thrive-dash' ) ?></h3>
<p><?php echo esc_html__( "These icons are available for use on your site:", 'thrive-dash' ) ?></p>
<div class="icomoon-admin-icons">
<?php foreach ( $this->icons as $class ) : ?>
<span class="icomoon-icon" title="<?php echo array_key_exists( $class, $this->variations ) ? esc_attr( $this->variations[ $class ] ) : esc_attr( $class ) ?>">
<span class="<?php echo esc_attr( $class ); ?>"></span>
</span>
<?php endforeach ?>
</div>

View File

@@ -0,0 +1,65 @@
( function ( $ ) {
$( function () {
const $upload = $( '#tve_icon_pack_upload' ),
$remove = $( '#tve_icon_pack_remove' ),
$input = $( '#tve_icon_pack_file' ),
$inputId = $( '#tve_icon_pack_file_id' );
let wpFileFrame;
$input.on( 'click', () => {
$upload.click();
} );
$upload.on( 'click', e => {
e.preventDefault();
if ( ! wpFileFrame ) {
wpFileFrame = wp.media.frames.file_frame = wp.media( {
title: 'Upload IcoMoon Font Pack',
button: {
text: 'Use file'
},
multiple: false
} );
/* Add class so we can add custom CSS */
wpFileFrame.on( 'open', function () {
wpFileFrame.$el.addClass( 'retina-icon-picker' )
} );
wpFileFrame.on( 'select', function () {
const attachment = wpFileFrame.state().get( 'selection' ).first().toJSON();
$inputId.val( attachment.id );
$input.val( attachment.filename );
} );
}
wpFileFrame.open();
return false;
} );
$remove.on( 'click', function () {
$input.val( '' );
$inputId.val( '' );
} );
const $redirectTo = $( '#tve-redirect-to' ),
$redirectIn = $( '#tve-redirect-count' );
if ( $redirectIn.length && $redirectTo.length ) {
const interval = setInterval( function () {
let _current = parseInt( $redirectIn.text() );
_current --;
$redirectIn.html( _current + '' );
if ( _current === 0 ) {
clearInterval( interval );
location.href = $redirectTo.val();
}
}, 1000 );
}
} );
} )( jQuery );

View File

@@ -0,0 +1,51 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
if ( $this->messages ) : ?>
<?php $this->render( 'messages' ); ?>
<?php endif ?>
<?php if ( empty( $this->messages['redirect'] ) ) : ?>
<?php include TVE_DASH_PATH . '/templates/header.phtml'; ?>
<div class="tvd-v-spacer vs-2"></div>
<div class="dash-icon-manager-settings">
<h3><?php echo esc_html__( "Thrive Icon Manager", 'thrive-dash' ); ?></h3>
<p><?php echo esc_html__( "Thrive Themes integrate with IcoMoon. Here's how it works:", 'thrive-dash' ) ?></p>
<ol>
<li><?php echo wp_kses_post( sprintf( __( "%s to go to the IcoMoon web app and select the icons you want to use in your site", 'thrive-dash' ), '<a target="_blank" href="//icomoon.io/app/#/select">' . __( "Click here", 'thrive-dash' ) . '</a>' ) ); ?></li>
<li><?php echo esc_html__( "Download the font file from IcoMoon to your computer", 'thrive-dash' ) ?></li>
<li><?php echo esc_html__( "Upload the font file through the upload button below", 'thrive-dash' ) ?></li>
<li><?php echo esc_html__( "Your icons will be available for use!", 'thrive-dash' ) ?></li>
</ol>
<div class="clear"></div>
<p>&nbsp;</p>
<h3><?php echo esc_html__( "Import Icons", 'thrive-dash' ) ?></h3>
<?php if ( ! $this->icons ) : ?>
<p><?php echo esc_html__( "You don't have any icons yet, use the Upload button to import a custom icon pack.", 'thrive-dash' ) ?></p>
<?php else: ?>
<p><?php echo esc_html__( "Your custom icon pack has been loaded. To modify your icon pack, simply upload a new file.", 'thrive-dash' ) ?></p>
<?php endif ?>
<?php $this->render( 'form' ) ?>
<div class="clear"></div>
<p>&nbsp;</p>
<?php if ( $this->icons ) : ?>
<?php $this->render( 'icons' ) ?>
<?php endif ?>
<div class="tvd-row" style="margin-top: 10px;">
<a href="<?php echo esc_url( admin_url( 'admin.php?page=tve_dash_section' ) ); ?>" class="tvd-waves-effect tvd-waves-light tvd-btn-small tvd-btn-gray">
<?php echo esc_html__( "Back To Dashboard", 'thrive-dash' ); ?>
</a>
</div>
</div>
<?php endif ?>

View File

@@ -0,0 +1,15 @@
<div class="iconmanager-messages">
<?php if ( ! empty( $this->messages['error'] ) ) : ?>
<div class="error">
<p><?php echo esc_html( $this->messages['error'] ); ?></p>
</div>
<?php endif ?>
<?php if ( ! empty( $this->messages['success'] ) ) : ?>
<div class="updated">
<p><?php echo sprintf( esc_html( $this->messages['success'] ), '<span id="tve-redirect-count">2</span>' ); ?></p>
<?php if ( ! empty( $this->messages['redirect'] ) ) : ?>
<input type="hidden" id="tve-redirect-to" value="<?php echo esc_attr( $this->messages['redirect'] ); ?>">
<?php endif ?>
</div>
<?php endif ?>
</div>