Compare commits
9 Commits
5106c63358
...
fa7ed5355d
| Author | SHA1 | Date | |
|---|---|---|---|
| fa7ed5355d | |||
| 3553e7add4 | |||
| 943c345375 | |||
| 3ad7f51b2e | |||
| fd94a1e3a4 | |||
| 0117693fcc | |||
| 3837ee8f18 | |||
| 67cc7b3696 | |||
| 59ce40b458 |
|
|
@ -11,3 +11,4 @@ require_once(__DIR__ . '/includes/taxonomy.php');
|
||||||
require_once(__DIR__ . '/includes/api.php');
|
require_once(__DIR__ . '/includes/api.php');
|
||||||
require_once(__DIR__ . '/includes/blocks.php');
|
require_once(__DIR__ . '/includes/blocks.php');
|
||||||
require_once(__DIR__ . '/includes/utilities.php');
|
require_once(__DIR__ . '/includes/utilities.php');
|
||||||
|
require_once(__DIR__ . '/includes/acf-fields.php');
|
||||||
|
|
|
||||||
17
includes/acf-fields.php
Normal file
17
includes/acf-fields.php
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
function acf_read_only_fields_in_group($field)
|
||||||
|
{
|
||||||
|
// READ ONLY FOR OLD WEBSITES DATA IN ARTISANS & CHANTIERS
|
||||||
|
$target_groups = ['group_672358433051b', 'group_673610d8e548a'];
|
||||||
|
$parent_id = $field['parent']; // ID du groupe parent
|
||||||
|
$parent_group = get_post($parent_id);
|
||||||
|
|
||||||
|
if (in_array($parent_group->post_name, $target_groups)) {
|
||||||
|
$field['readonly'] = 1;
|
||||||
|
$field['disabled'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $field;
|
||||||
|
}
|
||||||
|
add_filter('acf/load_field', 'acf_read_only_fields_in_group');
|
||||||
|
|
@ -10,3 +10,20 @@ function metiers_du_patrimoine_custom_admin_stylesheet()
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action('admin_head', 'metiers_du_patrimoine_custom_admin_stylesheet');
|
add_action('admin_head', 'metiers_du_patrimoine_custom_admin_stylesheet');
|
||||||
|
|
||||||
|
/* ---------------------------
|
||||||
|
COMMENTS REMOVAL
|
||||||
|
---------------------------*/
|
||||||
|
|
||||||
|
function metiers_remove_meta_boxes()
|
||||||
|
{
|
||||||
|
# Removes meta from Posts #
|
||||||
|
// remove_meta_box('postexcerpt', 'post', 'normal');
|
||||||
|
// remove_meta_box('postcustom', 'post', 'normal');
|
||||||
|
// remove_meta_box('trackbacksdiv', 'post', 'normal');
|
||||||
|
remove_meta_box('commentstatusdiv', 'page', 'normal');
|
||||||
|
remove_meta_box('commentsdiv', 'page', 'normal');
|
||||||
|
remove_post_type_support('artisans', 'comments');
|
||||||
|
remove_post_type_support('chantiers', 'comments');
|
||||||
|
}
|
||||||
|
add_action('admin_init', 'metiers_remove_meta_boxes');
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,6 @@ function debugQueryTest()
|
||||||
'field' => 'term_id'
|
'field' => 'term_id'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$metaQuery = array(
|
$metaQuery = array(
|
||||||
array(
|
array(
|
||||||
'key' => 'state',
|
'key' => 'state',
|
||||||
|
|
@ -127,7 +126,6 @@ function debugQueryTest()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
"status" => "publish",
|
"status" => "publish",
|
||||||
"post_type" => "artisans",
|
"post_type" => "artisans",
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ function metiers_patrimoine_create_posttype()
|
||||||
|
|
||||||
'menu_position' => 5.1,
|
'menu_position' => 5.1,
|
||||||
'supports' => array('title', 'custom-fields', 'thumbnail', 'author', 'revisions'),
|
'supports' => array('title', 'custom-fields', 'thumbnail', 'author', 'revisions'),
|
||||||
|
'comment_status' => 'closed',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,43 @@ body.post-type-artisans {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.iedit.type-artisans.status-pending.hentry {
|
||||||
|
/* @apply bg-rose-50; */
|
||||||
|
|
||||||
|
.column-title {
|
||||||
|
color: transparent;
|
||||||
|
a {
|
||||||
|
/* @apply text-red-900; */
|
||||||
|
}
|
||||||
|
.post-state {
|
||||||
|
/* @apply text-white bg-rose-700 px-3 py-1 rounded-2xl font-medium text-sm; */
|
||||||
|
@apply text-rose-700 px-3 py-1 rounded-2xl font-medium text-sm border-2 border-rose-700 border-solid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.iedit.type-artisans.status-draft.hentry {
|
||||||
|
/* @apply bg-rose-50; */
|
||||||
|
|
||||||
|
.column-title {
|
||||||
|
color: transparent;
|
||||||
|
a {
|
||||||
|
/* @apply text-red-900; */
|
||||||
|
}
|
||||||
|
.post-state {
|
||||||
|
/* @apply text-white bg-rose-700 px-3 py-1 rounded-2xl font-medium text-sm; */
|
||||||
|
@apply text-sky-700 px-3 py-1 rounded-2xl font-medium text-sm border-2 border-sky-700 border-solid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#acf-group_672358433051b,
|
||||||
|
#acf-group_673610d8e548a {
|
||||||
|
@apply opacity-60;
|
||||||
|
* {
|
||||||
|
cursor: not-allowed;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.edit-post-visual-editor__post-title-wrapper {
|
.edit-post-visual-editor__post-title-wrapper {
|
||||||
h1 {
|
h1 {
|
||||||
font-weight: revert;
|
font-weight: revert;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
:root {
|
||||||
|
--purple: #8b2ff7;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
#loginform {
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
#login h1 a,
|
||||||
|
.login h1 a {
|
||||||
|
background-image: url('./resources/img/logos/metiers_logo_purple.svg');
|
||||||
|
height: 100px;
|
||||||
|
width: 300px;
|
||||||
|
background-size: 300px 100px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
#wp-submit {
|
||||||
|
background-color: var(--purple) !important;
|
||||||
|
border-color: var(--purple) !important;
|
||||||
|
}
|
||||||
|
#nav a,
|
||||||
|
#backtoblog a {
|
||||||
|
/* color: var(--purple) !important; */
|
||||||
|
/* color: white !important; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#loginform {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-pwd span {
|
||||||
|
color: var(--purple) !important;
|
||||||
|
}
|
||||||
BIN
resources/img/logos/metiers_logo_purple.png
Normal file
BIN
resources/img/logos/metiers_logo_purple.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
10
resources/img/logos/metiers_logo_purple.svg
Normal file
10
resources/img/logos/metiers_logo_purple.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 14 KiB |
38
style-login.css
Normal file
38
style-login.css
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
:root {
|
||||||
|
--purple: #8b2ff7;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
#loginform {
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
#login h1 a,
|
||||||
|
.login h1 a {
|
||||||
|
background-image: url('./resources/img/logos/metiers_logo_purple.png');
|
||||||
|
height: 100px;
|
||||||
|
width: 300px;
|
||||||
|
/* background-size: 300px 100px; */
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
#wp-submit {
|
||||||
|
background-color: var(--purple) !important;
|
||||||
|
border-color: var(--purple) !important;
|
||||||
|
}
|
||||||
|
#nav a,
|
||||||
|
#backtoblog a {
|
||||||
|
/* color: var(--purple) !important; */
|
||||||
|
/* color: white !important; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#loginform {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wp-pwd span {
|
||||||
|
color: var(--purple) !important;
|
||||||
|
}
|
||||||
|
|
@ -50,8 +50,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
||||||
<p class="metier-patrimoine-searchbar__posts-results-amount" role="status" aria-live="polite">
|
<p class="metier-patrimoine-searchbar__posts-results-amount" role="status" aria-live="polite">
|
||||||
<span class="results-amount">
|
<span class="results-amount">
|
||||||
4 </span>
|
4 </span>
|
||||||
<span class="results-text">
|
<span class="results-text">résultat(s) </span>
|
||||||
résultat(s) </span>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -198,7 +197,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
|
||||||
"post_type" => "artisans",
|
"post_type" => "artisans",
|
||||||
"posts_per_page" => -1,
|
"posts_per_page" => -1,
|
||||||
"paged" => 1,
|
"paged" => 1,
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user