$id, 'label' => $label, 'control' => $control );
if ( '' !== $help ) {
$row['help'] = $help;
}
return \Rooster\Admin\Ui::field_row( $row );
};
$aieo_pr_switch = static function ( $key, $label, $hidden_label = false ) use ( $settings ) {
return ' '
. \Rooster\Admin\Ui::toggle( $key, 'yes' === (string) $settings[ $key ], array( 'id' => 'aieo-pr-' . $key, 'hidden' => false, 'label' => $label, 'label_hidden' => $hidden_label ) );
};
$aieo_pr_number = static function ( $key, $min, $max, $unit = '', $extra = array() ) use ( $settings ) {
return \Rooster\Admin\Ui::input( $key, (string) $settings[ $key ], array( 'id' => 'aieo-pr-' . $key, 'type' => 'number', 'xs' => true, 'min' => $min, 'max' => $max, 'unit' => $unit ) + $extra );
};
$aieo_pr_colour = static function ( $key, $placeholder = '' ) use ( $settings ) {
return \Rooster\Admin\Fields::color( $key, (string) $settings[ $key ], array( 'id' => 'aieo-pr-' . $key, 'placeholder' => $placeholder ) );
};
$aieo_pr_copy = static function ( $key, $label, $width = 'medium' ) use ( $settings, $aieo_pr_i18n, $aieo_pr_row ) {
$opts = array( 'id' => 'aieo-pr-' . $key, 'placeholder' => (string) $aieo_pr_i18n[ $key ] );
if ( '' !== $width ) {
$opts[ $width ] = true;
}
return $aieo_pr_row( 'aieo-pr-' . $key, $label, \Rooster\Admin\Ui::input( $key, (string) $settings[ $key ], $opts ) );
};
$aieo_pr_text = static function ( $key, $label ) use ( $settings, $aieo_pr_i18n, $aieo_pr_row ) {
return $aieo_pr_row( 'aieo-pr-' . $key, $label, \Rooster\Admin\Ui::textarea( $key, (string) $settings[ $key ], array( 'id' => 'aieo-pr-' . $key, 'rows' => 2, 'placeholder' => (string) $aieo_pr_i18n[ $key ] ) ) );
};
$aieo_pr_fold = static function ( $summary, $rows ) {
return \Rooster\Admin\Ui::fold( $summary, '
' . $rows . '
' );
};
$aieo_pr_card = static function ( $card, $before, $rows, $after = '' ) {
$form_id = 'aieo-card-' . $card['anchor'] . '-form';
list( $open, $close ) = AIEO_DMM_UI::card( $card + array( 'footer' => \Rooster\Admin\States::save_button( $form_id ) ) );
echo $open;
echo AIEO_DMM_UI::card_form( 'aieo_dmm_product_requests_save', 'product_requests_display', $form_id, $before . '' . $rows . '
' . $after );
echo $close;
};
require_once AIEO_DIR . 'includes/dmm/product-requests/class-aieo-product-request-overview.php';
if ( function_exists( 'rooster_admin_band_open' ) ) {
rooster_admin_band_open( array( 'cols' => 1 ) );
}
AIEO_Product_Request_Overview::render( 'product-requests-display-overview' );
if ( function_exists( 'rooster_admin_band_close' ) ) {
rooster_admin_band_close();
}
if ( function_exists( 'rooster_admin_band_open' ) ) {
rooster_admin_band_open( array( 'cols' => 2 ) );
}
list( $aieo_pr_open, $aieo_pr_close ) = AIEO_DMM_UI::card(
array(
'anchor' => 'product-requests-display-shortcodes',
'icon' => 'braces',
'title' => __( 'Shortcodes', 'ai-eshop-optimizer' ),
'description' => __('The shortcodes that place the quote request form on any page of your site.', 'ai-eshop-optimizer'),
'col' => 1,
)
);
echo $aieo_pr_open;
echo \Rooster\Admin\Ui::facts(
array(
array(
'label' => __( 'Request form', 'ai-eshop-optimizer' ),
'code' => '[aieo_product_request]',
'tip' => __( 'The classic-theme shortcode. Add product_id="123" to place it off a product page.', 'ai-eshop-optimizer' ),
),
array(
'label' => __( 'Quote basket', 'ai-eshop-optimizer' ),
'code' => '[aieo_quote_basket]',
'tip' => __( 'The review panel, for a header, a sidebar or a “My quote” page.', 'ai-eshop-optimizer' ),
),
)
);
echo $aieo_pr_close;
$aieo_pr_terms_html = '';
foreach ( array( 'product_cat', 'product_brand' ) as $aieo_pr_tax ) {
if ( ! taxonomy_exists( $aieo_pr_tax ) ) { continue; }
$aieo_pr_terms = get_terms( array( 'taxonomy' => $aieo_pr_tax, 'hide_empty' => false, 'number' => 300 ) );
if ( is_wp_error( $aieo_pr_terms ) || ! $aieo_pr_terms ) { continue; }
$aieo_pr_tax_obj = get_taxonomy( $aieo_pr_tax );
$aieo_pr_terms_html .= '';
foreach ( $aieo_pr_terms as $aieo_pr_term ) {
$aieo_pr_terms_html .= sprintf(
'%3$s ',
(int) $aieo_pr_term->term_id,
selected( in_array( (int) $aieo_pr_term->term_id, (array) $settings['rule_terms'], true ), true, false ),
esc_html( $aieo_pr_term->name )
);
}
$aieo_pr_terms_html .= ' ';
}
$aieo_pr_terms_html .= ' ';
$aieo_pr_rows = $aieo_pr_row( 'aieo-pr-enabled', __( 'Enable', 'ai-eshop-optimizer' ), $aieo_pr_switch( 'enabled', __( 'Turn the Product Requests feature on', 'ai-eshop-optimizer' ) ) );
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-frontend_enabled',
__( 'Render front-end list', 'ai-eshop-optimizer' ),
$aieo_pr_switch( 'frontend_enabled', __( 'Render the card on the storefront', 'ai-eshop-optimizer' ) ),
__( 'Both must be ticked before anything shows. The second one lets you keep the admin screens and the stored requests while taking the card off the shop.', 'ai-eshop-optimizer' )
);
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-placement',
__( 'Where it appears', 'ai-eshop-optimizer' ),
\Rooster\Admin\Ui::select(
'placement',
array(
'automatic' => __( 'Add it to the product page for me', 'ai-eshop-optimizer' ),
'manual' => __( 'Only where I put a block or a shortcode', 'ai-eshop-optimizer' ),
),
(string) $settings['placement'],
array( 'id' => 'aieo-pr-placement' )
),
__( 'Choose the second one if you have placed the card yourself. With a page builder or a shortcode in the product template, leaving this on automatic puts a SECOND card on every product page, and only the first of the two works.', 'ai-eshop-optimizer' )
);
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-display-rule',
__( 'Show it when', 'ai-eshop-optimizer' ),
\Rooster\Admin\Ui::select(
'display_rule',
array(
'not_purchasable' => __( 'The product cannot be bought (no price, or not purchasable)', 'ai-eshop-optimizer' ),
'out_of_stock' => __( 'The product is out of stock', 'ai-eshop-optimizer' ),
'taxonomy' => __( 'The product is in one of the categories or brands below', 'ai-eshop-optimizer' ),
'always' => __( 'Always, on every product', 'ai-eshop-optimizer' ),
),
(string) $settings['display_rule'],
array( 'id' => 'aieo-pr-display-rule' )
),
__( 'Any single product can override this on its own Advanced tab, in both directions.', 'ai-eshop-optimizer' )
);
$aieo_pr_rows .= $aieo_pr_row( 'aieo-pr-rule-terms', __( 'Categories / brands', 'ai-eshop-optimizer' ), $aieo_pr_terms_html, __( 'Only read when the rule above is set to categories or brands.', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-request-types',
__( 'Request types offered', 'ai-eshop-optimizer' ),
\Rooster\Admin\Ui::checks( 'request_types', $aieo_pr_types, array_map( 'strval', (array) $settings['request_types'] ), array( 'inline' => true ) ),
'',
array(
'group' => true,
'help_html' => esc_html__( 'The first ticked type is what the card offers by default. A block or shortcode can name a different one.', 'ai-eshop-optimizer' )
. ' ' . esc_html__( 'The type decides what the card asks for. A quote asks for an email address and a quantity; a contact request asks for an email address and a message; a call-back asks for a PHONE NUMBER, and its email box becomes optional. Each has its own title and button below.', 'ai-eshop-optimizer' ),
)
);
$aieo_pr_card(
array(
'anchor' => 'product-requests-display-front-end-gate',
'icon' => 'door-open',
'title' => __( 'Enable the request card', 'ai-eshop-optimizer' ),
'description' => __( 'Turn on the “ask us about this product” card, choose where it appears, and write what it says. Built for catalogue sites: when nothing is purchasable, this is the conversion.', 'ai-eshop-optimizer' ),
'col' => 1,
),
'',
$aieo_pr_rows
);
$aieo_pr_rows = $aieo_pr_copy( 'form_title', __( 'Card title (quote)', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_copy( 'form_intro', __( 'Intro line (quote)', 'ai-eshop-optimizer' ), '' );
$aieo_pr_rows .= $aieo_pr_copy( 'form_button_text', __( 'Button (quote)', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_copy( 'title_contact', __( 'Card title (contact request)', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_copy( 'intro_contact', __( 'Intro line (contact request)', 'ai-eshop-optimizer' ), '' );
$aieo_pr_rows .= $aieo_pr_copy( 'button_contact', __( 'Button (contact request)', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_copy( 'title_callback', __( 'Card title (call-back)', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_copy( 'intro_callback', __( 'Intro line (call-back)', 'ai-eshop-optimizer' ), '' );
$aieo_pr_rows .= $aieo_pr_copy( 'button_callback', __( 'Button (call-back)', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_text( 'form_success_message', __( 'Success message', 'ai-eshop-optimizer' ) );
$aieo_pr_labels = $aieo_pr_copy( 'field_email_label', __( 'Email label', 'ai-eshop-optimizer' ) );
$aieo_pr_labels .= $aieo_pr_copy( 'field_name_label', __( 'Name label', 'ai-eshop-optimizer' ) );
$aieo_pr_labels .= $aieo_pr_copy( 'field_phone_label', __( 'Phone label', 'ai-eshop-optimizer' ) );
$aieo_pr_labels .= $aieo_pr_copy( 'field_qty_label', __( 'Quantity label', 'ai-eshop-optimizer' ) );
$aieo_pr_labels .= $aieo_pr_copy( 'field_message_label', __( 'Message label', 'ai-eshop-optimizer' ) );
$aieo_pr_basket = $aieo_pr_copy( 'add_button_text', __( 'Add-to-quote button', 'ai-eshop-optimizer' ) );
$aieo_pr_basket .= $aieo_pr_copy( 'added_text', __( 'Already-in-quote text', 'ai-eshop-optimizer' ) );
$aieo_pr_basket .= $aieo_pr_copy( 'review_text', __( 'Review-quote link', 'ai-eshop-optimizer' ) );
$aieo_pr_basket .= $aieo_pr_copy( 'basket_title', __( 'Review panel title', 'ai-eshop-optimizer' ) );
$aieo_pr_basket .= $aieo_pr_copy( 'remove_text', __( 'Remove link', 'ai-eshop-optimizer' ) );
$aieo_pr_basket .= $aieo_pr_copy( 'finish_button_text', __( 'Send-my-list button', 'ai-eshop-optimizer' ) );
$aieo_pr_basket .= $aieo_pr_text( 'basket_empty_text', __( 'Empty-quote message', 'ai-eshop-optimizer' ) );
$aieo_pr_card(
array(
'anchor' => 'product-requests-display-form-text',
'icon' => 'pencil-line',
'title' => __( 'Form text', 'ai-eshop-optimizer' ),
'description' => __( 'Leave a field blank to use the translated wording for each visitor’s language. Typing here fixes that text in one language for everybody.', 'ai-eshop-optimizer' ),
'col' => 2,
),
'',
$aieo_pr_rows,
$aieo_pr_fold( __( 'Field labels', 'ai-eshop-optimizer' ), $aieo_pr_labels ) . $aieo_pr_fold( __( 'Quote basket', 'ai-eshop-optimizer' ), $aieo_pr_basket )
);
$aieo_pr_collect = '';
foreach ( array(
'field_name' => __( 'Name', 'ai-eshop-optimizer' ),
'field_phone' => __( 'Phone', 'ai-eshop-optimizer' ),
'field_qty' => __( 'Quantity', 'ai-eshop-optimizer' ),
'field_message' => __( 'Message', 'ai-eshop-optimizer' ),
'field_consent' => __( 'Privacy consent', 'ai-eshop-optimizer' ),
) as $aieo_pr_k => $aieo_pr_label ) {
$aieo_pr_collect .= $aieo_pr_switch( $aieo_pr_k, $aieo_pr_label );
}
$aieo_pr_rows = $aieo_pr_row( 'aieo-pr-collect', __( 'Collect', 'ai-eshop-optimizer' ), '' . $aieo_pr_collect . '
', '', array( 'group' => true ) );
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-consent',
__( 'Consent wording', 'ai-eshop-optimizer' ),
'' . \Rooster\Admin\Ui::input( 'consent_text', (string) $settings['consent_text'], array( 'id' => 'aieo-pr-consent_text', 'placeholder' => (string) $aieo_pr_i18n['consent_text'], 'aria-label' => __( 'Consent wording', 'ai-eshop-optimizer' ) ) ) . '
'
. '' . \Rooster\Admin\Ui::input( 'consent_link_text', (string) $settings['consent_link_text'], array( 'id' => 'aieo-pr-consent_link_text', 'placeholder' => __( 'Linked words only, and they must appear in the label above', 'ai-eshop-optimizer' ), 'aria-label' => __( 'Linked words only, and they must appear in the label above', 'ai-eshop-optimizer' ) ) ) . '
'
. '' . \Rooster\Admin\Ui::input( 'consent_url', (string) $settings['consent_url'], array( 'id' => 'aieo-pr-consent_url', 'type' => 'url', 'placeholder' => __( 'Privacy-policy URL (blank → the WordPress privacy page)', 'ai-eshop-optimizer' ), 'aria-label' => __( 'Privacy-policy URL (blank → the WordPress privacy page)', 'ai-eshop-optimizer' ) ) ) . '
',
__( 'Only the linked words are hyperlinked, so the text beside the checkbox stays plain and a shopper tapping near the box ticks it instead of leaving the page.', 'ai-eshop-optimizer' ),
array( 'group' => true )
);
$aieo_pr_card(
array(
'anchor' => 'product-requests-display-fields',
'icon' => 'text-cursor-input',
'title' => __( 'Optional fields', 'ai-eshop-optimizer' ),
'description' => __( 'The card opens with one box and reveals the rest when the visitor starts typing. One input on screen converts; six do not.', 'ai-eshop-optimizer' ),
'col' => 1,
),
\Rooster\Admin\Guidance::text( __( 'The request type can take a field away but never puts one back: a contact request drops the quantity, and a call-back drops it too and asks for the phone number up front instead. Untick something here and it is gone from every type.', 'ai-eshop-optimizer' ) ),
$aieo_pr_rows
);
$aieo_pr_locations = class_exists( 'AIEO_Location_Contact' ) ? AIEO_Location_Contact::choices() : array();
$aieo_pr_main = class_exists( 'AIEO_Location_Contact' ) ? AIEO_Location_Contact::location( '' ) : null;
$aieo_pr_rows = $aieo_pr_row(
'aieo-pr-contact-channels',
__( 'Under the button', 'ai-eshop-optimizer' ),
' '
. \Rooster\Admin\Ui::checks(
'contact_channels',
array(
'call' => __( 'Call', 'ai-eshop-optimizer' ),
'whatsapp' => 'WhatsApp',
'viber' => 'Viber',
'messenger' => 'Messenger',
),
class_exists( 'AIEO_Location_Contact' ) ? AIEO_Location_Contact::parse( (string) $settings['contact_channels'] ) : array(),
array( 'inline' => true )
),
'',
array(
'group' => true,
'help_html' => esc_html(
$aieo_pr_locations
? __( 'A button for each one the location has: its phone, and the chat channels set under Google Reviews → Locations. None ticked: the card has no such buttons.', 'ai-eshop-optimizer' )
: __( 'The buttons come from a location\'s phone and chat channels: add your locations under Google Reviews → Locations first.', 'ai-eshop-optimizer' )
),
)
);
$aieo_pr_where = array(
'' => $aieo_pr_main ? sprintf( __( 'The main location (%s)', 'ai-eshop-optimizer' ), (string) $aieo_pr_main['label'] ) : __( 'The main location', 'ai-eshop-optimizer' ),
);
foreach ( $aieo_pr_locations as $aieo_pr_slug => $aieo_pr_label ) {
$aieo_pr_where[ $aieo_pr_slug ] = $aieo_pr_label;
}
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-contact_location',
__( 'Location', 'ai-eshop-optimizer' ),
\Rooster\Admin\Ui::select( 'contact_location', $aieo_pr_where, (string) $settings['contact_location'], array( 'id' => 'aieo-pr-contact_location' ) ),
__( 'Whose phone and chat channels the buttons use. The main location is the one marked Headquarters, else the first in the locations\' order.', 'ai-eshop-optimizer' )
);
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-contact_call_hours',
__( 'Opening hours', 'ai-eshop-optimizer' ),
$aieo_pr_switch( 'contact_call_hours', __( 'Offer the call only while the location is open', 'ai-eshop-optimizer' ) ),
__( 'The call button says until when the location is open, and outside its hours when it opens ("We open tomorrow at 9:00") in place of the call; the chat buttons stay. The hours are the location\'s (Google\'s, or those you set on it), in the site\'s time zone. A location without hours keeps its call button at every hour.', 'ai-eshop-optimizer' )
);
$aieo_pr_rows .= $aieo_pr_row(
'aieo-pr-contact_call_hours_display',
__( 'How the hours show', 'ai-eshop-optimizer' ),
\Rooster\Admin\Ui::select(
'contact_call_hours_display',
array(
'inline' => __( 'Beside the number; out of hours the call is off', 'ai-eshop-optimizer' ),
'dialog' => __( 'In a dialog, on a press out of hours', 'ai-eshop-optimizer' ),
),
'dialog' === (string) ( $settings['contact_call_hours_display'] ?? 'inline' ) ? 'dialog' : 'inline',
array( 'id' => 'aieo-pr-contact_call_hours_display' )
),
__( 'In a dialog, the call shows its number alone; out of hours a press opens a window with when the location opens, its week\'s hours and its other ways in, instead of calling.', 'ai-eshop-optimizer' )
);
$aieo_pr_card(
array(
'anchor' => 'product-requests-display-contact',
'icon' => 'messages-square',
'title' => __( 'Call and chat buttons', 'ai-eshop-optimizer' ),
'description' => __( 'Under the card\'s button, a way to ask at once: the location\'s phone, WhatsApp, Viber or Messenger.', 'ai-eshop-optimizer' ),
'col' => 2,
),
'',
$aieo_pr_rows
);
$aieo_pr_rows = \Rooster\Admin\Ui::field_row(
array(
'id' => 'aieo-pr-basket-lifetime',
'label' => __( 'Basket lifetime', 'ai-eshop-optimizer' ),
'parts' => array(
array(
'label' => '',
'control' => \Rooster\Admin\Ui::select(
'basket_storage',
array(
'session' => __( 'Until they close the browser (recommended)', 'ai-eshop-optimizer' ),
'local' => __( 'Keep it for a set number of hours', 'ai-eshop-optimizer' ),
),
(string) $settings['basket_storage'],
array( 'id' => 'aieo-pr-basket_storage', 'aria-label' => __( 'Basket lifetime', 'ai-eshop-optimizer' ) )
),
),
array( 'label' => '', 'control' => $aieo_pr_number( 'basket_local_hours', 1, 720, __( 'hours', 'ai-eshop-optimizer' ), array( 'aria-label' => __( 'Basket lifetime', 'ai-eshop-optimizer' ) . ', ' . __( 'hours', 'ai-eshop-optimizer' ) ) ) ),
),
)
);
$aieo_pr_rows .= $aieo_pr_row( 'aieo-pr-basket_ttl_hours', __( 'Server-side expiry', 'ai-eshop-optimizer' ), $aieo_pr_number( 'basket_ttl_hours', 1, 720, __( 'hours', 'ai-eshop-optimizer' ) ), __( 'A hard bound the browser cannot argue with, so an abandoned quote cannot be added to a week later.', 'ai-eshop-optimizer' ) );
$aieo_pr_rows .= $aieo_pr_row( 'aieo-pr-max_items', __( 'Maximum products per quote', 'ai-eshop-optimizer' ), $aieo_pr_number( 'max_items', 1, (int) AIEO_Product_Request_Settings::MAX_ITEMS_CEILING ) );
$aieo_pr_rows .= $aieo_pr_row( 'aieo-pr-finish_enabled', __( '“Send my list” button', 'ai-eshop-optimizer' ), $aieo_pr_switch( 'finish_enabled', __( 'Let the visitor close their quote and send it', 'ai-eshop-optimizer' ) ), __( 'Off by default. The admin screen is already live, so you see additions as they happen without needing this.', 'ai-eshop-optimizer' ) );
$aieo_pr_card(
array(
'anchor' => 'product-requests-display-quote-basket',
'icon' => 'shopping-cart',
'title' => __( 'Quote basket', 'ai-eshop-optimizer' ),
'description' => __( 'After asking about one product, every later product offers “add this one as well”. The shop visibly follows their intent.', 'ai-eshop-optimizer' ),
'col' => 1,
),
'',
$aieo_pr_rows
);
$aieo_pr_rows = \Rooster\Admin\Ui::field_row(
array(
'id' => 'aieo-pr-card-colours',
'label' => __( 'Card', 'ai-eshop-optimizer' ),
'parts' => array(
array( 'label' => __( 'Background', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'bg_color', __( 'Theme', 'ai-eshop-optimizer' ) ), 'id' => 'aieo-pr-bg_color' ),
array( 'label' => __( 'Border', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'border_color', __( 'Theme', 'ai-eshop-optimizer' ) ), 'id' => 'aieo-pr-border_color' ),
array( 'label' => __( 'Title text', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'title_color', __( 'Theme', 'ai-eshop-optimizer' ) ), 'id' => 'aieo-pr-title_color' ),
array( 'label' => __( 'Body text', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'text_color', __( 'Theme', 'ai-eshop-optimizer' ) ), 'id' => 'aieo-pr-text_color' ),
),
)
);
$aieo_pr_rows .= \Rooster\Admin\Ui::field_row(
array(
'id' => 'aieo-pr-button-colours',
'label' => __( 'Button', 'ai-eshop-optimizer' ),
'parts' => array(
array( 'label' => __( 'Background', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'btn_bg_color' ), 'id' => 'aieo-pr-btn_bg_color' ),
array( 'label' => __( 'Text', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'btn_text_color' ), 'id' => 'aieo-pr-btn_text_color' ),
array( 'label' => __( 'Border', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_colour( 'btn_border_color' ), 'id' => 'aieo-pr-btn_border_color' ),
),
)
);
$aieo_pr_rows .= \Rooster\Admin\Ui::field_row(
array(
'id' => 'aieo-pr-text-sizes',
'label' => __( 'Text sizes', 'ai-eshop-optimizer' ),
'parts' => array(
array( 'label' => __( 'Title', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_number( 'title_size', 8, 48, 'px' ), 'id' => 'aieo-pr-title_size' ),
array( 'label' => __( 'Body', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_number( 'text_size', 8, 32, 'px' ), 'id' => 'aieo-pr-text_size' ),
),
)
);
$aieo_pr_rows .= \Rooster\Admin\Ui::field_row(
array(
'id' => 'aieo-pr-border-widths',
'label' => __( 'Border width', 'ai-eshop-optimizer' ),
'parts' => array(
array( 'label' => __( 'Card', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_number( 'border_width', 0, 10, 'px' ), 'id' => 'aieo-pr-border_width' ),
array( 'label' => __( 'Button', 'ai-eshop-optimizer' ), 'control' => $aieo_pr_number( 'btn_border_width', 0, 10, 'px' ), 'id' => 'aieo-pr-btn_border_width' ),
),
)
);
$aieo_pr_card(
array(
'anchor' => 'product-requests-display-appearance-card-button',
'icon' => 'palette',
'title' => __( 'Appearance: card and button', 'ai-eshop-optimizer' ),
'description' => __( 'Leave the BUTTON colours blank and the button inherits your global Button Styles, so it matches every other button on the shop. Set one to override it here only.', 'ai-eshop-optimizer' ),
'col' => 2,
),
'',
$aieo_pr_rows
);
if ( function_exists( 'rooster_admin_band_close' ) ) {
rooster_admin_band_close();
}