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:
72
wp-content/themes/kadence/inc/dashboard/react/src/starter.js
Normal file
72
wp-content/themes/kadence/inc/dashboard/react/src/starter.js
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* Activate a plugin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function kadence_starter_activatePlugin() {
|
||||
var data = new FormData();
|
||||
data.append( 'action', 'kadence_install_starter' );
|
||||
data.append( 'security', kadenceDashboardParams.ajax_nonce );
|
||||
data.append( 'status', kadenceDashboardParams.status );
|
||||
jQuery.ajax({
|
||||
method: 'POST',
|
||||
url: kadenceDashboardParams.ajax_url,
|
||||
data: data,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
})
|
||||
.done( function( response, status, stately ) {
|
||||
if ( response.success ) {
|
||||
location.replace( kadenceDashboardParams.starterURL );
|
||||
}
|
||||
})
|
||||
.fail( function( error ) {
|
||||
console.log( error );
|
||||
});
|
||||
}
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useState, useEffect, Fragment } from '@wordpress/element';
|
||||
const { withFilters, TabPanel, Panel, PanelBody, PanelRow, Button, Spinner } = wp.components;
|
||||
export const StarterTab = () => {
|
||||
const [ working, setWorking ] = useState( null );
|
||||
const handleClick = () => {
|
||||
setWorking( true );
|
||||
kadence_starter_activatePlugin();
|
||||
};
|
||||
return (
|
||||
<Fragment>
|
||||
<div className="kadence-desk-starter-inner" style={{ margin: '20px auto', textAlign:'center' }}>
|
||||
<h2>{ __( 'Starter Templates', 'kadence' ) }</h2>
|
||||
<p>{ __( 'Create and customize professionally designed websites in minutes. Simply choose your template, choose your colors, and import. Done!', 'kadence' ) }</p>
|
||||
<div className="image-container">
|
||||
<img width="772" height="250" alt={ __( 'Starter Templates', 'kadence' ) } src={ kadenceDashboardParams.starterImage } />
|
||||
</div>
|
||||
{ kadenceDashboardParams.starterTemplates && (
|
||||
<a
|
||||
className="kt-action-starter kadence-desk-button"
|
||||
href={ kadenceDashboardParams.starterURL }
|
||||
>
|
||||
{ kadenceDashboardParams.starterLabel }
|
||||
</a>
|
||||
) }
|
||||
{ ! kadenceDashboardParams.starterTemplates && (
|
||||
<Button
|
||||
className="kt-action-starter kadence-desk-button"
|
||||
onClick={ () => handleClick() }
|
||||
>
|
||||
{ kadenceDashboardParams.starterLabel }
|
||||
{ working && (
|
||||
<Spinner />
|
||||
) }
|
||||
</Button>
|
||||
|
||||
) }
|
||||
</div>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
||||
export default withFilters( 'kadence_theme_starters' )( StarterTab );
|
||||
Reference in New Issue
Block a user