initial commit

This commit is contained in:
2024-04-29 13:12:44 +05:45
commit 34887303c5
19300 changed files with 5268802 additions and 0 deletions

View File

@ -0,0 +1,127 @@
$base-color: <?php echo $options['bg-base']; ?>;
$highlight-color: <?php echo $options['bg-highlight']; ?>;
$notification-color: <?php echo $options['bg-notification']; ?>;
$indigo-base-color: #fefefe;
$indigo-text-color: #777;
$indigo-icon-color: #777;
@import "<?php echo $this->path('/inc/scss/_admin.scss'); ?>";
// Our function that sets the text color
@function setTextColor($color: #fff) {
@if (lightness($color) > 60) {
@return #222; // Lighter backgorund, return dark color
} @else {
@return #fff; // Darker background, return light color
}
}
// Adaptations that we need to make to make sure everything will work fine
#adminmenu a, #adminmenu div.wp-menu-image:before {
color: setTextColor(<?php echo $options['bg-base']; ?>);
}
#adminmenu .wp-submenu a, #adminmenu .wp-has-current-submenu .wp-submenu a, .folded #adminmenu .wp-has-current-submenu .wp-submenu a, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu a, #adminmenu .wp-has-current-submenu.opensub .wp-submenu a, #adminmenu .wp-menu-arrow div, #collapse-menu, #collapse-button > div:after, #collapse-menu:hover #collapse-button > div:after, #collapse-menu:hover {
color: setTextColor(<?php echo $options['bg-base']; ?>);
}
#adminmenu a:hover, #adminmenu li.menu-top:hover, #adminmenu li.opensub>a.menu-top, #adminmenu li>a.menu-top:focus, #adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, .folded #adminmenu li.current.menu-top, .wp-core-ui .button-primary {
color: setTextColor(<?php echo $options['bg-highlight']; ?>);
}
.custom-site-logo * {
color: setTextColor(<?php echo $options['bg-logo']; ?>) !important;
}
/* Header hover */
#wpadminbar .ab-top-menu>li>.ab-item:focus, #wpadminbar.nojq .quicklinks .ab-top-menu>li>.ab-item:focus, #wpadminbar .ab-top-menu>li:hover>.ab-item, #wpadminbar .ab-top-menu>li.hover>.ab-item {
background-color: darken(<?php echo $options['bg-header'] ? $options['bg-header'] : '#fdfdfd'; ?>, 10%);
}
// Menu width
<?php if ($options['menu-width'] != '250') : ?>
<?php $left = ((int) $options['menu-width']) + 30; ?>
#wpcontent,
#wpfooter,
.jetpack-pagestyles #wpcontent {
margin-left: <?php echo $options['menu-width']; ?>px;
}
.custom-site-logo {
width: <?php echo $options['menu-width']; ?>px !important;
}
#adminmenuback,
#adminmenuwrap,
#adminmenu,
#adminmenu .wp-submenu {
width: <?php echo $options['menu-width']; ?>px;
}
#adminmenu .wp-submenu {
left: <?php echo $options['menu-width']; ?>px;
}
// Theme Overlay
.theme-overlay .theme-wrap {
left: <?php echo $left; ?>px;
}
<?php endif; ?>
// WPADMINBAR height
<?php if ($options['header-height'] != '60') : ?>
html {padding-top: <?php echo $options['header-height']; ?>px !important;}
#wpadminbar,
#wpadminbar .quicklinks > ul > li > a,
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
#wpadminbar .ab-icon,
#wpadminbar .ab-item:before,
#wpadminbar .menupop .menupop > .ab-item:before,
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before,
#wpadminbar #adminbarsearch {
height: <?php echo $options['header-height']; ?>px !important;
}
#wpadminbar .quicklinks .ab-empty-item, #wpadminbar .shortlink-input {
height: <?php echo $options['header-height']; ?>px !important;
line-height: <?php echo $options['header-height']; ?>px !important;
}
#wpadminbar .quicklinks > ul > li > a,
#wpadminbar > #wp-toolbar > #wp-admin-bar-root-default .ab-icon,
#wpadminbar .ab-icon,
#wpadminbar .ab-item:before,
#wpadminbar .menupop .menupop > .ab-item:before,
#wpadminbar .ab-top-secondary .menupop .menupop > .ab-item:before,
#wpadminbar #adminbarsearch {
line-height: <?php echo $options['header-height']; ?>px !important;
}
<?php endif; ?>
#adminmenu li.wp-menu-separator {
height: 0;
margin: 7px 0;
border-bottom: solid 1px rgba(255, 255, 255, 0.08);
border-top: solid 1px darken(<?php echo $options['bg-base']; ?>, 10%) !important;
}
body.login h1 a {
background-image: url(<?php echo $options['login-page-logo']['url']; ?>) !important;
width: 100% !important;
min-height: 100px !important;
background-size: auto 100% !important;
}

View File

@ -0,0 +1,534 @@
@import 'variables';
@import 'mixins';
html {
background: $body-background;
}
/* Links */
a {
color: $link;
&:hover,
&:active,
&:focus {
color: $link-focus;
}
}
#media-upload a.del-link:hover,
div.dashboard-widget-submit input:hover,
.subsubsub a:hover,
.subsubsub a.current:hover {
color: $link-focus;
}
/* Forms */
input[type=checkbox]:checked:before {
color: $form-checked;
}
input[type=radio]:checked:before {
background: $form-checked;
}
.wp-core-ui input[type="reset"]:hover,
.wp-core-ui input[type="reset"]:active {
color: $link-focus;
}
/* Core UI */
.wp-core-ui {
.button-primary {
@include button( $button-color );
}
.wp-ui-primary {
color: $text-color;
background-color: $base-color;
}
.wp-ui-text-primary {
color: $base-color;
}
.wp-ui-highlight {
color: $menu-highlight-text;
background-color: $menu-highlight-background;
}
.wp-ui-text-highlight {
color: $menu-highlight-background;
}
.wp-ui-notification {
color: $menu-bubble-text;
background-color: $menu-bubble-background;
}
.wp-ui-text-notification {
color: $menu-bubble-background;
}
.wp-ui-text-icon {
color: $menu-icon;
}
}
/* List tables */
.wrap .add-new-h2:hover,
#add-new-comment a:hover,
.tablenav .tablenav-pages a:hover,
.tablenav .tablenav-pages a:focus {
color: $menu-text;
background-color: $menu-background;
}
.view-switch a.current:before {
color: $menu-background;
}
.view-switch a:hover:before {
color: $menu-bubble-background;
}
.post-com-count:hover:after {
border-top-color: $menu-background;
}
.post-com-count:hover span {
color: $menu-text;
background-color: $menu-background;
}
strong .post-com-count:after {
border-top-color: $menu-bubble-background;
}
strong .post-com-count span {
background-color: $menu-bubble-background;
}
/* Admin Menu */
#adminmenuback,
#adminmenuwrap,
#adminmenu {
background: $menu-background;
}
#adminmenu a {
color: $menu-text;
}
#adminmenu div.wp-menu-image:before {
color: $menu-icon;
}
#adminmenu a:hover,
#adminmenu li.menu-top:hover,
#adminmenu li.opensub > a.menu-top,
#adminmenu li > a.menu-top:focus {
color: $menu-highlight-text;
background-color: $menu-highlight-background;
}
#adminmenu li.menu-top:hover div.wp-menu-image:before,
#adminmenu li.opensub > a.menu-top div.wp-menu-image:before {
color: $menu-highlight-icon;
}
/* Active tabs use a bottom border color that matches the page background color. */
.about-wrap h2 .nav-tab-active,
.nav-tab-active,
.nav-tab-active:hover {
background-color: $body-background;
border-bottom-color: $body-background;
}
/* Admin Menu: submenu */
#adminmenu .wp-submenu,
#adminmenu .wp-has-current-submenu .wp-submenu,
#adminmenu .wp-has-current-submenu.opensub .wp-submenu,
.folded #adminmenu .wp-has-current-submenu .wp-submenu,
#adminmenu a.wp-has-current-submenu:focus + .wp-submenu {
background: $menu-submenu-background;
}
#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after {
border-right-color: $menu-submenu-background;
}
#adminmenu .wp-submenu .wp-submenu-head {
color: $menu-submenu-text;
}
#adminmenu .wp-submenu a,
#adminmenu .wp-has-current-submenu .wp-submenu a,
.folded #adminmenu .wp-has-current-submenu .wp-submenu a,
#adminmenu a.wp-has-current-submenu:focus + .wp-submenu a,
#adminmenu .wp-has-current-submenu.opensub .wp-submenu a {
color: $menu-submenu-text;
&:focus, &:hover {
color: $menu-submenu-focus-text;
}
}
/* Admin Menu: current */
#adminmenu .wp-submenu li.current a,
#adminmenu a.wp-has-current-submenu:focus + .wp-submenu li.current a,
#adminmenu .wp-has-current-submenu.opensub .wp-submenu li.current a {
color: $menu-submenu-current-text;
&:hover, &:focus {
color: $menu-submenu-focus-text;
}
}
ul#adminmenu a.wp-has-current-submenu:after,
ul#adminmenu > li.current > a.current:after {
border-right-color: $body-background;
}
#adminmenu li.current a.menu-top,
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
#adminmenu li.wp-has-current-submenu .wp-submenu .wp-submenu-head,
.folded #adminmenu li.current.menu-top {
color: $menu-current-text;
background: $menu-current-background;
}
#adminmenu li.wp-has-current-submenu div.wp-menu-image:before {
color: $menu-current-icon;
}
/* Admin Menu: bubble */
#adminmenu .awaiting-mod,
#adminmenu .update-plugins {
color: $menu-bubble-text;
background: $menu-bubble-background;
}
#adminmenu li.current a .awaiting-mod,
#adminmenu li a.wp-has-current-submenu .update-plugins,
#adminmenu li:hover a .awaiting-mod,
#adminmenu li.menu-top:hover > a .update-plugins {
color: $menu-bubble-current-text;
background: $menu-bubble-current-background;
}
/* Admin Menu: collapse button */
#collapse-menu {
color: $menu-collapse-text;
}
#collapse-menu:hover {
color: $menu-collapse-focus-text;
}
#collapse-button div:after {
color: $menu-collapse-icon;
}
#collapse-menu:hover #collapse-button div:after {
color: $menu-collapse-focus-icon;
}
/* Admin Bar */
#wpadminbar {
color: $indigo-menu-text;
background: $indigo-menu-background;
}
#wpadminbar .ab-item,
#wpadminbar a.ab-item,
#wpadminbar > #wp-toolbar span.ab-label,
#wpadminbar > #wp-toolbar span.noticon {
color: $indigo-menu-text;
}
#wpadminbar .ab-icon,
#wpadminbar .ab-icon:before,
#wpadminbar .ab-item:before,
#wpadminbar .ab-item:after {
color: $indigo-menu-icon;
}
#wpadminbar .ab-top-menu > li:hover > .ab-item,
#wpadminbar .ab-top-menu > li.hover > .ab-item,
#wpadminbar .ab-top-menu > li > .ab-item:focus,
#wpadminbar.nojq .quicklinks .ab-top-menu > li > .ab-item:focus,
#wpadminbar-nojs .ab-top-menu > li.menupop:hover > .ab-item,
#wpadminbar .ab-top-menu > li.menupop.hover > .ab-item {
color: $indigo-menu-submenu-focus-text;
background: $indigo-menu-submenu-background;
}
#wpadminbar > #wp-toolbar li:hover span.ab-label,
#wpadminbar > #wp-toolbar li.hover span.ab-label,
#wpadminbar > #wp-toolbar a:focus span.ab-label {
color: $indigo-menu-submenu-focus-text;
}
#wpadminbar li:hover .ab-icon:before,
#wpadminbar li:hover .ab-item:before,
#wpadminbar li:hover .ab-item:after,
#wpadminbar li:hover #adminbarsearch:before {
color: $indigo-menu-highlight-icon;
}
/* Admin Bar: submenu */
#wpadminbar .menupop .ab-sub-wrapper {
background: $indigo-menu-submenu-background;
}
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary,
#wpadminbar .quicklinks .menupop ul.ab-sub-secondary .ab-submenu {
background: $indigo-menu-submenu-background-alt;
}
#wpadminbar .ab-submenu .ab-item,
#wpadminbar .quicklinks .menupop ul li a,
#wpadminbar .quicklinks .menupop.hover ul li a,
#wpadminbar-nojs .quicklinks .menupop:hover ul li a {
color: $indigo-menu-submenu-text;
}
#wpadminbar .quicklinks li .blavatar,
#wpadminbar .menupop .menupop > .ab-item:before {
color: $indigo-menu-icon;
}
#wpadminbar .quicklinks .menupop ul li a:hover,
#wpadminbar .quicklinks .menupop ul li a:focus,
#wpadminbar .quicklinks .menupop ul li a:hover strong,
#wpadminbar .quicklinks .menupop ul li a:focus strong,
#wpadminbar .quicklinks .menupop.hover ul li a:hover,
#wpadminbar .quicklinks .menupop.hover ul li a:focus,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover,
#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,
#wpadminbar li:hover .ab-icon:before,
#wpadminbar li:hover .ab-item:before,
#wpadminbar li a:focus .ab-icon:before,
#wpadminbar li .ab-item:focus:before,
#wpadminbar li.hover .ab-icon:before,
#wpadminbar li.hover .ab-item:before,
#wpadminbar li:hover .ab-item:after,
#wpadminbar li.hover .ab-item:after,
#wpadminbar li:hover #adminbarsearch:before {
color: $indigo-menu-submenu-focus-text;
}
#wpadminbar .quicklinks li a:hover .blavatar,
#wpadminbar .menupop .menupop > .ab-item:hover:before {
color: $indigo-menu-submenu-focus-text;
}
#wp-admin-bar-my-site-logo {
background: $notification-color !important;
}
#wp-admin-bar-my-site-logo:hover,
#wp-admin-bar-my-site-logo:hover .ab-item{
background: rgba(0,0,0,.6) !important;
}
/* Admin Bar: search */
#wpadminbar #adminbarsearch:before {
color: $indigo-menu-icon;
}
#wpadminbar > #wp-toolbar > #wp-admin-bar-top-secondary > #wp-admin-bar-search #adminbarsearch input.adminbar-input:focus {
color: $indigo-menu-text;
background: $indigo-adminbar-input-background;
}
#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder { color: $indigo-menu-text; opacity: .7; }
#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder { color: $indigo-menu-text; opacity: .7; }
#wpadminbar #adminbarsearch .adminbar-input::-moz-placeholder { color: $indigo-menu-text; opacity: .7; }
#wpadminbar #adminbarsearch .adminbar-input:-ms-input-placeholder { color: $indigo-menu-text; opacity: .7; }
/* Admin Bar: my account */
#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
border-color: $indigo-adminbar-avatar-frame;
background-color: $indigo-adminbar-avatar-frame;
}
#wpadminbar #wp-admin-bar-user-info .display-name {
color: $indigo-menu-text;
}
#wpadminbar #wp-admin-bar-user-info a:hover .display-name {
color: $indigo-menu-submenu-focus-text;
}
#wpadminbar #wp-admin-bar-user-info .username {
color: $indigo-menu-submenu-text;
}
/* Pointers */
.wp-pointer .wp-pointer-content h3 {
background-color: $highlight-color;
border-color: darken( $highlight-color, 5% );
}
.wp-pointer .wp-pointer-content h3:before {
color: $highlight-color;
}
.wp-pointer.wp-pointer-top .wp-pointer-arrow,
.wp-pointer.wp-pointer-top .wp-pointer-arrow-inner,
.wp-pointer.wp-pointer-undefined .wp-pointer-arrow,
.wp-pointer.wp-pointer-undefined .wp-pointer-arrow-inner {
border-bottom-color: $highlight-color;
}
/* Media */
.media-item .bar,
.media-progress-bar div {
background-color: $highlight-color;
}
.details.attachment {
box-shadow:
inset 0 0 0 3px #fff,
inset 0 0 0 7px $highlight-color;
}
.attachment.details .check {
background-color: $highlight-color;
box-shadow: 0 0 0 1px #fff, 0 0 0 2px $highlight-color;
}
.media-selection .attachment.selection.details .thumbnail {
-webkit-box-shadow:
0px 0px 0px 1px #fff,
0px 0px 0px 3px $highlight-color;
box-shadow:
0px 0px 0px 1px #fff,
0px 0px 0px 3px $highlight-color;
}
/* Themes */
.theme-browser .theme.active .theme-name,
.theme-browser .theme.add-new-theme:hover:after {
background: $highlight-color;
}
.theme-browser .theme.add-new-theme:hover span:after {
color: $highlight-color;
}
.theme-section.current,
.theme-filter.current {
border-bottom-color: $menu-background;
}
body.more-filters-opened .more-filters {
color: $menu-text;
background-color: $menu-background;
}
body.more-filters-opened .more-filters:before {
color: $menu-text;
}
body.more-filters-opened .more-filters:hover,
body.more-filters-opened .more-filters:focus {
background-color: $menu-highlight-background;
color: $menu-highlight-text;
}
body.more-filters-opened .more-filters:hover:before,
body.more-filters-opened .more-filters:focus:before {
color: $menu-highlight-text;
}
/* Widgets */
.widgets-chooser li.widgets-chooser-selected {
background-color: $menu-highlight-background;
color: $menu-highlight-text;
}
.widgets-chooser li.widgets-chooser-selected:before,
.widgets-chooser li.widgets-chooser-selected:focus:before {
color: $menu-highlight-text;
}
/* Customize */
#customize-theme-controls .widget-area-select .selected {
background-color: $menu-highlight-background;
color: $menu-highlight-text;
}
/* jQuery UI Slider */
.wp-slider .ui-slider-handle,
.wp-slider .ui-slider-handle.ui-state-hover,
.wp-slider .ui-slider-handle.focus {
background: $button-color;
border-color: darken( $button-color, 10% );
box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15);
}
/* Thickbox: Plugin information */
#sidemenu a.current {
background: $body-background;
border-bottom-color: $body-background;
}
#plugin-information .action-button {
background: $button-color;
}
/* Responsive Component */
div#wp-responsive-toggle a:before {
color: $menu-icon;
}
.wp-responsive-open div#wp-responsive-toggle a {
// ToDo: make inset border
border-color: transparent;
background: $menu-highlight-background;
}
.star-rating .star {
color: $highlight-color;
}
.wp-responsive-open #wpadminbar #wp-admin-bar-menu-toggle a {
background: $menu-submenu-background;
}

View File

@ -0,0 +1,43 @@
/*
* Button mixin- creates 3d-ish button effect with correct
* highlights/shadows, based on a base color.
*/
@mixin button( $button-color, $text-color: white ) {
background: $button-color;
border-color: darken( $button-color, 10% );
color: $text-color;
box-shadow: inset 0 1px 0 lighten( $button-color, 15% ), 0 1px 0 rgba(0,0,0,.15);
&:hover,
&:focus {
background: darken( $button-color, 5% );
border-color: darken( $button-color, 15% );
color: $text-color;
box-shadow: inset 0 1px 0 lighten( $button-color, 10% );
}
&:focus {
box-shadow: inset 0 1px 0 lighten( $button-color, 10% ),
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba( 30, 140, 190, .8 );
}
&:active {
background: darken( $button-color, 10% );
border-color: darken( $button-color, 15% );
color: $text-color;
box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ),
0 0 0 1px #5b9dd9,
0 0 2px 1px rgba( 30, 140, 190, .8 );
}
&[disabled],
&:disabled,
&.button-primary-disabled,
&.disabled {
color: hsl( hue( $button-color ), 10%, 80% ) !important;
background: darken( $button-color, 8% ) !important;
border-color: darken( $button-color, 15% ) !important;
text-shadow: none !important;
}
}

View File

@ -0,0 +1,94 @@
// assign default value to all undefined variables
// core variables
$text-color: #fff !default;
$base-color: #222 !default;
$icon-color: hsl( hue( $base-color ), 7%, 95% ) !default;
$highlight-color: #0074a2 !default;
$notification-color: #d54e21 !default;
// global
$body-background: #f1f1f1 !default;
$link: #0074a2 !default;
$link-focus: lighten( $link, 10% ) !default;
$button-color: $highlight-color !default;
$form-checked: $highlight-color !default;
// admin menu & admin-bar
$menu-text: $text-color !default;
$menu-icon: $icon-color !default;
$menu-background: $base-color !default;
$menu-highlight-text: $text-color !default;
$menu-highlight-icon: $text-color !default;
$menu-highlight-background: $highlight-color !default;
$menu-current-text: $menu-highlight-text !default;
$menu-current-icon: $menu-highlight-icon !default;
$menu-current-background: $menu-highlight-background !default;
$menu-submenu-text: mix( $base-color, $text-color, 30% ) !default;
$menu-submenu-background: darken( $base-color, 7% ) !default;
$menu-submenu-background-alt: desaturate( lighten( $menu-background, 7% ), 7% ) !default;
$menu-submenu-focus-text: $highlight-color !default;
$menu-submenu-current-text: $text-color !default;
$menu-bubble-text: $text-color !default;
$menu-bubble-background: $notification-color !default;
$menu-bubble-current-text: $text-color !default;
$menu-bubble-current-background: $menu-submenu-background !default;
$menu-collapse-text: $menu-icon !default;
$menu-collapse-icon: $menu-icon !default;
$menu-collapse-focus-text: $text-color !default;
$menu-collapse-focus-icon: $menu-highlight-icon !default;
$adminbar-avatar-frame: lighten( $menu-background, 7% ) !default;
$adminbar-input-background: lighten( $menu-background, 7% ) !default;
$menu-customizer-text: mix( $base-color, $text-color, 40% ) !default;
// Indigo admin-bar
$indigo-menu-text: $indigo-text-color !default;
$indigo-menu-icon: $indigo-icon-color !default;
$indigo-menu-background: $indigo-base-color !default;
$indigo-menu-highlight-text: $indigo-text-color !default;
$indigo-menu-highlight-icon: $indigo-text-color !default;
$indigo-menu-highlight-background: $highlight-color !default;
$indigo-menu-current-text: $indigo-menu-highlight-text !default;
$indigo-menu-current-icon: $indigo-menu-highlight-icon !default;
$indigo-menu-current-background: $indigo-menu-highlight-background !default;
$indigo-menu-submenu-text: mix( $indigo-base-color, $indigo-text-color, 30% ) !default;
$indigo-menu-submenu-background: darken( $indigo-base-color, 2% ) !default;
$indigo-menu-submenu-background-alt: desaturate( lighten( $indigo-menu-background, 7% ), 7% ) !default;
$indigo-menu-submenu-focus-text: $highlight-color !default;
$indigo-menu-submenu-current-text: $indigo-text-color !default;
$indigo-menu-bubble-text: $indigo-text-color !default;
$indigo-menu-bubble-background: $notification-color !default;
$indigo-menu-bubble-current-text: $indigo-text-color !default;
$indigo-menu-bubble-current-background: $indigo-menu-submenu-background !default;
$indigo-menu-collapse-text: $indigo-menu-icon !default;
$indigo-menu-collapse-icon: $indigo-menu-icon !default;
$indigo-menu-collapse-focus-text: $indigo-text-color !default;
$indigo-menu-collapse-focus-icon: $indigo-menu-highlight-icon !default;
$indigo-adminbar-avatar-frame: lighten( $indigo-menu-background, 7% ) !default;
$indigo-adminbar-input-background: lighten( $indigo-menu-background, 7% ) !default;
$indigo-menu-customizer-text: mix( $indigo-base-color, $indigo-text-color, 40% ) !default;

View File

@ -0,0 +1,156 @@
<?php
/**
* This file represents an example of the code that themes would use to register
* the required plugins.
*
* It is expected that theme authors would copy and paste this code into their
* functions.php file, and amend to suit.
*
* @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
*
* @package TGM-Plugin-Activation
* @subpackage Example
* @version 2.5.2
* @author Thomas Griffin, Gary Jones, Juliette Reinders Folmer
* @copyright Copyright (c) 2011, Thomas Griffin
* @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later
* @link https://github.com/TGMPA/TGM-Plugin-Activation
*/
/**
* Include the TGM_Plugin_Activation class.
*/
require_once dirname( __FILE__ ) . '/tgm.php';
add_action( 'tgmpa_register', 'UltimoWPDependencies' );
/**
* Register the required plugins for this theme.
*
* In this example, we register five plugins:
* - one included with the TGMPA library
* - two from an external source, one from an arbitrary source, one from a GitHub repository
* - two from the .org repo, where one demonstrates the use of the `is_callable` argument
*
* The variable passed to tgmpa_register_plugins() should be an array of plugin
* arrays.
*
* This function is hooked into tgmpa_init, which is fired within the
* TGM_Plugin_Activation class constructor.
*/
function UltimoWPDependencies() {
/*
* Array of plugin arrays. Required keys are name and slug.
* If the source is NOT from the .org repo, then source is also required.
*/
$plugins = array(
array(
'name' => 'Redux Framework',
'slug' => 'redux-framework',
'required' => true,
),
);
/*
* Array of configuration settings. Amend each line as needed.
*
* TGMPA will start providing localized text strings soon. If you already have translations of our standard
* strings available, please help us make TGMPA even better by giving us access to these translations or by
* sending in a pull-request with .po file(s) with the translations.
*
* Only uncomment the strings in the config array if you want to customize the strings.
*/
$config = array(
'id' => 'tgmpa', // Unique ID for hashing notices for multiple instances of TGMPA.
'default_path' => '', // Default absolute path to bundled plugins.
'menu' => 'tgmpa-install-plugins', // Menu slug.
'parent_slug' => 'themes.php', // Parent menu slug.
'capability' => 'edit_theme_options', // Capability needed to view plugin install page, should be a capability associated with the parent menu used.
'has_notices' => true, // Show admin notices or not.
'dismissable' => true, // If false, a user cannot dismiss the nag message.
'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag.
'is_automatic' => false, // Automatically activate plugins after installation or not.
'message' => '', // Message to output right before the plugins table.
/*
'strings' => array(
'page_title' => __( 'Install Required Plugins', 'theme-slug' ),
'menu_title' => __( 'Install Plugins', 'theme-slug' ),
'installing' => __( 'Installing Plugin: %s', 'theme-slug' ), // %s = plugin name.
'oops' => __( 'Something went wrong with the plugin API.', 'theme-slug' ),
'notice_can_install_required' => _n_noop(
'This theme requires the following plugin: %1$s.',
'This theme requires the following plugins: %1$s.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_can_install_recommended' => _n_noop(
'This theme recommends the following plugin: %1$s.',
'This theme recommends the following plugins: %1$s.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_cannot_install' => _n_noop(
'Sorry, but you do not have the correct permissions to install the %1$s plugin.',
'Sorry, but you do not have the correct permissions to install the %1$s plugins.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_ask_to_update' => _n_noop(
'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.',
'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_ask_to_update_maybe' => _n_noop(
'There is an update available for: %1$s.',
'There are updates available for the following plugins: %1$s.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_cannot_update' => _n_noop(
'Sorry, but you do not have the correct permissions to update the %1$s plugin.',
'Sorry, but you do not have the correct permissions to update the %1$s plugins.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_can_activate_required' => _n_noop(
'The following required plugin is currently inactive: %1$s.',
'The following required plugins are currently inactive: %1$s.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_can_activate_recommended' => _n_noop(
'The following recommended plugin is currently inactive: %1$s.',
'The following recommended plugins are currently inactive: %1$s.',
'theme-slug'
), // %1$s = plugin name(s).
'notice_cannot_activate' => _n_noop(
'Sorry, but you do not have the correct permissions to activate the %1$s plugin.',
'Sorry, but you do not have the correct permissions to activate the %1$s plugins.',
'theme-slug'
), // %1$s = plugin name(s).
'install_link' => _n_noop(
'Begin installing plugin',
'Begin installing plugins',
'theme-slug'
),
'update_link' => _n_noop(
'Begin updating plugin',
'Begin updating plugins',
'theme-slug'
),
'activate_link' => _n_noop(
'Begin activating plugin',
'Begin activating plugins',
'theme-slug'
),
'return' => __( 'Return to Required Plugins Installer', 'theme-slug' ),
'plugin_activated' => __( 'Plugin activated successfully.', 'theme-slug' ),
'activated_successfully' => __( 'The following plugin was activated successfully:', 'theme-slug' ),
'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'theme-slug' ), // %1$s = plugin name(s).
'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'theme-slug' ), // %1$s = plugin name(s).
'complete' => __( 'All plugins installed and activated successfully. %1$s', 'theme-slug' ), // %s = dashboard link.
'contact_admin' => __( 'Please contact the administrator of this site for help.', 'tgmpa' ),
'nag_type' => 'updated', // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
),
*/
);
tgmpa( $plugins, $config );
}

File diff suppressed because it is too large Load Diff