Changeset 3395661
- Timestamp:
- 11/14/2025 10:31:18 AM (5 months ago)
- Location:
- lenochat
- Files:
-
- 26 added
- 4 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/LICENSE (added)
-
tags/1.0.2/admin (added)
-
tags/1.0.2/admin/assets (added)
-
tags/1.0.2/admin/assets/css (added)
-
tags/1.0.2/admin/assets/css/font.css (added)
-
tags/1.0.2/admin/assets/css/main.css (added)
-
tags/1.0.2/admin/assets/fonts (added)
-
tags/1.0.2/admin/assets/fonts/inter-v18-latin-300.woff2 (added)
-
tags/1.0.2/admin/assets/fonts/inter-v18-latin-500.woff2 (added)
-
tags/1.0.2/admin/assets/fonts/inter-v18-latin-600.woff2 (added)
-
tags/1.0.2/admin/assets/fonts/inter-v18-latin-700.woff2 (added)
-
tags/1.0.2/admin/assets/fonts/inter-v18-latin-regular.woff2 (added)
-
tags/1.0.2/admin/assets/images (added)
-
tags/1.0.2/admin/assets/images/lenochatbanner.svg (added)
-
tags/1.0.2/admin/class-lenochat-submenu-page.php (added)
-
tags/1.0.2/admin/class-lenochat-submenu.php (added)
-
tags/1.0.2/admin/language (added)
-
tags/1.0.2/admin/language/en.php (added)
-
tags/1.0.2/admin/language/tr.php (added)
-
tags/1.0.2/admin/lenochat-env-functions.php (added)
-
tags/1.0.2/admin/views (added)
-
tags/1.0.2/admin/views/lenochat-login.php (added)
-
tags/1.0.2/data-env.php (added)
-
tags/1.0.2/lenochat.php (added)
-
tags/1.0.2/readme.txt (added)
-
trunk/admin/class-lenochat-submenu.php (modified) (2 diffs)
-
trunk/data-env.php (modified) (1 diff)
-
trunk/lenochat.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lenochat/trunk/admin/class-lenochat-submenu.php
r3295761 r3395661 1 1 <?php /** 2 * Creates the submenu item for the plugin.2 * Creates the top-level menu item for the plugin. 3 3 * 4 * Registers a new menu item under 'Settings' and uses the dependency passed into 5 * the constructor in order to display the page corresponding to this menu item. 4 * Registers a new top-level menu item in the WordPress admin sidebar and uses 5 * the dependency passed into the constructor in order to display the page 6 * corresponding to this menu item. 6 7 */ 7 8 class LenoChat_Submenu 8 9 { 9 10 /** 10 * A reference the class responsible for rendering the submenu page.11 * A reference the class responsible for rendering the menu page. 11 12 * 12 13 * @var Submenu_Page … … 27 28 28 29 /** 29 * Adds a submenu for this plugin to the 'Settings' menu.30 * Adds a top-level menu for this plugin to the WordPress admin sidebar. 30 31 */ 31 32 public function init() 32 33 { 33 add_action("admin_menu", [$this, "add_options_page"]); 34 add_action("admin_menu", [$this, "add_menu_page"]); 35 add_action("admin_head", [$this, "add_menu_icon_styles"]); 34 36 } 35 37 36 38 /** 37 * Creates the submenu item and calls on the Submenu Page object to render39 * Creates the top-level menu item and calls on the Submenu Page object to render 38 40 * the actual contents of the page. 39 41 */ 40 public function add_ options_page()42 public function add_menu_page() 41 43 { 42 add_options_page( 44 // Get menu icon URL from environment config 45 $menu_icon = "dashicons-format-chat"; // Default fallback 46 try { 47 require_once plugin_dir_path(__FILE__) . "lenochat-env-functions.php"; 48 $env = lenochat_load_env_func(); 49 if (isset($env["LENOCHAT_MENU_ICON_URL"]) && !empty($env["LENOCHAT_MENU_ICON_URL"])) { 50 $menu_icon = esc_url($env["LENOCHAT_MENU_ICON_URL"]); 51 } 52 } catch (Exception $e) { 53 // Use default icon if env loading fails 54 } 55 56 add_menu_page( 43 57 "LenoChat", 44 "LenoChat Settings",58 "LenoChat", 45 59 "manage_options", 46 60 "lenochat", 47 [$this->submenu_page, "render"] 61 [$this->submenu_page, "render"], 62 $menu_icon, 63 30 48 64 ); 49 65 } 66 67 /** 68 * Adds custom CSS styles for the menu icon. 69 */ 70 public function add_menu_icon_styles() 71 { 72 echo '<style> 73 #toplevel_page_lenochat .wp-menu-image img { 74 width: 20px; 75 height: 20px; 76 padding: 0px; 77 margin: 7px 0; 78 border-radius: 3px; 79 } 80 </style>'; 81 } 50 82 } -
lenochat/trunk/data-env.php
r3395638 r3395661 6 6 "LENOCHAT_URL" => "https://www.lenochat.com/", 7 7 "LENOCHAT_APP_URL" => "https://my.lenochat.com/", 8 "LENOCHAT_LOGO_URL" => "https://stg-cdn.lenochat.com/assets/lenochat/lenochatbanner.svg", 8 "LENOCHAT_LOGO_URL" => "https://my-cdn.lenochat.com/assets/lenochat/lenochatbanner.svg", 9 "LENOCHAT_MENU_ICON_URL" => "https://my-cdn.lenochat.com/assets/lenochat/lenochaticon-blue.png", 9 10 ]; -
lenochat/trunk/lenochat.php
r3395638 r3395661 4 4 * 5 5 * @link http://www.lenochat.com 6 * @since 1.0. 16 * @since 1.0.2 7 7 * @package LenoChat 8 8 * … … 11 11 * Plugin URI: http://www.lenochat.com 12 12 * Description: Real-Time Conversations Made Simple! Enjoy engaging with your website visitors in real-time using LenoChat. Max out Customer Experience & Skyrocket Your Business Growth Deliver better support, faster responses, and stronger connections. 13 * Version: 1.0. 113 * Version: 1.0.2 14 14 * Author: LenoChat 15 15 * Author URI: https://www.lenochat.com … … 24 24 25 25 // Define constants for the plugin 26 define("LENOCHAT_VERSION", "1.0. 1");26 define("LENOCHAT_VERSION", "1.0.2"); 27 27 define("LENOCHAT_PLUGIN_DIR", plugin_dir_path(__FILE__)); 28 28 define("LENOCHAT_PLUGIN_URL", plugin_dir_url(__FILE__)); … … 46 46 "LENOCHAT_JS_URL" => "https://my-cdn.lenochat.com/lenochat.js", 47 47 "AUTH_URL" => "https://8twcxgmmjb.execute-api.us-east-1.amazonaws.com/prod/v1/public/auth", 48 "LENOCHAT_MENU_ICON_URL" => "https://my-cdn.lenochat.com/assets/lenochat/lenochaticon.png", 48 49 ]; 49 50 } -
lenochat/trunk/readme.txt
r3395638 r3395661 5 5 Requires PHP: 7.2 6 6 Tested up to: 6.8 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 Donate link: https://www.lenochat.com 9 9 License: GPL-2.0+ … … 113 113 114 114 == Changelog == 115 = 1.0.2 = 116 * Added custom menu icon with styling 117 * Moved menu from Settings submenu to top-level sidebar menu 118 115 119 = 1.0.1 = 116 120 * Updated AUTH_URL endpoint … … 120 124 121 125 == Upgrade Notice == 126 = 1.0.2 = 127 Added custom menu icon and moved LenoChat to top-level admin menu. 128 122 129 = 1.0.1 = 123 130 Updated authentication endpoint URL.
Note: See TracChangeset
for help on using the changeset viewer.