'; return 'data:image/svg+xml;base64,' . \base64_encode( $svg ); } /** * Full settings array (with defaults merged in). * * @return array */ public static function all() { $defaults = array( 'brand_name' => 'Leadite', 'menu_icon' => self::default_menu_icon(), 'hide_branding' => false, 'per_page' => 25, 'enabled_sources' => array( 'cf7', 'elementor', 'wpforms', 'ninjaforms', 'gravityforms', 'fluentforms' ), 'google_sheets_enabled' => false, 'google_sheets_url' => '', 'telegram_enabled' => false, 'telegram_token' => '', 'telegram_chat_id' => '', 'telegram_quick_contact' => false, 'webhook_enabled' => false, 'webhook_url' => '', 'delete_on_uninstall' => false, 'att_filtering_enabled' => true, 'att_max_size_kb' => 10240, 'att_allowed_extensions' => 'jpg,jpeg,png,gif,webp,pdf,doc,docx,xls,xlsx,ppt,pptx,txt,csv,zip,odt,ods', 'anonymize_ip' => true, 'autopurge_enabled' => false, 'autopurge_days' => 365, 'autopurge_only_closed' => true, 'followup_enabled' => true, 'followup_not_opened_min' => 15, 'followup_not_closed_hours' => 24, 'followup_hot_threshold' => 50, 'followup_digest_enabled' => false, 'followup_digest_email' => '', 'followup_digest_hour' => 8, 'followup_overdue_badge' => true, 'role_access' => array(), ); // wp-config constant wins for locked agency deployments. if ( defined( 'leadite_BRAND' ) && is_array( leadite_BRAND ) ) { $defaults = array_merge( $defaults, leadite_BRAND ); } $stored = get_option( self::OPTION, array() ); $stored = ( is_array( $stored ) ? $stored : array() ); return array_merge( $defaults, $stored ); } /** * Get a single setting. * * @param string $key Setting key. * @param mixed $default Fallback. * @return mixed */ public static function get( $key, $default = null ) { $all = self::all(); return ( array_key_exists( $key, $all ) ? $all[$key] : $default ); } /** * White-label display name shown across the admin UI. * * @return string */ public static function brand() { return 'Leadite'; } /** * Whether "powered by" footer branding is hidden. * * @return bool */ public static function branding_hidden() { return false; } }