diff --git a/acf-json/group_60978d51e5bff.json b/acf-json/group_60978d51e5bff.json index a674820b..e244753f 100644 --- a/acf-json/group_60978d51e5bff.json +++ b/acf-json/group_60978d51e5bff.json @@ -28,15 +28,48 @@ "ajax": 0, "placeholder": "" }, + { + "key": "field_65b6292d3f5f5", + "label": "Select Testimonials", + "name": "select_testimonials", + "aria-label": "", + "type": "post_object", + "instructions": "", + "required": 0, + "conditional_logic": 0, + "wrapper": { + "width": "", + "class": "", + "id": "" + }, + "post_type": [ + "testimonial" + ], + "post_status": "", + "taxonomy": "", + "return_format": "object", + "multiple": 1, + "allow_null": 0, + "bidirectional": 0, + "ui": 1, + "bidirectional_target": [] + }, { "key": "field_60978d67b0fad", "label": "Testimonials", "name": "testimonials", "aria-label": "", "type": "repeater", - "instructions": "", + "instructions": "Enter testimonials manually.", "required": 0, - "conditional_logic": 0, + "conditional_logic": [ + [ + { + "field": "field_65b6292d3f5f5", + "operator": "==empty" + } + ] + ], "wrapper": { "width": "", "class": "", @@ -182,5 +215,5 @@ "active": true, "description": "", "show_in_rest": 0, - "modified": 1703691375 -} + "modified": 1706438164 +} diff --git a/acf-json/post_type_6582a58f15348.json b/acf-json/post_type_6582a58f15348.json index 196bcf7a..cac8cefb 100644 --- a/acf-json/post_type_6582a58f15348.json +++ b/acf-json/post_type_6582a58f15348.json @@ -16,7 +16,7 @@ "view_item": "View Work", "view_items": "View Works", "add_new_item": "Add New Work", - "add_new": "", + "add_new": "Add New Work", "new_item": "New Work", "parent_item_colon": "Parent Work:", "search_items": "Search Works", @@ -84,4 +84,4 @@ "delete_with_user": false, "register_meta_box_cb": "", "modified": 1703061615 -} +} diff --git a/acf-json/post_type_6582a8cf72f35.json b/acf-json/post_type_6582a8cf72f35.json index 8ae5ba57..4adfdcdc 100644 --- a/acf-json/post_type_6582a8cf72f35.json +++ b/acf-json/post_type_6582a8cf72f35.json @@ -16,7 +16,7 @@ "view_item": "View Testimonial", "view_items": "View Testimonial", "add_new_item": "Add New Testimonial", - "add_new": "", + "add_new": "Add New Testimonial", "new_item": "New Testimonial", "parent_item_colon": "Parent Testimonial:", "search_items": "Search Testimonial", @@ -24,10 +24,10 @@ "not_found_in_trash": "No testimonial found in Trash", "archives": "Testimonial Archives", "attributes": "Testimonial Attributes", - "featured_image": "Avatar", - "set_featured_image": "Set avatar", - "remove_featured_image": "Remove avatar", - "use_featured_image": "Use avatar", + "featured_image": "Testimonial image", + "set_featured_image": "Set testimonial image", + "remove_featured_image": "Remove testimonial image", + "use_featured_image": "Use testimonial image", "insert_into_item": "Insert into testimonial", "uploaded_to_this_item": "Uploaded to this testimonial", "filter_items_list": "Filter testimonial list", @@ -80,5 +80,6 @@ "can_export": true, "delete_with_user": false, "register_meta_box_cb": "", - "modified": 1703062019 -} + "enter_title_here": "First and last name", + "modified": 1706433207 +} diff --git a/acf-json/taxonomy_65833605916a9.json b/acf-json/taxonomy_65833605916a9.json index 39b0de23..1a76f452 100644 --- a/acf-json/taxonomy_65833605916a9.json +++ b/acf-json/taxonomy_65833605916a9.json @@ -50,7 +50,7 @@ "publicly_queryable": 1, "hierarchical": 1, "show_ui": 1, - "show_in_menu": 1, + "show_in_menu": 0, "show_in_nav_menus": 1, "show_in_rest": 1, "rest_base": "", @@ -73,5 +73,5 @@ "meta_box": "default", "meta_box_cb": "", "meta_box_sanitize_cb": "", - "modified": 1703240275 -} + "modified": 1706442054 +} diff --git a/assets/images/database.png b/assets/images/database.png new file mode 100644 index 00000000..012653a6 Binary files /dev/null and b/assets/images/database.png differ diff --git a/assets/images/robot.png b/assets/images/robot.png new file mode 100644 index 00000000..69f15476 Binary files /dev/null and b/assets/images/robot.png differ diff --git a/assets/images/website.png b/assets/images/website.png new file mode 100644 index 00000000..d9439b56 Binary files /dev/null and b/assets/images/website.png differ diff --git a/blocks/testimonial/testimonial.php b/blocks/testimonial/testimonial.php index 50797480..bbd969c0 100644 --- a/blocks/testimonial/testimonial.php +++ b/blocks/testimonial/testimonial.php @@ -14,9 +14,22 @@ $wds_classes[] = 'align' . $block['align']; } -$wd_s_testimonials = get_field( 'testimonials' ); -$wd_s_block_style = get_field( 'style' ) ? get_field( 'style' ) : 'simple'; -$wd_s_block_id = 'tslider' . wp_rand( 1, 100 ); +$wd_s_select_testimonials = get_field( 'select_testimonials' ); + +if ( $wd_s_select_testimonials ) { + foreach ( $wd_s_select_testimonials as $wd_s_key => $wd_s_select_testimonial ) { + $wd_s_testimonials[ $wd_s_key ]['author'] = $wd_s_select_testimonial->post_title; + $wd_s_testimonials[ $wd_s_key ]['content'] = $wd_s_select_testimonial->post_content; + $wd_s_testimonials[ $wd_s_key ]['avatar'] = get_the_post_thumbnail_url( $wd_s_select_testimonial->ID ); + $wd_s_testimonials[ $wd_s_key ]['rating'] = get_field( 'rating', $wd_s_select_testimonial->ID ) ? get_field( 'rating', $wd_s_select_testimonial->ID ) : 0; + $wd_s_testimonials[ $wd_s_key ]['job_title'] = get_field( 'position', $wd_s_select_testimonial->ID ) ? get_field( 'position', $wd_s_select_testimonial->ID ) : ''; + } +} else { + $wd_s_testimonials = get_field( 'testimonials' ); +} + +$wd_s_block_style = get_field( 'style' ) ? get_field( 'style' ) : 'simple'; +$wd_s_block_id = 'tslider' . wp_rand( 1, 100 ); if ( get_query_var( 'testimonials' ) ) { $wd_s_testimonials = get_query_var( 'testimonials' ); @@ -61,7 +74,7 @@ echo ''; } ?> -

+

diff --git a/inc/hooks/disable-gutenberg-cpts.php b/inc/hooks/disable-gutenberg-cpts.php new file mode 100644 index 00000000..7e4fd273 --- /dev/null +++ b/inc/hooks/disable-gutenberg-cpts.php @@ -0,0 +1,23 @@ +taxonomy ) { + $parent_file = 'edit-tags.php?taxonomy=service'; + } + + return $parent_file; +} +add_action( 'parent_file', __NAMESPACE__ . '\highlight_taxonomy_parent_menu' );