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,30 @@
<?php
/**
* Ajax actions bound with the notices.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package factory-notices
* @since 1.0.0
*/
function factory_notices_323_hide() {
$id = empty( $_POST['id'] ) ? null : $_POST['id'];
$never = ( empty( $_POST['never'] ) || $_POST['never'] == 'false' ) ? false : true;
if ( !$id ) exit;
$notices = get_option("factory_notices_closed", array());
$notices[$id] = array(
'never' => $never,
'time' => time()
);
delete_option('factory_notices_closed');
add_option('factory_notices_closed', $notices);
echo 'ok';
exit;
}
add_action('wp_ajax_factory_notices_323_hide', 'factory_notices_323_hide');

View File

@@ -0,0 +1,212 @@
/*!
* Factory Notices
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package factory-notices
* @since 1.0.0
*/
.factory-notices-323-notices.updated {
padding: 0px;
border: 0px;
background-color: transparent;
box-shadow: none;
}
.factory-notices-323-notices .factory-notice + .factory-notice {
margin-top: 10px;
}
/**
* Hero Offer
*/
.factory-notices-323-notices .factory-hero {
position: relative;
background-color: #314860;
border-radius: 4px;
box-shadow: inset 0 0 5px rgba(0,0,0,0.15);
padding: 0px;
font-size: 18px;
font-family: "Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;
font-weight: normal;
color: #fff;
text-shadow: 0px 1px 1px rgba(0,0,0,0.4);
line-height: 130%;
border: 1px solid #404b57;
}
.factory-notices-323-notices .factory-hero .factory-inner-wrap {
overflow: hidden;
padding: 15px 15px 20px 15px;
}
.factory-notices-323-notices .factory-hero .factory-header {
font-weight: bold;
text-transform: uppercase;
}
.factory-notices-323-notices .factory-hero .factory-message,
.factory-notices-323-notices .factory-hero .factory-header {
display: inline;
}
.factory-notices-323-notices .factory-hero .factory-message-container {
float: left;
width: 68.421053%;
}
.factory-notices-323-notices .factory-hero .factory-message-container a {
color: #fff;
text-decoration: underline;
}
.factory-notices-323-notices .factory-hero .factory-buttons {
position: absolute;
bottom: 10px;
right: 10px;
}
.factory-notices-323-notices .factory-hero .factory-button {
display: inline-block;
line-height: 1.2;
text-align: center;
-moz-box-shadow: inset 0 0 2px #fff, 0 1px 5px rgba(0,0,0,0.3);
-webkit-box-shadow: inset 0 0 2px #fff, 0 1px 5px rgba(0,0,0,0.3);
box-shadow: inset 0 0 2px #fff, 0 1px 5px rgba(0,0,0,0.3);
padding: 9px 15px 8px 15px;
border-radius: 5px;
background: #1b9772;
border: 1px solid #2e3847;
color: #fff;
font-size: 16px;
font-weight: bold;
text-decoration: none;
text-shadow: 0px 1px 2px rgba( 0,0,0,0.5);
-webkit-transition-duration: .3s;
-moz-transition-duration: .3s;
cursor: pointer;
}
.factory-notices-323-notices .factory-hero .factory-button:hover {
color: #fff !important;
background-color: #f0a000;
border-color: #c87800;
-webkit-transition-duration: .3s;
outline: none;
-moz-box-shadow: inset 0 0 2px #fff, 0 1px 7px rgba(240,160,0,0.5);
-webkit-box-shadow: inset 0 0 2px #fff, 0 1px 7px rgba(240,160,0,0.5);
box-shadow: inset 0 0 2px #fff, 0 1px 7spx rgba(240,160,0,0.5);
}
.factory-notices-323-notices .factory-hero .highlighted {
background-color: rgba(255,255,255,0.12);
padding: 0 7px;
display: inline-block;
border-radius: 3px;
font-weight: bold;
text-decoration: none !important;
-webkit-transition-duration: .3s;
-moz-transition-duration: .3s;
}
.factory-notices-323-notices .factory-hero .highlighted:hover {
background-color: rgba(255,255,255,0.3);
}
/**
* Alert Danger
*/
.factory-notices-323-notices .alert-danger .factory-inner-wrap {
min-height: 90px;
padding-left: 110px;
background: url("../img/alert-danger-icon.png") no-repeat top left;
}
.factory-notices-323-notices .alert-danger .factory-close {
opacity: 1;
}
.factory-notices-323-notices .alert-danger .factory-close .fa {
color: #b23e3a;
text-shadow: none;
}
.factory-notices-323-notices .alert .factory-button {
margin-right: 5px;
}
/**
* Call to action
*/
.factory-notices-323-notices .call-to-action {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
background-color: #f7f7f7;
color: #111;
border: 2px solid #0074a2;
}
.factory-notices-323-notices2 .call-to-action .factory-inner-wrap {
min-height: 90px;
padding-left: 110px;
background: url("../img/call-to-action-icon-4.png") no-repeat top left;
}
.factory-notices-323-notices .call-to-action h4 {
margin-top: 0;
color: inherit;
margin-bottom: 10px;
}
.factory-notices-323-notices .call-to-action .actions {
padding-top: 10px;
}
.factory-notices-323-notices .call-to-action .close {
position: relative;
top: -8px;
right: -7px;
}
.factory-notices-323-notices .call-to-action .factory-button {
margin-right: 5px;
}
.factory-notices-323-notices .call-to-action .factory-icon {
font-size: 100px;
line-height: 100px;
float: left;
margin-right: 15px;
color: #0085ba;
position: relative;
top: -5px;
text-shadow: 0 1px 0 #fff;
}
/**
* Popups
*/
.factory-popup {
max-width: 600px;
background-color: #fff;
padding: 40px;
-moz-box-sizing: border-box;
box-sizing: border-box;
border-radius: 5px;
position: fixed;
visibility: hidden;
top: 50%;
left: 50%;
box-shadow: 0 0 25px rgba(0,0,0,0.1);
z-index: 151;
}
.factory-popup-overlay {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.35);
z-index: 150;
}
.factory-popup .factory-corner-close {
position: absolute;
top: -11px;
right: -11px;
color: #bbb;
font-size: 18px;
background-color: #fff;
height: 20px;
width: 20px;
padding: 7px;
text-align: center;
border-radius: 100%;
-moz-box-sizing: content-box;
box-sizing: content-box;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

View File

@@ -0,0 +1,87 @@
/*!
* Factory Notices
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package factory-notices
* @since 1.0.0
*/
(function($){
if ( window.factory_notices_323_hide_notice ) return;
$(function(){
// notices
$(".factory-notice .factory-close").click(function(){
var id = $(this).parents(".factory-notice").attr('id');
factory_notices_323_hide_notice(id, false);
return false;
});
// popups
var $popups = $(".factory-popup").appendTo( $('body') );
var oneShown = false;
$popups.each(function(){
var $popup = $(this);
// shows only one popup every time
if ( oneShown ) {
$(this).remove();
return true;
}
oneShown = true;
var width = $(this).innerWidth();
var height = $(this).innerHeight();
$(this).css({
'marginTop': -parseInt( ( height / 2 ) ) + 'px',
'marginLeft': -parseInt( ( width / 2 ) ) + 'px',
'visibility': 'visible'
});
var $overlay = $("<div class='factory-popup-overlay'></div>").appendTo( $('body') );
$popup.find('.factory-corner-close').click(function(){
$overlay.fadeOut(300);
$popup.fadeOut(300);
});
$popup.find('.factory-close').click(function(){
var href = $(this).attr('href');
var closeType = $(this).data('close');
if ( 'quick-hide' === closeType ) {
$overlay.hide();
$popup.fadeOut(300);
} else {
var id = $(this).parents(".factory-notice-item").attr('id');
factory_notices_323_hide_notice(id, false);
}
return ( '#' === href ) ? false: true;
});
});
});
window.factory_notices_323_hide_notice = function( id, never ) {
var item = $("#" + id).fadeOut(300, function(){
item.remove();
$.ajax({
url: ajaxurl,
type: "post",
data: {
id: id,
action: "factory_notices_323_hide",
never: never ? true : false
}
});
});
}
})(jQuery);

View File

@@ -0,0 +1,28 @@
<?php
/**
* Factory Notices
*
* Factory is an internal professional framework developed by OnePress Ltd
* for own needs. Please don't use it to create your own independent plugins.
* In future the one will be documentated and released for public.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package factory-notices
* @since 1.0.0
*/
// module provides function only for the admin area
if ( !is_admin() ) return;
if (defined('FACTORY_NOTICES_323_LOADED')) return;
define('FACTORY_NOTICES_323_LOADED', true);
define('FACTORY_NOTICES_323_DIR', dirname(__FILE__));
define('FACTORY_NOTICES_323_URL', plugins_url(null, __FILE__ ));
#comp merge
require(FACTORY_NOTICES_323_DIR . '/ajax.php');
require(FACTORY_NOTICES_323_DIR . '/notices.php');
#endcomp

View File

@@ -0,0 +1,195 @@
<?php
/**
* A group of classes and methods to create and manage notices.
*
* @author Paul Kashtanoff <paul@byonepress.com>
* @copyright (c) 2013, OnePress Ltd
*
* @package factory-notices
* @since 1.0.0
*/
// creating a license manager for each plugin created via the factory
add_action('factory_notices_323_plugin_created', 'factory_notices_323_plugin_created');
function factory_notices_323_plugin_created( $plugin ) {
new FactoryNotices323( $plugin );
}
/**
* A class to manage notices.
*
* @since 1.0.0
*/
class FactoryNotices323 {
public function __construct( $plugin ) {
$this->plugin = $plugin;
add_action('current_screen', array( $this, 'currentScreenAction') );
}
public function currentScreenAction() {
$this->notices = apply_filters('factory_notices_' . $this->plugin->pluginName, array());
if ( count( $this->notices ) == 0 ) return;
$screen = get_current_screen();
$this->hasNotices = false;
foreach ($this->notices as $notice) {
$where = empty( $notice['where'] ) ? array('plugins','dashboard','edit') : $notice['where'];
$screen = get_current_screen();
if ( in_array($screen->base, $where) ) {
$this->hasNotices = true;
break;
};
}
if ( $this->hasNotices ) {
add_action('factory_bootstrap_enqueue_scripts_' . $this->plugin->pluginName, array( $this, 'enqueueBootstrapScripts' ));
add_action('admin_enqueue_scripts', array( $this, 'enqueueScripts' ));
add_action('admin_notices', array( $this, 'showNotices' ));
}
}
public function enqueueBootstrapScripts() {
$this->plugin->bootstrap->enqueueStyle('bootstrap.core');
}
public function enqueueScripts() {
wp_enqueue_style('factory-notices-323-css', FACTORY_NOTICES_323_URL . '/assets/css/notices.css');
wp_enqueue_script('factory-notices-323-js', FACTORY_NOTICES_323_URL . '/assets/js/notices.js');
}
public function showNotices() {
if ( count( $this->notices ) == 0 ) return;
if (
!current_user_can('activate_plugins') ||
!current_user_can('edit_plugins') ||
!current_user_can('install_plugins')) return;
?>
<?php if ( $this->hasNotices ) { ?>
<div class="updated factory-bootstrap-331 factory-fontawesome-320 factory-notices-323-notices">
<?php
foreach ($this->notices as $notice) {
$this->showNotice($notice);
}
?>
</div>
<?php } ?>
<?php
}
/**
* Shows a notice.
*
* The data has the followin format:
* "id" => an id of the notice
* "where" => a place where the notice should be visible (plugins, dashboard and so on)
* "header" => a header of the notice
* "message" => a message of the notice
* "class" => an extra class to add to the notice
* "close" => if true, then the close icon will be available to dissmish the notice
*
* @since 1.0.0
* @param type $data
* @return void
*/
public function showNotice( $data ) {
$type = empty( $data['type'] ) ? 'offer' : $data['type'];
$subtype = empty( $data['subtype'] ) ? 'none' : $data['subtype'];
$position = empty( $data['position'] ) ? 'notice' : $data['position'];
$layout = empty( $data['layout'] ) ? 'standard' : $data['layout'];
// checking if we should show a notice on a current page
$where = empty( $data['where'] ) ? array('plugins','dashboard', 'edit') : $data['where'];
$screen = get_current_screen();
if ( !in_array($screen->base, $where) ) return;
// setups a content of the notice to display
$header = empty( $data['header'] ) ? null : $data['header'];
$message = empty( $data['message'] ) ? null : $data['message'];
$hasHeader = !empty( $header );
$hasMessage = !empty( $message );
$hasClose = isset( $data['close'] ) ? $data['close'] : false;
$hasIcon = isset( $data['icon'] );
if ( !isset( $data['buttons'] ) ) $data['buttons'] = array();
$classes = array();
if ( !empty( $data['class'] ) ) $classes[] = $data['class'];
if ( !empty( $data['plugin'] ) ) $classes[] = 'notice-' . $data['plugin'];
if ( $hasIcon ) $classes[] = 'factory-has-icon';
?>
<div class="factory-notice-item factory-<?php echo $position ?> <?php echo implode(' ', $classes) ?>" id="<?php echo $data['id'] ?>">
<div class="factory-inner-wrap">
<?php if ( $hasClose ) { ?>
<a href="#" class="factory-close close factory-corner-close" data-close="<?php echo $data['close'] ?>" title="Dismiss this message."><i class="fa fa-times"></i></a>
<?php } ?>
<?php if ( $hasIcon ) { ?>
<i class="factory-icon <?php echo $data['icon'] ?>"></i>
<?php } ?>
<div class="factory-message-container">
<?php if ( $hasHeader ) { ?>
<h4 class="factory-header alert-heading"><?php echo $header ?></h4>
<?php } ?>
<span class="factory-message"><?php echo $message ?></span>
</div>
<?php if ( !empty( $data['buttons'] ) ) { ?>
<div class="factory-buttons actions">
<?php foreach( $data['buttons'] as $buttonData ) { ?>
<?php $this->renderNoticeButton( $buttonData, $data['id'] ) ?>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<?php
}
/**
* Show a notice button.
*
* @since 1.0.0
* @return void
*/
public function renderNoticeButton( $data, $id ) {
$title = $data['title'];
$action = $data['action'];
$classes = array();
if ( !empty( $data['class'] ) ) $classes[] = $data['class'];
$onclick = '';
if ( $action == 'x' ) {
$onclick = "factory_notices_323_hide_notice('$id', false); return false;";
$action = '#';
}
if ( $action == 'xx' ) {
$action = '#';
$onclick = "factory_notices_323_hide_notice('$id', true); return false;";
}
?>
<a href="<?php echo $action ?>" onclick="<?php echo $onclick ?>" class="factory-button <?php echo implode(' ', $classes) ?>">
<?php echo $title ?>
</a>
<?php
}
public static function resiter( $className, $plugin ) {
}
}