PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.4.2
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.4.2
3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.10 All 111 releases
templately / includes / Admin / Settings.php

Settings.php in Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! 3.4.2, at includes/Admin/Settings.php

31 lines 705 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Templately\Admin;
4
5 use Templately\Utils\Base;
6 use Templately\Utils\Helper;
7
8 class Settings extends Base {
9
10 public function __construct() {
11 add_action('admin_menu', [$this, 'admin_menu']);
12 add_action('wp_head', [$this, 'add_custom_css']);
13 }
14
15 public function admin_menu() {
16 add_submenu_page( 'templately', 'Settings', 'Settings', 'delete_posts', 'templately_settings', [$this, 'display_settings'], '58.7' );
17 }
18
19
20 public function display_settings() {
21 Helper::views( 'settings' );
22 }
23
24 public function add_custom_css() {
25 $custom_css = get_option('templately_custom_css');
26 if($custom_css){
27 echo "\n<style id='templately-custom-css'>\n".$custom_css."\n</style>\n";
28 }
29 }
30 }
31