'canvas/absolute-reviews', 'title' => esc_html__( 'Reviews', 'absolute-reviews' ), 'description' => esc_html__( 'The block allows you to display images from your review account.', 'absolute-reviews' ), 'category' => 'canvas', 'keywords' => array(), 'icon' => '', 'supports' => array( 'className' => true, 'anchor' => true, 'html' => false, 'canvasSpacings' => true, ), 'styles' => array(), 'location' => array(), 'sections' => array( 'general' => array( 'title' => esc_html__( 'Block Settings', 'absolute-reviews' ), 'priority' => 5, 'open' => true, ), 'schema_attrs' => array( 'title' => esc_html__( 'Schema Attributes', 'absolute-reviews' ), 'priority' => 10, ), 'typography' => array( 'title' => esc_html__( 'Typography Settings', 'absolute-reviews' ), 'priority' => 10, ), ), 'layouts' => array( 'percentage' => array( 'name' => esc_html__( 'Percentage (1-100%)', 'absolute-reviews' ), 'icon' => '', 'location' => array(), 'template' => dirname( __FILE__ ) . '/block/render.php', 'sections' => array(), 'fields' => array( array( 'key' => 'total_score_percentage', 'label' => esc_html__( 'Total Score', 'absolute-reviews' ), 'section' => 'general', 'type' => 'number', 'step' => 1, 'min' => 1, 'max' => 100, 'default' => 50, ), ), ), 'point-5' => array( 'name' => esc_html__( 'Points (1-5)', 'absolute-reviews' ), 'icon' => '', 'location' => array(), 'template' => dirname( __FILE__ ) . '/block/render.php', 'sections' => array(), 'fields' => array( array( 'key' => 'total_score_point_5', 'label' => esc_html__( 'Total Score', 'absolute-reviews' ), 'section' => 'general', 'type' => 'number', 'step' => 1, 'min' => 1, 'max' => 5, 'default' => 1, ), ), ), 'point-10' => array( 'name' => esc_html__( 'Points (1-10)', 'absolute-reviews' ), 'icon' => '', 'location' => array(), 'template' => dirname( __FILE__ ) . '/block/render.php', 'sections' => array(), 'fields' => array( array( 'key' => 'total_score_point_10', 'label' => esc_html__( 'Total Score', 'absolute-reviews' ), 'section' => 'general', 'type' => 'number', 'step' => 1, 'min' => 1, 'max' => 10, 'default' => 1, ), ), ), 'star' => array( 'name' => esc_html__( 'Stars (1-5)', 'absolute-reviews' ), 'icon' => '', 'location' => array(), 'template' => dirname( __FILE__ ) . '/block/render.php', 'sections' => array(), 'fields' => array( array( 'key' => 'total_score_star', 'label' => esc_html__( 'Total Score', 'absolute-reviews' ), 'section' => 'general', 'type' => 'number', 'step' => 1, 'min' => 1, 'max' => 5, 'default' => 1, ), ), ), ), 'fields' => array( array( 'key' => 'heading', 'label' => esc_html__( 'Heading', 'absolute-reviews' ), 'section' => 'general', 'type' => 'text', 'default' => '', ), array( 'key' => 'desc', 'label' => esc_html__( 'Description', 'absolute-reviews' ), 'section' => 'general', 'type' => 'textarea', 'default' => '', ), array( 'key' => 'legend', 'label' => esc_html__( 'Legend', 'absolute-reviews' ), 'section' => 'general', 'type' => 'textarea', 'default' => '', ), array( 'key' => 'total_score_label', 'label' => esc_html__( 'Total Score Label', 'absolute-reviews' ), 'section' => 'general', 'type' => 'text', 'default' => esc_html__( 'Total Score', 'absolute-reviews' ), ), array( 'key' => 'schema_author_custom', 'label' => esc_html__( 'Custom Author', 'absolute-reviews' ), 'section' => 'schema_attrs', 'type' => 'text', 'default' => '', ), // Typography. array( 'key' => 'typographyDescription', 'label' => esc_html__( 'Description Font Size', 'authentic' ), 'section' => 'typography', 'type' => 'dimension', 'default' => '0.875rem', 'output' => array( array( 'element' => '$ .abr-review-info .abr-review-description', 'property' => 'font-size', 'suffix' => '!important', ), ), 'active_callback' => array( array( 'field' => 'desc', 'operator' => '!=', 'value' => '', ), ), ), array( 'key' => 'typographyLegend', 'label' => esc_html__( 'Legend Font Size', 'authentic' ), 'section' => 'typography', 'type' => 'dimension', 'default' => '0.875rem', 'output' => array( array( 'element' => '$ .abr-review-total .abr-review-subtext .abr-data-info > span', 'property' => 'font-size', 'suffix' => '!important', ), ), 'active_callback' => array( array( 'field' => 'legend', 'operator' => '!=', 'value' => '', ), ), ), array( 'key' => 'typographyTotal', 'label' => esc_html__( 'Total Font Size', 'authentic' ), 'section' => 'typography', 'type' => 'dimension', 'default' => '3rem', 'output' => array( array( 'element' => '$ .abr-review-total .abr-review-score .abr-review-text', 'property' => 'font-size', 'suffix' => '!important', ), ), ), ), 'template' => dirname( __FILE__ ) . '/block/render.php', 'editor_style' => 'absolute-reviews-block-editor-style', ); return $blocks; } } new ABR_Review_Block();