feat: initial ACRIB WordPress deployment
- WordPress 6.9.4 (es_ES) with Kadence theme - Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto - Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold - Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI) - Plugins: Kadence Blocks, Polylang, Contact Form 7 - Custom CSS with full brand styling and responsive layout - HTTPS enforced via wp-config.php proxy detection
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
/**
|
||||
* The Background customize control extends the WP_Customize_Control class.
|
||||
*
|
||||
* @package customizer-controls
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'WP_Customize_Control' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class Kadence_Control_Background
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
class Kadence_Control_Background extends WP_Customize_Media_Control {
|
||||
/**
|
||||
* Control type
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'kadence_background_control';
|
||||
|
||||
/**
|
||||
* Additional arguments passed to JS.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $default = array();
|
||||
|
||||
/**
|
||||
* Additional arguments passed to JS.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $input_attrs = array(
|
||||
'attachments' => array(
|
||||
'desktop' => array(),
|
||||
'tablet' => array(),
|
||||
'mobile' => array(),
|
||||
),
|
||||
);
|
||||
/**
|
||||
* Additional arguments passed to JS.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $mime_type = 'image';
|
||||
|
||||
/**
|
||||
* Send to JS.
|
||||
*/
|
||||
public function to_json() {
|
||||
parent::to_json();
|
||||
$value = $this->value();
|
||||
if ( $value && is_array( $value ) ) {
|
||||
foreach ( array( 'desktop', 'tablet', 'mobile' ) as $device ) {
|
||||
if ( isset( $value[ $device ] ) && isset( $value[ $device ]['image'] ) && isset( $value[ $device ]['image']['url'] ) && ! empty( $value[ $device ]['image']['url'] ) ) {
|
||||
$attachment_id = attachment_url_to_postid( $value[ $device ]['image']['url'] );
|
||||
$this->input_attrs['attachments'][ $device ] = wp_prepare_attachment_for_js( $attachment_id );
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->json['input_attrs'] = $this->input_attrs;
|
||||
$this->json['default'] = $this->default;
|
||||
}
|
||||
/**
|
||||
* Empty Render Function to prevent errors.
|
||||
*/
|
||||
public function render_content() {
|
||||
}
|
||||
}
|
||||
$wp_customize->register_control_type( 'Kadence_Control_Background' );
|
||||
Reference in New Issue
Block a user