Files
roi-theme/wp-content/plugins/ajax-search-pro/backend/settings/class/four.class.php
root a22573bf0b 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>
2025-11-03 21:04:30 -06:00

60 lines
2.4 KiB
PHP
Executable File

<?php
if (!class_exists("wpdreamsFour")) {
/**
* Class wpdreamsFour
*
* Holds four separate values in four input boxes labeled: Top Bottom Right Left.
* Good input choice for CSS padding, margin, border-width etc..
*
* @package WPDreams/OptionsFramework/Classes
* @category Class
* @author Ernest Marcinko <ernest.marcinko@wp-dreams.com>
* @link http://wp-dreams.com, http://codecanyon.net/user/anago/portfolio
* @copyright Copyright (c) 2014, Ernest Marcinko
*/
class wpdreamsFour extends wpdreamsType {
private $top, $bottom, $right, $left, $desc;
function getType() {
parent::getType();
$this->processData();
echo "
<div class='wpdreamsFour'>
<fieldset>
<legend>" . $this->label . "</legend>";
echo "
<label>" . __('Top', 'ajax-search-pro') . "</label><input type='text' class='threedigit' name='topleft' value='" . $this->top . "' />
<label>" . __('Bottom', 'ajax-search-pro') . "</label><input type='text' class='threedigit' name='bottomright' value='" . $this->bottom . "' />
<label>" . __('Right', 'ajax-search-pro') . "</label><input type='text' class='threedigit' name='topright' value='" . $this->right . "' />
<label>" . __('Left', 'ajax-search-pro') . "</label><input type='text' class='threedigit' name='bottomleft' value='" . $this->left . "' />
<input isparam=1 type='hidden' value='" . $this->data . "' name='" . $this->name . "'>
<div class='triggerer'></div>
<p class='descMsg'>$this->desc</p>
</fieldset>
</div>";
}
function processData() {
$this->desc = $this->data['desc'];
$this->data = str_replace("\n", "", $this->data['value']);
preg_match("/\|\|(.*?)\|\|(.*?)\|\|(.*?)\|\|(.*?)\|\|/", $this->data, $matches);
$this->top = $matches[1];
$this->bottom = $matches[2];
$this->right = $matches[3];
$this->left = $matches[4];
}
final function getData() {
return $this->data;
}
final function getSelected() {
return array(
"top" => $this->top,
"bottom" => $this->bottom,
"right" => $this->right,
"left" => $this->left
);
}
}
}