Compare commits
No commits in common. "7f57f705934068dd8f25f29cd8181fda2d5e954e" and "715b542826512fbeca9a5edcfaf004672fa8448a" have entirely different histories.
7f57f70593
...
715b542826
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
require_once(__DIR__ . '/includes/errorlog.php');
|
require_once(__DIR__ . '/includes/errorlog.php');
|
||||||
require_once(__DIR__ . '/includes/init.php');
|
require_once(__DIR__ . '/includes/init.php');
|
||||||
require_once(__DIR__ . '/includes/admin.php');
|
|
||||||
require_once(__DIR__ . '/includes/post_types.php');
|
require_once(__DIR__ . '/includes/post_types.php');
|
||||||
require_once(__DIR__ . '/includes/logos.php');
|
require_once(__DIR__ . '/includes/logos.php');
|
||||||
require_once(__DIR__ . '/includes/article-columns.php');
|
require_once(__DIR__ . '/includes/article-columns.php');
|
||||||
|
|
@ -13,3 +12,20 @@ require_once(__DIR__ . '/includes/article.php');
|
||||||
require_once(__DIR__ . '/includes/api.php');
|
require_once(__DIR__ . '/includes/api.php');
|
||||||
require_once(__DIR__ . '/includes/renderPostsDatas.php');
|
require_once(__DIR__ . '/includes/renderPostsDatas.php');
|
||||||
require_once(__DIR__ . '/includes/utilities.php');
|
require_once(__DIR__ . '/includes/utilities.php');
|
||||||
|
|
||||||
|
// Support SVG - Solution de secours
|
||||||
|
add_filter('upload_mimes', function ($mimes) {
|
||||||
|
$mimes['svg'] = 'image/svg+xml';
|
||||||
|
$mimes['svgz'] = 'image/svg+xml';
|
||||||
|
return $mimes;
|
||||||
|
}, 999);
|
||||||
|
|
||||||
|
// Forcer la reconnaissance des fichiers SVG
|
||||||
|
add_filter('wp_check_filetype_and_ext', function ($data, $file, $filename, $mimes) {
|
||||||
|
if (strtolower(pathinfo($filename, PATHINFO_EXTENSION)) === 'svg') {
|
||||||
|
$data['ext'] = 'svg';
|
||||||
|
$data['type'] = 'image/svg+xml';
|
||||||
|
$data['proper_filename'] = $filename;
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
}, 10, 4);
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ function customize_submenu_classnames($classes, $args, $depth)
|
||||||
// $classes[] = 'sub-menu';
|
// $classes[] = 'sub-menu';
|
||||||
// $classes[] = 'test';
|
// $classes[] = 'test';
|
||||||
// }
|
// }
|
||||||
|
// write_log($classes);
|
||||||
|
// write_log($classes);
|
||||||
|
|
||||||
return $classes;
|
return $classes;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -189,3 +189,31 @@ function apply_footnotes_urls_to_content($content)
|
||||||
|
|
||||||
return $dom->saveHTML();
|
return $dom->saveHTML();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Endpoint AJAX pour sanitize_title
|
||||||
|
add_action('wp_ajax_sanitize_title_ajax', 'sanitize_title_ajax_handler');
|
||||||
|
add_action('wp_ajax_nopriv_sanitize_title_ajax', 'sanitize_title_ajax_handler');
|
||||||
|
|
||||||
|
function sanitize_title_ajax_handler()
|
||||||
|
{
|
||||||
|
// Vérifier le nonce pour la sécurité
|
||||||
|
if (!wp_verify_nonce($_POST['nonce'], 'sanitize_title_nonce')) {
|
||||||
|
wp_die('Erreur de sécurité');
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = sanitize_text_field($_POST['title']);
|
||||||
|
$sanitized_title = sanitize_title($title);
|
||||||
|
|
||||||
|
wp_send_json_success(array('sanitized_title' => $sanitized_title));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ajouter le script et les variables localisées
|
||||||
|
add_action('wp_enqueue_scripts', 'add_sanitize_title_script');
|
||||||
|
|
||||||
|
function add_sanitize_title_script()
|
||||||
|
{
|
||||||
|
wp_localize_script('jquery', 'sanitize_title_ajax', array(
|
||||||
|
'ajax_url' => admin_url('admin-ajax.php'),
|
||||||
|
'nonce' => wp_create_nonce('sanitize_title_nonce')
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
.wp-block-pullquote {
|
.wp-block-pullquote {
|
||||||
@apply text-carhop-green-700 py-6 fjalla font-bold text-2xl 2xl:text-4xl my-6 border-primary pl-4 border-t border-b;
|
@apply text-carhop-purple-500 py-6 fjalla font-bold text-2xl 2xl:text-4xl my-6 border-primary pl-4 border-t border-b;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ module.exports = {
|
||||||
950: '#062d2a',
|
950: '#062d2a',
|
||||||
},
|
},
|
||||||
'carhop-orange': {
|
'carhop-orange': {
|
||||||
50: getBaseColor('carhop-orange-light'),
|
50: '#fff8eb',
|
||||||
100: '#ffebc6',
|
100: '#ffebc6',
|
||||||
200: '#ffd588',
|
200: '#ffd588',
|
||||||
300: '#ffba4a',
|
300: '#ffba4a',
|
||||||
|
|
@ -66,7 +66,7 @@ module.exports = {
|
||||||
950: '#033249',
|
950: '#033249',
|
||||||
},
|
},
|
||||||
'carhop-red': {
|
'carhop-red': {
|
||||||
50: getBaseColor('carhop-red-light'),
|
50: '#fcf3f8',
|
||||||
100: '#fbe8f2',
|
100: '#fbe8f2',
|
||||||
200: '#f8d2e6',
|
200: '#f8d2e6',
|
||||||
300: '#f4add0',
|
300: '#f4add0',
|
||||||
|
|
@ -79,7 +79,7 @@ module.exports = {
|
||||||
950: '#4c0b21',
|
950: '#4c0b21',
|
||||||
},
|
},
|
||||||
'carhop-purple': {
|
'carhop-purple': {
|
||||||
50: getBaseColor('carhop-purple-light'),
|
50: '#f8f5ff',
|
||||||
100: '#efe8ff',
|
100: '#efe8ff',
|
||||||
200: '#e2d4ff',
|
200: '#e2d4ff',
|
||||||
300: getBaseColor('carhop-purple'), // Base Color
|
300: getBaseColor('carhop-purple'), // Base Color
|
||||||
|
|
|
||||||
15
theme.json
15
theme.json
|
|
@ -39,31 +39,16 @@
|
||||||
"slug": "carhop-orange",
|
"slug": "carhop-orange",
|
||||||
"color": "#ffa630"
|
"color": "#ffa630"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Carhop Orange Light",
|
|
||||||
"slug": "carhop-orange-light",
|
|
||||||
"color": "#fff8eb"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Carhop Red",
|
"name": "Carhop Red",
|
||||||
"slug": "carhop-red",
|
"slug": "carhop-red",
|
||||||
"color": "#ae2154"
|
"color": "#ae2154"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Carhop Red Light",
|
|
||||||
"slug": "carhop-red-light",
|
|
||||||
"color": "#fcf3f8"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Carhop Purple",
|
"name": "Carhop Purple",
|
||||||
"slug": "carhop-purple",
|
"slug": "carhop-purple",
|
||||||
"color": "#d6c3ff"
|
"color": "#d6c3ff"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Carhop Purple Light",
|
|
||||||
"slug": "carhop-purple-light",
|
|
||||||
"color": "#f8f5ff"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Carhop Gray",
|
"name": "Carhop Gray",
|
||||||
"slug": "carhop-gray",
|
"slug": "carhop-gray",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user