-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update option page generation & add a new api route /terms - Version …
…bump to 3.0.6
- Loading branch information
Alberto Parziale
committed
Oct 14, 2019
1 parent
087ad83
commit 3d97101
Showing
8 changed files
with
125 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace Aeria\Kernel\Tasks; | ||
|
||
use Aeria\Kernel\AbstractClasses\Task; | ||
|
||
/** | ||
* This task is in charge of creating options pages. | ||
* | ||
* @category Kernel | ||
* @package Aeria | ||
* @author Simone Montali <simone.montali@caffeina.com> | ||
* @license https://github.com/caffeinalab/aeria/blob/master/LICENSE MIT license | ||
* @link https://github.com/caffeinalab/aeria | ||
*/ | ||
class CreateAdminScripts extends Task | ||
{ | ||
public $priority = 6; | ||
public $admin_only = true; | ||
/** | ||
* The main task method. It registers the option pages. | ||
* | ||
* @param array $args the arguments to be passed to the Task | ||
* | ||
* @return void | ||
* | ||
* @access public | ||
* @since Method available since Release 3.0.0 | ||
*/ | ||
public function do(array $args) | ||
{ | ||
add_action( | ||
'admin_head', | ||
function () use ($args) { | ||
global $_wp_admin_css_colors; | ||
$admin_colors = $_wp_admin_css_colors; | ||
$aeria_colors = $admin_colors[get_user_option('admin_color')]->colors; | ||
$args['service']['render_engine']->render('color_encoder_template', ['colors' => $aeria_colors]); | ||
} | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters