| @@ -10,9 +10,11 @@ | ||
| 10 | 10 | exit; // Exit if accessed directly |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | // Settings |
| 14 | -Merchant_Admin_Options::create( array( | |
| 14 | + | |
| 15 | +return array( | |
| 16 | + array( | |
| 15 | 17 | 'title' => esc_html__( 'Settings', 'merchant' ), |
| 16 | 18 | 'module' => 'login-popup', |
| 17 | 19 | 'fields' => array( |
| 18 | 20 | |
| @@ -37,8 +39,12 @@ | ||
| 37 | 39 | 'type' => 'switcher', |
| 38 | 40 | 'title' => esc_html__( 'Show welcome message', 'merchant' ), |
| 39 | 41 | 'desc' => esc_html__( 'Show a welcome message when the user it\'s logged in.', 'merchant' ), |
| 40 | 42 | 'default' => true, |
| 43 | + 'ai_meta' => array( | |
| 44 | + 'toggle_for' => 'welcome_message_text', | |
| 45 | + 'usage_hint' => 'Enable this toggle before setting welcome_message_text. Controls whether a personalised welcome message is shown to logged-in users.', | |
| 46 | + ), | |
| 41 | 47 | ), |
| 42 | 48 | |
| 43 | 49 | array( |
| 44 | 50 | 'id' => 'welcome_message_text', |
| @@ -59,8 +65,12 @@ | ||
| 59 | 65 | ), |
| 60 | 66 | /* Translators: 1. Display name */ |
| 61 | 67 | 'default' => sprintf( esc_html__( 'Welcome %s', 'merchant' ), '{display_name}' ), |
| 62 | 68 | 'condition' => array( 'show_welcome_message', '==', '1' ), |
| 69 | + 'ai_meta' => array( | |
| 70 | + 'toggled_by' => 'show_welcome_message', | |
| 71 | + 'usage_hint' => 'Supports template vars: {display_name}, {user_firstname}, {user_lastname}, {user_email}, {user_login}. Only shown when show_welcome_message is enabled.', | |
| 72 | + ), | |
| 63 | 73 | ), |
| 64 | 74 | |
| 65 | 75 | array( |
| 66 | 76 | 'id' => 'login-text-color', |
| @@ -97,12 +107,10 @@ | ||
| 97 | 107 | 'default' => '#ffffff', |
| 98 | 108 | ), |
| 99 | 109 | |
| 100 | 110 | ), |
| 101 | -) ); | |
| 102 | - | |
| 103 | -// Popup Settings | |
| 104 | -Merchant_Admin_Options::create( array( | |
| 111 | +), | |
| 112 | + array( | |
| 105 | 113 | 'title' => esc_html__( 'Popup Settings', 'merchant' ), |
| 106 | 114 | 'module' => 'login-popup', |
| 107 | 115 | 'fields' => array( |
| 108 | 116 | |
| @@ -229,5 +237,6 @@ | ||
| 229 | 237 | 'default' => '#f5f5f5', |
| 230 | 238 | ), |
| 231 | 239 | |
| 232 | 240 | ), |
| 233 | -) ); | |
| 241 | +), | |
| 242 | +); | |