-
Notifications
You must be signed in to change notification settings - Fork 0
/
bb-advanced-posts.php
47 lines (42 loc) · 1.08 KB
/
bb-advanced-posts.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
<?php
/*
Plugin Name: Beaver Builder Advanced Posts Module
Plugin URI:
Description: Beaver Builder Advanced Posts Module
Author: Pancake Creative
Version:
Author URI:
*/
define( 'BBAP_MODULES_DIR', plugin_dir_path( __FILE__ ) );
define( 'BBAP_MODULES_URL', plugins_url( '/', __FILE__ ) );
function my_get_field( $field ) {
if ( is_callable('get_field') ) {
return get_field( $field );
} else {
return get_post_meta( get_the_ID(), $field, true );
}
}
function bbap_load_module() {
if ( class_exists( 'FLBuilder' ) ) {
require_once 'bb-advanced-posts-module.php';
}
add_action('wp_footer', function() {
?>
<style type="text/css">
/* CTA */
.fl-post-cta-button {
background-color: #0000ed;
color: #fff;
line-height: 30px;
font-size: 20px;
padding: 0 10px;
display: inline-block;
}
.fl-post-cta-button:hover {
color: #eee;
}
</style>
<?php
});
}
add_action( 'init', 'bbap_load_module' );