-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclass.backend.php
More file actions
34 lines (27 loc) · 917 Bytes
/
class.backend.php
File metadata and controls
34 lines (27 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
*
* This file deals with adding our custom component to Aesop Story Engine backend interface
* Note: If you're using this sample addon strictly for Lasso and will not require Aesop Story Engine, this file is not needed
*/
class myCustomComponentBack {
function __construct(){
add_action('aesop_admin_styles', array($this, 'icon') );
}
/**
*
* This appends an inline style right after the aesop admin style sheet
* It's used for adding in an icon into the generator. It uses dashicons, so refer
* to the url here to get the code you need
* http://melchoyce.github.io/dashicons/
*
* Note: expect this to possibly change in the future
*
*/
function icon(){
$icon = '\f164'; //css code for dashicon
$slug = 'test'; // name of component
wp_add_inline_style('ai-core-styles', '#aesop-generator-wrap li.'.$slug.' a:before {content: "'.$icon.'";}');
}
}
new myCustomComponentBack;