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:
74
wp-content/plugins/polylang/js/build/user.js
Normal file
74
wp-content/plugins/polylang/js/build/user.js
Normal file
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* Adds one biography textarea field per language in the user profile.
|
||||
*/
|
||||
|
||||
const pllDescription = {
|
||||
/**
|
||||
* Init.
|
||||
*/
|
||||
init: () => {
|
||||
if ( ! pllDescriptionData ) {
|
||||
return;
|
||||
}
|
||||
if ( document.readyState !== 'loading' ) {
|
||||
pllDescription.ready();
|
||||
} else {
|
||||
document.addEventListener(
|
||||
'DOMContentLoaded',
|
||||
pllDescription.ready
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the DOM is ready.
|
||||
*/
|
||||
ready: () => {
|
||||
const originTextarea = document.getElementById( 'description' );
|
||||
|
||||
if ( ! originTextarea ) {
|
||||
return;
|
||||
}
|
||||
|
||||
const rows = [];
|
||||
|
||||
pllDescriptionData.forEach( ( data ) => {
|
||||
const wrapper = document.createElement( 'div' );
|
||||
wrapper.setAttribute( 'lang', data.lang );
|
||||
|
||||
const label = document.createElement( 'label' );
|
||||
label.setAttribute( 'for', `description_${ data.slug }` );
|
||||
label.setAttribute( 'dir', data.direction );
|
||||
|
||||
if ( data.flag.src ) {
|
||||
const img = document.createElement( 'img' );
|
||||
img.setAttribute( 'alt', '' );
|
||||
img.setAttribute( 'src', data.flag.src );
|
||||
if ( data.flag.width ) {
|
||||
img.setAttribute( 'width', data.flag.width );
|
||||
}
|
||||
if ( data.flag.height ) {
|
||||
img.setAttribute( 'height', data.flag.height );
|
||||
}
|
||||
label.textContent = ` ${ data.name }`;
|
||||
label.prepend( img ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend
|
||||
} else {
|
||||
label.textContent = data.name;
|
||||
}
|
||||
|
||||
const textarea = originTextarea.cloneNode( true );
|
||||
textarea.setAttribute( 'id', `description_${ data.slug }` );
|
||||
textarea.setAttribute( 'name', `description_${ data.slug }` );
|
||||
textarea.setAttribute( 'dir', data.direction );
|
||||
textarea.innerHTML = data.description; // phpcs:ignore WordPressVIPMinimum.JS.InnerHTML.Found
|
||||
|
||||
wrapper.append( label, document.createElement( 'br' ), textarea ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.append
|
||||
rows.push( wrapper );
|
||||
} );
|
||||
|
||||
originTextarea.replaceWith( ...rows ); // phpcs:ignore WordPressVIPMinimum.JS.HTMLExecutingFunctions.replaceWith
|
||||
},
|
||||
};
|
||||
|
||||
pllDescription.init();
|
||||
|
||||
Reference in New Issue
Block a user