-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass.settings.php
More file actions
executable file
·53 lines (38 loc) · 1.06 KB
/
class.settings.php
File metadata and controls
executable file
·53 lines (38 loc) · 1.06 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
*
* This class is responsible for creating custom options used by both Aesop Story Engine and Lasso
*
*/
class aesopScrollitSettings {
function __construct(){
// if you arent using Lasso then this filter isnt needed
add_filter('lasso_custom_options', array($this,'options'));
// if you arent using aesop story engine then this filter isnt needed
add_filter('aesop_avail_components', array($this, 'options') );
}
/**
*
* This adds our options into the generator for both Lasso and Aesop Story Engine
*
*/
function options($shortcodes) {
$custom = array(
'scrollit' => array(
'name' => 'Scrollit', // name of the component
'type' => 'wrap', // single - wrap
'atts' => array(
'img' => array(
'type' => 'media_upload',
'default' => '',
'desc' => __( 'Image', 'aesop-core' ),
'tip' => __( 'Upload a background image for this component.', 'aesop-core' )
)
),
'content' => ''
)
);
return array_merge( $shortcodes, $custom );
}
}
new aesopScrollitSettings;