-
Notifications
You must be signed in to change notification settings - Fork 43
/
test.php
79 lines (63 loc) · 1.67 KB
/
test.php
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
// Template Name: FEE Debug
add_action( 'wp_head', function() { ?>
<style>
#fee-option-test {
border: 1px solid gray;
padding: 5px;
}
</style>
<?php });
get_header();
fee_inject_dummy_post();
the_post();
?>
<div id="primary">
<div id="content" role="main">
<?php get_template_part( 'content', 'page' ); ?>
<strong>Input post meta:</strong><br>
<div><?php editable_post_meta(get_the_ID(), 'price', 'input' ); ?></div>
<strong>Rich post meta:</strong><br>
<?php echo wpautop( editable_post_meta(get_the_ID(), 'degrees', 'rich', false ) ); ?>
<strong>Dropdown post meta:</strong><br>
<div><?php editable_post_meta( get_the_ID(), 'my_key', array(
'type' => 'select',
'values' => array(
'val_1' => 'Title 1',
'val_2' => 'Title 2'
)
) );
?></div>
<div id="fee-option-test" class="fee-group">
<div class="fee-buttons"></div>
<strong>Input option:</strong><br>
<div><?php editable_option( array(
'key' => 'price',
'type' => 'input',
) ); ?></div>
<strong>Dropdown option:</strong><br>
<div><?php editable_option( array(
'key' => 'country',
'type' => 'select',
'values' => array(
'fr' => 'France',
'it' => 'Italy',
'ch' => 'China',
),
) ); ?></div>
</div>
<strong>Post excerpt:</strong><br>
<?php the_excerpt(); ?>
<div style="overflow:hidden">
<strong>Editable image:</strong><br>
<?php editable_image( 'test', 'http://wp.dev/wp-content/themes/twentyeleven/images/headers/wheel-thumbnail.jpg' ); ?>
</div>
<?php
if ( function_exists( 'get_the_post_thumbnail' ) ) {
echo '<strong>Post thumbnail:</strong><br>';
echo get_the_post_thumbnail( get_queried_object_id() );
}
?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>