493 lines
17 KiB
PHP
Executable File
493 lines
17 KiB
PHP
Executable File
|
|
<?php
|
|
$dashboard_background_color = get_option('palettepro_dashboard_background_color', '#ffffff');
|
|
/////////////////////////////////// DASHBOARD //////////////////////////////////////////////
|
|
$border_radius = get_option('palettepro_border_radius', 0);
|
|
/////////////////////////////////// TOP MENU //////////////////////////////////////////////
|
|
$top_menu_bg_color = get_option('palettepro_top_menu_bg_color');
|
|
/////////////////////////////////// LOGIN PAGE //////////////////////////////////////////////
|
|
$login_bg_type = get_option('palettepro_login_bg_type', 'color');
|
|
$login_bg_color = get_option('palettepro_login_bg_color', '#ffffff');
|
|
$login_bg_gradient_start = get_option('palettepro_login_bg_gradient_start', '#ffffff');
|
|
$login_bg_gradient_end = get_option('palettepro_login_bg_gradient_end', '#ffffff');
|
|
$logo_url = get_option('palettepro_logo_url');
|
|
/////////////////////////////////// BUTTONS //////////////////////////////////////////////
|
|
$primary_button_bg_color = get_option('palettepro_primary_button_bg_color', '#007cba');
|
|
$primary_button_hover_color = get_option('palettepro_primary_button_hover_color', 'green');
|
|
$secondary_button_bg_color = get_option('palettepro_secondary_button_bg_color', '#999999');
|
|
$secondary_button_hover_color = get_option('palettepro_secondary_button_hover_color', 'red');
|
|
$primary_color = get_option('palettepro_primary_color', '#007cba');
|
|
/////////////////////////////////// LEFT MENU //////////////////////////////////////////////
|
|
$left_menu_bg_color = get_option('palettepro_left_menu_bg_color');
|
|
$left_menu_bg_items = get_option('palettepro_left_menu_bg_items');
|
|
$left_menu_item_text_color = get_option('palettepro_left_menu_item_text_color');
|
|
$left_menu_item_bg_color = get_option('palettepro_left_menu_item_bg_color');
|
|
$left_menu_item_bg_hover = get_option('palettepro_left_menu_item_bg_hover');
|
|
$left_menu_item_text_hover = get_option('palettepro_left_menu_item_text_hover');
|
|
|
|
|
|
|
|
echo '<style>';
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// GENERAL //////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
// Dashboard Background
|
|
|
|
echo 'body.wp-admin, #wp-content-editor-tools, .pp-logoname span, .pp-radio-group input[type="radio"]:checked + label, .pp-borderradius-btn, .pp-btns-borderradius, .pp-input-wrapper button
|
|
{ background-color: ' . $dashboard_background_color . '; }';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Primary Color
|
|
echo ' .theme-browser .theme.add-new-theme a:focus:after, .theme-browser .theme.add-new-theme a:hover:after, ';
|
|
echo ' #adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, ';
|
|
echo ' .filter-count .count, .title-count, .pp-menu h2, .pp-menu-link.settings-active, .pp-menu-link:hover, #pp_dashBoard .pp-input-wrapper button:hover ';
|
|
echo '{';
|
|
echo ' background-color: ' . $primary_color . ';';
|
|
echo '}';
|
|
|
|
|
|
echo ' .plugin-update-tr.active td, .plugins .active th.check-column ';
|
|
echo '{';
|
|
echo ' border-left: 4px solid ' . $primary_color . ';';
|
|
echo '}';
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Border Radius
|
|
echo '.postbox,';
|
|
echo '#dashboard-widgets .postbox-container,';
|
|
echo 'input[type="submit"].wp-core-ui.button,';
|
|
echo '#preview-action .preview,';
|
|
echo '.wp-core-ui .button-primary,';
|
|
echo '.wrap .page-title-action,';
|
|
echo 'input[type="text"],';
|
|
echo 'input[type="url"],';
|
|
echo 'input[type="email"],';
|
|
echo 'input[type="password"],';
|
|
echo 'input[type="number"],';
|
|
echo 'textarea,';
|
|
echo '.wp-core-ui .attachment .thumbnail,';
|
|
echo '.wp-core-ui .attachment-preview,';
|
|
echo '.pp-section,';
|
|
echo '.wp-core-ui p .button,';
|
|
echo '.wp-core-ui .button-secondary,';
|
|
echo '.wpb_edit_form_elements textarea, .usof-radio, .usof-radio input[type=radio]:checked + .usof-radio-value, .usof-radio input[type=radio][checked] + .usof-radio-value';
|
|
echo '.wpb_edit_form_elements input,';
|
|
echo '.wpb_edit_form_elements select, #loginform, #login, #login_error, #language-switcher input, #language-switcher select, #lostpasswordform, #login .message,';
|
|
echo '.pp-card, .pp-section, .pp-button, .wp-core-ui .button, .wp-core-ui .button-secondary, .search-box input[name="s"],';
|
|
echo '.tablenav .actions select, .media-upload-form .notice, .media-upload-form div.error, .wrap .notice, .wrap div.error, .wrap div.updated, #poststuff .inside #page_template, #poststuff .inside #parent_id, table,';
|
|
echo '.theme-browser .theme, .wp-color-result-text, .wp-core-ui select, #dashboard-widgets .postbox-container .empty-container,';
|
|
echo '.pp-note, .btn-reset, .pp-logoname span, .pp-logo img, .pp-section-body,';
|
|
echo '.themes-php .wp-filter-search, .media-frame.mode-grid .media-toolbar, .media-frame.mode-grid .wp-filter input[type=search],';
|
|
echo '.theme-browser .theme .more-details, .theme-install-php .wp-filter, .wp-filter .search-form input[type=search], .show-filters .wp-filter .button.drawer-toggle,';
|
|
echo '.wrap .add-new-h2, .wrap .add-new-h2:active, .wrap .page-title-action, .wrap .page-title-action:active, ';
|
|
echo '.theme-browser .theme.add-new-theme a:after, .pp-form, .pp-notice-content, .wp-filter, .drag-drop #drag-drop-area ';
|
|
|
|
echo '{';
|
|
echo ' border-radius: ' . $border_radius . 'px;';
|
|
echo '}';
|
|
|
|
//////////////////////////// top-left
|
|
echo '.pp-card-head, .pp-section, .pp-section-head, .wp-switch-editor, .wp-editor-expand #wp-content-editor-container, .mce-container, .mce-container *, .mce-widget, .mce-widget *, .theme-browser .theme .theme-screenshot,';
|
|
echo '.pp-left, .pp-settings, .pp-menu-link:first-child, .pp-menu h2, .pp-btns-borderradius button:nth-child(1), .plugins thead td.check-column';
|
|
echo '{';
|
|
echo ' border-top-left-radius: ' . $border_radius . 'px;';
|
|
echo '}';
|
|
//////////////////////////// top-right
|
|
echo '.pp-card-head, .pp-sectionHead, .pp-section, .pp-section-head,
|
|
.wp-switch-editor, .theme-browser .theme .theme-screenshot, .pp-right, .pp-sidebar, .pp-btns-borderradius button:nth-child(3), .pp-close-button, .wp-submenu, .plugins thead tr th:last-child';
|
|
|
|
echo '{';
|
|
echo ' border-top-right-radius: ' . $border_radius . 'px;';
|
|
echo '}';
|
|
|
|
//////////////////////////// bottom-left
|
|
echo '.pp-cardBody, .pp-section, .pp-section-footer, #screen-meta-links .show-settings, .theme-browser .theme.active .theme-name,';
|
|
echo '.theme-browser .theme .theme-name, #screen-meta, #major-publishing-actions, .pp-button-upload, .pp-settings, .pp-menu-link.settings-active:last-child, .pp-btns-borderradius,';
|
|
echo '.pp-btns-borderradius button:nth-child(4), .plugins-php .widefat tfoot td';
|
|
|
|
echo '{';
|
|
echo ' border-bottom-left-radius: ' . $border_radius . 'px;';
|
|
echo '}';
|
|
|
|
//////////////////////////// bottom-right
|
|
echo '.pp-cardBody, .pp-section, .pp-section-footer, #screen-meta-links .show-settings, .theme-browser .theme.active .theme-name,';
|
|
echo '.theme-browser .theme .theme-actions, .theme-browser .theme .theme-name, #screen-meta, #major-publishing-actions, .pp-button-upload,';
|
|
echo ' .pp-sidebar, .pp-btns-borderradius, .pp-btns-borderradius button:nth-child(6), #adminmenu, .btn-save, #adminmenu .wp-submenu, .plugins tfoot tr th:last-child';
|
|
|
|
echo '{';
|
|
echo ' border-bottom-right-radius: ' . $border_radius . 'px;';
|
|
echo '}';
|
|
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// LOGIN PAGE ///////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
if ($login_bg_type === 'color') {
|
|
echo 'body.login { background-color: ' . $login_bg_color . '; }';
|
|
} else {
|
|
echo 'body.login { background: linear-gradient(to top, ' . $login_bg_gradient_start . ', ' . $login_bg_gradient_end . '); }';
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// BTNS /////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
echo '.wp-core-ui .button-primary, .pp-button, .btn-save {';
|
|
echo ' background-color: ' . $primary_button_bg_color . ';';
|
|
echo '}';
|
|
|
|
echo '.wp-core-ui .button-primary:hover, .pp-button:hover, .btn-save:hover {';
|
|
echo ' background-color: ' . $primary_button_hover_color . ';';
|
|
echo '}';
|
|
|
|
echo '.wp-core-ui .button-secondary, #preview-action .preview, .page-title-action, .pp-button-upload {';
|
|
echo ' background-color: ' . $secondary_button_bg_color . ';';
|
|
echo '}';
|
|
|
|
echo '#preview-action .preview:hover, .btn-reset:hover, .pp-button-upload:hover {';
|
|
echo ' background-color: ' . $secondary_button_hover_color . ';';
|
|
echo '}';
|
|
|
|
///////// STANDARD BTNS
|
|
echo '.wrap .add-new-h2, .wrap .add-new-h2:active, .wrap .page-title-action, .wrap .page-title-action:active,';
|
|
echo '.wp-core-ui .button, .wp-core-ui .button-secondary {';
|
|
echo ' border: 1px solid ' . $primary_color . ';';
|
|
echo ' color: #fff;';
|
|
echo ' background-color: ' . $primary_color . ';';
|
|
echo '}';
|
|
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// LEFT MENU ///////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
/////////// LEFT MENU BG ////////////////////////////
|
|
echo ' #adminmenuback, #adminmenuwrap';
|
|
echo '{';
|
|
echo ' background-color: ' . $left_menu_bg_color . ';';
|
|
echo '}';
|
|
|
|
/////////// ITEM BG ////////////////////////////
|
|
echo ' #adminmenu ';
|
|
echo '{';
|
|
echo ' background-color: ' . $left_menu_bg_items . ';';
|
|
echo '}';
|
|
|
|
/////////// ITEM TEXT COLOR ////////////////////////////
|
|
echo '#adminmenu a, #adminmenu li a:focus div.wp-menu-image:before, #collapse-button:hover, #collapse-button:focus {';
|
|
echo ' color: ' . $left_menu_item_text_color . ';';
|
|
echo '}';
|
|
|
|
/////////// ITEM TEXT HOVER ////////////////////////////
|
|
echo '#adminmenu a:hover, #adminmenu .wp-submenu a:hover, #adminmenu a:hover, .wp-has-submenu a .wp-menu-name:hover, #adminmenu li.menu-top:hover {';
|
|
echo ' color: ' . $left_menu_item_text_hover . ';';
|
|
echo '}';
|
|
|
|
/////////// ITEM BG COLOR ////////////////////////////
|
|
echo '#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu {';
|
|
echo ' background-color: ' . $left_menu_item_bg_color . ';';
|
|
echo '}';
|
|
|
|
/////////// ITEM BG HOVER ////////////////////////////
|
|
echo '#adminmenu li.menu-top:hover, #adminmenu li.opensub>a.menu-top, #adminmenu li>a.menu-top:focus,';
|
|
echo '.wp-has-submenu a .wp-menu-image::before:hover {';
|
|
echo ' background-color: ' . $left_menu_item_bg_hover . ';';
|
|
echo '}';
|
|
|
|
|
|
|
|
// DARKEN 10%
|
|
$hexColor = str_replace('#', '', $left_menu_bg_items);
|
|
|
|
// Split the hexadecimal representation into separate color components (R, G, B)
|
|
$r = hexdec(substr($hexColor, 0, 2));
|
|
$g = hexdec(substr($hexColor, 2, 2));
|
|
$b = hexdec(substr($hexColor, 4, 2));
|
|
|
|
// Calculate the darkened color components by reducing each component by 10% (10% of 255 is 25.5, rounded to 26)
|
|
$darkened_r = max($r - 26, 0); // Ensure the result is not less than 0
|
|
$darkened_g = max($g - 26, 0);
|
|
$darkened_b = max($b - 26, 0);
|
|
|
|
// Convert the darkened color components back to hexadecimal
|
|
$darkened_color = sprintf("#%02x%02x%02x", $darkened_r, $darkened_g, $darkened_b);
|
|
|
|
|
|
|
|
|
|
echo '#adminmenu .wp-submenu, .pp-left-user{';
|
|
echo ' background-color: ' . $darkened_color . ';';
|
|
echo '}';
|
|
|
|
|
|
|
|
|
|
|
|
echo '#adminmenu .wp-has-current-submenu .wp-submenu,
|
|
#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,
|
|
#adminmenu .wp-has-current-submenu.opensub .wp-submenu,
|
|
.no-js li.wp-has-current-submenu:hover .wp-submenu {';
|
|
echo ' border-radius: 0px;';
|
|
echo '}';
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
///////// PRIMARY COLOR
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
////////////// Borders in Foucs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// TOP MENU ////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
echo '#wpadminbar ';
|
|
echo '{';
|
|
echo ' background-color: ' . $top_menu_bg_color . ';';
|
|
echo '}';
|
|
|
|
echo '#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {';
|
|
echo ' content: "";';
|
|
echo ' display: inline-block;';
|
|
echo ' width: 20px;'; // Adjust the width as needed
|
|
echo ' height: 25px;'; // Adjust the height as needed
|
|
echo ' background-image: url("' . $logo_url . '");';
|
|
echo ' background-size: contain;';
|
|
echo ' background-repeat: no-repeat;';
|
|
echo ' margin-right: 3px;';
|
|
echo ' vertical-align: middle;';
|
|
echo '}';
|
|
|
|
echo '#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon svg {';
|
|
echo ' fill: ' . $logo_color . ';';
|
|
echo '}';
|
|
|
|
echo '#adminmenu {';
|
|
echo ' margin: 0;';
|
|
echo ' padding: 0;';
|
|
echo '}';
|
|
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// WELCOME MSG /////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
echo '.pp-welcome-notice {';
|
|
echo ' position: relative;';
|
|
echo '}';
|
|
|
|
echo '.pp-flex {';
|
|
echo ' display: flex;';
|
|
echo ' align-items: center;';
|
|
echo '}';
|
|
|
|
echo '.pp-welcome-logo {';
|
|
echo ' flex: 1;';
|
|
echo '}';
|
|
echo '.pp-welcome-msg {';
|
|
echo ' flex:12;';
|
|
echo '}';
|
|
echo '.pp-welcome-support {';
|
|
echo ' flex: 3;';
|
|
echo '}';
|
|
|
|
|
|
echo '.pp-notice-content {';
|
|
// echo ' display: flex;';
|
|
echo ' position: relative;';
|
|
echo ' background: #fff;';
|
|
echo ' border: 1px solid #00000030;';
|
|
echo ' margin-top: 2.5rem;';
|
|
echo ' padding: 2rem;';
|
|
echo ' margin-right: 20px;';
|
|
echo '}';
|
|
|
|
echo '.pp-notice-dismiss {';
|
|
echo ' position: absolute;';
|
|
echo ' top: -1px;';
|
|
echo ' right: -6px;';
|
|
echo ' background: transparent;';
|
|
echo ' border: none;';
|
|
echo ' color: #ff0000;';
|
|
echo ' cursor: pointer;';
|
|
echo '}';
|
|
|
|
echo '.pp-close-button {';
|
|
echo ' position: relative;';
|
|
echo ' display: inline-block;';
|
|
echo ' width: 35px;';
|
|
echo ' height: 35px;';
|
|
echo ' cursor: pointer;';
|
|
echo ' background-color: yellow;';
|
|
echo '}';
|
|
|
|
echo '.pp-close-button:hover {';
|
|
echo ' background-color: blue;';
|
|
echo '}';
|
|
|
|
echo '.pp-close-button:before,';
|
|
echo '.pp-close-button:after {';
|
|
echo ' position: absolute;';
|
|
echo ' top: 50%;';
|
|
echo ' left: 50%;';
|
|
echo ' content: "";';
|
|
echo ' height: 2px;';
|
|
echo ' width: 10px;';
|
|
echo ' background-color: red;';
|
|
echo ' transition: all 0.3s ease;';
|
|
echo '}';
|
|
|
|
echo '.pp-close-button:before {';
|
|
echo ' transform: translate(-50%, -50%) rotate(45deg);';
|
|
echo '}';
|
|
|
|
echo '.pp-close-button:after {';
|
|
echo ' transform: translate(-50%, -50%) rotate(-45deg);';
|
|
echo '}';
|
|
|
|
echo '.pp-notice-dismiss .dashicons-no-alt:before {';
|
|
echo ' content: "\f158";';
|
|
echo ' color: red;';
|
|
echo '}';
|
|
|
|
echo '.pp-notice-dismiss .pp-screen-reader-text {';
|
|
echo ' display: none;';
|
|
echo '}';
|
|
|
|
echo '.pp-notice-dismiss:hover .pp-close-button:before,';
|
|
echo '.pp-notice-dismiss:hover .pp-close-button:after {';
|
|
echo ' background-color: green;';
|
|
echo '}';
|
|
|
|
echo '.pp-welcome-menu {';
|
|
echo ' display: flex;';
|
|
echo ' justify-content: flex-start;';
|
|
echo ' align-items: left;';
|
|
echo ' padding: 10px 0px;';
|
|
echo '}';
|
|
|
|
echo '.pp-welcome-menu-item {';
|
|
echo ' padding: 8px 12px;';
|
|
echo ' border-radius: 5px;';
|
|
echo ' transition: background-color 0.3s ease;';
|
|
echo '}';
|
|
|
|
echo '.pp-welcome-menu-item:hover {';
|
|
echo ' background-color: #ddd;';
|
|
echo '}';
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////
|
|
/////////////// RANDOM //////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////
|
|
|
|
echo '.wp-core-ui .button-secondary:focus, .wp-core-ui .button.focus, .wp-core-ui .button:focus,';
|
|
echo 'input[type=checkbox]:focus, input[type=color]:focus, input[type=date]:focus, input[type=datetime-local]:focus, input[type=datetime]:focus, input[type=email]:focus, input[type=month]:focus, input[type=number]:focus, input[type=password]:focus, input[type=radio]:focus, input[type=search]:focus, input[type=tel]:focus, input[type=text]:focus, input[type=time]:focus, input[type=url]:focus, input[type=week]:focus, select:focus, textarea:focus,';
|
|
echo '.rank-math-focus-keyword .tagify.tagify--focus';
|
|
echo '{';
|
|
echo ' border-color: none;';
|
|
echo ' box-shadow: none;';
|
|
echo '}';
|
|
|
|
|
|
|
|
|
|
|
|
echo '.pp-left-user a';
|
|
echo '{';
|
|
echo ' height: 100px;';
|
|
echo '}';
|
|
|
|
echo '.pp-user-avatar ';
|
|
echo '{';
|
|
echo ' margin-top: -4rem;';
|
|
echo '}';
|
|
|
|
echo '.pp-user-avatar img ';
|
|
echo '{';
|
|
echo ' border-radius: 50%;';
|
|
echo ' width: 60px;';
|
|
echo ' height: 60px;';
|
|
echo '}';
|
|
|
|
|
|
echo '#adminmenu .pp-left-user .wp-menu-name ';
|
|
echo '{';
|
|
echo ' display: flex;';
|
|
echo ' flex-direction: column;';
|
|
echo ' justify-content: center;';
|
|
echo ' align-items: center;';
|
|
echo ' width: 100%;';
|
|
echo ' height: 75px;';
|
|
echo ' padding: 0px !important;';
|
|
echo ' height: 100px;';
|
|
echo '}';
|
|
|
|
|
|
echo '.pp-user-name ';
|
|
echo '{';
|
|
echo ' font-size: 15px;';
|
|
echo '}';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '</style>';
|
|
?>
|