Version Description
Download this release
Release Info
Developer | RyanNovotny |
Plugin | Pixel Cat – Facebook Pixel (Formerly "Facebook Conversion Pixel") |
Version | 2.4.0 |
Comparing to | |
See all releases |
Version 2.4.0
- README.md +2 -0
- assets/fatcatapps-logo-text.png +0 -0
- assets/icon.png +0 -0
- assets/pixelcat_icon_128_128_360.png +0 -0
- assets/pixelcat_icon_256_256_360.png +0 -0
- deprecated/facebook-conversion-pixel.php +122 -0
- deprecated/includes/admin.php +172 -0
- deprecated/includes/cmb2/bootstrap.php +41 -0
- deprecated/includes/cmb2/css/cmb2.css +3447 -0
- deprecated/includes/cmb2/css/cmb2.css.map +7 -0
- deprecated/includes/cmb2/css/cmb2.min.css +1 -0
- deprecated/includes/cmb2/css/index.php +0 -0
- deprecated/includes/cmb2/css/sass/cmb2.scss +13 -0
- deprecated/includes/cmb2/css/sass/index.php +0 -0
- deprecated/includes/cmb2/css/sass/partials/_collapsible_ui.scss +52 -0
- deprecated/includes/cmb2/css/sass/partials/_jquery_ui.scss +388 -0
- deprecated/includes/cmb2/css/sass/partials/_main_wrap.scss +438 -0
- deprecated/includes/cmb2/css/sass/partials/_misc.scss +20 -0
- deprecated/includes/cmb2/css/sass/partials/_mixins.scss +40 -0
- deprecated/includes/cmb2/css/sass/partials/_post_metaboxes.scss +114 -0
- deprecated/includes/cmb2/css/sass/partials/_sidebar_placements.scss +164 -0
- deprecated/includes/cmb2/css/sass/partials/_variables.scss +22 -0
- deprecated/includes/cmb2/css/sass/partials/index.php +0 -0
- deprecated/includes/cmb2/images/ico-delete.png +0 -0
- deprecated/includes/cmb2/images/index.php +0 -0
- deprecated/includes/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- deprecated/includes/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- deprecated/includes/cmb2/images/ui-icons_222222_256x240.png +0 -0
- deprecated/includes/cmb2/images/ui-icons_2e83ff_256x240.png +0 -0
- deprecated/includes/cmb2/images/ui-icons_454545_256x240.png +0 -0
- deprecated/includes/cmb2/images/ui-icons_888888_256x240.png +0 -0
- deprecated/includes/cmb2/images/ui-icons_cd0a0a_256x240.png +0 -0
- deprecated/includes/cmb2/includes/CMB2.php +945 -0
- deprecated/includes/cmb2/includes/CMB2_Ajax.php +209 -0
- deprecated/includes/cmb2/includes/CMB2_Boxes.php +36 -0
- deprecated/includes/cmb2/includes/CMB2_Field.php +929 -0
- deprecated/includes/cmb2/includes/CMB2_Options.php +187 -0
- deprecated/includes/cmb2/includes/CMB2_Sanitize.php +362 -0
- deprecated/includes/cmb2/includes/CMB2_Show_Filters.php +168 -0
- deprecated/includes/cmb2/includes/CMB2_Types.php +991 -0
- deprecated/includes/cmb2/includes/CMB2_Utils.php +181 -0
- deprecated/includes/cmb2/includes/CMB2_hookup.php +413 -0
- deprecated/includes/cmb2/includes/helper-functions.php +284 -0
- deprecated/includes/cmb2/includes/index.php +0 -0
- deprecated/includes/cmb2/index.php +0 -0
- deprecated/includes/cmb2/init.php +133 -0
- deprecated/includes/cmb2/js/cmb2.js +883 -0
- deprecated/includes/cmb2/js/cmb2.min.js +1 -0
- deprecated/includes/cmb2/js/index.php +0 -0
- deprecated/includes/cmb2/js/jquery-ui-timepicker-addon.min.js +5 -0
- deprecated/includes/cmb2/languages/cmb2-ach.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-af.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-ar.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-az.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-be_BY.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-bg_BG.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-bn_BD.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-br.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-bs_BA.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-ca.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-co.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-cs_CZ.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-cy.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-da_DK.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-de_AT.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-de_DE.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-el.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-en@pirate.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-en_GB.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-en_US.mo +0 -0
- deprecated/includes/cmb2/languages/cmb2-en_US.po +433 -0
- deprecated/includes/cmb2/languages/cmb2-eo.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-es_AR.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-es_CL.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-es_ES.mo +0 -0
- deprecated/includes/cmb2/languages/cmb2-es_ES.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-es_MX.mo +0 -0
- deprecated/includes/cmb2/languages/cmb2-es_MX.po +433 -0
- deprecated/includes/cmb2/languages/cmb2-es_PE.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-es_VE.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-et.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-eu.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-fa.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-fa_IR.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-fi.mo +0 -0
- deprecated/includes/cmb2/languages/cmb2-fi.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-fo.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-fr_FR.mo +0 -0
- deprecated/includes/cmb2/languages/cmb2-fr_FR.po +435 -0
- deprecated/includes/cmb2/languages/cmb2-ga.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-gl_ES.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-gu_IN.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-he_IL.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-hi_IN.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-hr.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-hu_HU.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-hy.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-id.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-id_ID.mo +0 -0
- deprecated/includes/cmb2/languages/cmb2-id_ID.po +433 -0
- deprecated/includes/cmb2/languages/cmb2-is_IS.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-it_IT.po +437 -0
- deprecated/includes/cmb2/languages/cmb2-ja.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-jv.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-ka.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-kk.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-km.po +434 -0
- deprecated/includes/cmb2/languages/cmb2-ko_KR.po +352 -0
README.md
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
# Pixel Cat
|
2 |
+
Facebook Pixels For WordPress Made Easy
|
assets/fatcatapps-logo-text.png
ADDED
Binary file
|
assets/icon.png
ADDED
Binary file
|
assets/pixelcat_icon_128_128_360.png
ADDED
Binary file
|
assets/pixelcat_icon_256_256_360.png
ADDED
Binary file
|
deprecated/facebook-conversion-pixel.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Insert Facebook Conversion Pixel
|
5 |
+
* @since 1.0
|
6 |
+
*/
|
7 |
+
function fb_pxl_head() {
|
8 |
+
$post_type = get_post_type();
|
9 |
+
$fb_pxl_options = get_option( 'fb_pxl_options' );
|
10 |
+
|
11 |
+
// If user has enabled this post type
|
12 |
+
if ( isset( $fb_pxl_options[ $post_type ] ) && 'on' === $fb_pxl_options[ $post_type ] ) {
|
13 |
+
$fb_pxl_switch = get_post_meta( get_the_id(), 'fb_pxl_checkbox', true );
|
14 |
+
|
15 |
+
// If user has chosen to insert code, insert it
|
16 |
+
if ( 'on' === $fb_pxl_switch ) {
|
17 |
+
$nonce = wp_create_nonce( 'fb-pxl-nonce' );
|
18 |
+
fb_pxl_insert_facebook_conversion_pixel( $nonce );
|
19 |
+
}
|
20 |
+
}
|
21 |
+
}
|
22 |
+
add_action( 'wp_head', 'fb_pxl_head' );
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Insert Facebook Conversion Pixel
|
26 |
+
* @since 1.3.2.
|
27 |
+
*/
|
28 |
+
function fb_pxl_insert_facebook_conversion_pixel( $nonce ) {
|
29 |
+
|
30 |
+
// If this function has been called from somewhere other than fb_pxl_head(), bail.
|
31 |
+
if ( ! wp_verify_nonce( $nonce, 'fb-pxl-nonce' ) ) {
|
32 |
+
exit;
|
33 |
+
}
|
34 |
+
|
35 |
+
// Output code
|
36 |
+
$fb_pxl_code = get_post_meta( get_the_id(), 'fb_pxl_conversion_code', true);
|
37 |
+
if ( ! empty( $fb_pxl_code ) ) {
|
38 |
+
echo htmlspecialchars_decode( $fb_pxl_code );
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Include plugin admin dependencies
|
44 |
+
* @since 1.0
|
45 |
+
*/
|
46 |
+
function fb_pxl_admin_includes() {
|
47 |
+
|
48 |
+
if ( ! is_admin() ) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
|
52 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/admin.php' );
|
53 |
+
require_once( plugin_dir_path( __FILE__ ) . '/includes/cmb2/init.php' );
|
54 |
+
}
|
55 |
+
add_action( 'init', 'fb_pxl_admin_includes' );
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Display meta box in admin
|
59 |
+
* @since 1.2
|
60 |
+
*/
|
61 |
+
function fb_pxl_display_meta_box() {
|
62 |
+
$prefix = 'fb_pxl_';
|
63 |
+
|
64 |
+
$options = get_option( 'fb_pxl_options' );
|
65 |
+
$post_types = array();
|
66 |
+
foreach ( $options as $post_type => $checkbox ) {
|
67 |
+
if ( 'on' == $checkbox ) {
|
68 |
+
array_push( $post_types, $post_type );
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
$metabox = new_cmb2_box( array(
|
73 |
+
'id' => $prefix . 'metabox',
|
74 |
+
'title' => 'Facebook Conversion Pixel',
|
75 |
+
'object_types' => $post_types,
|
76 |
+
'context' => 'normal',
|
77 |
+
'priority' => 'high',
|
78 |
+
'show_names' => true,
|
79 |
+
) );
|
80 |
+
|
81 |
+
$metabox->add_field( array(
|
82 |
+
'name' => __( 'Insert Code', 'facebook-conversion-pixel' ),
|
83 |
+
'desc' => __( 'Insert Facebook Conversion Pixel code on this page', 'facebook-conversion-pixel' ),
|
84 |
+
'id' => $prefix . 'checkbox',
|
85 |
+
'type' => 'checkbox',
|
86 |
+
) );
|
87 |
+
|
88 |
+
$metabox->add_field( array(
|
89 |
+
'name' => __( 'Conversion Pixel', 'facebook-conversion-pixel' ),
|
90 |
+
'desc' => __( 'Paste your Facebook Conversion Pixel code here', 'facebook-conversion-pixel' ),
|
91 |
+
'id' => $prefix . 'conversion_code',
|
92 |
+
'type' => 'textarea_code',
|
93 |
+
) );
|
94 |
+
}
|
95 |
+
add_filter( 'cmb2_init', 'fb_pxl_display_meta_box' );
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Display settings link on WP plugin page
|
99 |
+
* @since 1.0
|
100 |
+
*/
|
101 |
+
function fb_pxl_plugin_action_links( $links, $file ) {
|
102 |
+
$plugin_file = 'facebook-conversion-pixel/facebook-conversion-pixel.php';
|
103 |
+
if ( $file == $plugin_file ) {
|
104 |
+
$settings_link = '<a href="' . admin_url( 'admin.php?page=fb_pxl_options' ) . '">' . __( 'Settings', 'facebook-conversion-pixel' ) . '</a>';
|
105 |
+
array_unshift( $links, $settings_link );
|
106 |
+
}
|
107 |
+
return $links;
|
108 |
+
}
|
109 |
+
add_filter( 'plugin_action_links', 'fb_pxl_plugin_action_links', 10, 4 );
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Set default options on activation
|
113 |
+
* @since 1.1
|
114 |
+
*/
|
115 |
+
function fb_pxl_activate() {
|
116 |
+
$options = array(
|
117 |
+
'post' => 'on',
|
118 |
+
'page' => 'on'
|
119 |
+
);
|
120 |
+
update_option( 'fb_pxl_options', $options );
|
121 |
+
}
|
122 |
+
register_activation_hook( __FILE__, 'fb_pxl_activate' );
|
deprecated/includes/admin.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Facebook Conversion Pixel Options
|
4 |
+
* @since 1.0
|
5 |
+
*/
|
6 |
+
class Fb_Pxl_Admin {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Option key, and option page slug
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
public static $key = 'fb_pxl_options';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Define Options array
|
16 |
+
* @var array
|
17 |
+
*/
|
18 |
+
public static $fb_pxl_options;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Constructor
|
22 |
+
* @since 1.0
|
23 |
+
*/
|
24 |
+
public function __construct() {
|
25 |
+
// Set our title
|
26 |
+
$this->title = __( 'Facebook Conversion Pixel', 'facebook-conversion-pixel' );
|
27 |
+
$this->hooks();
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Initiate hooks
|
32 |
+
* @since 1.0
|
33 |
+
*/
|
34 |
+
public function hooks() {
|
35 |
+
add_action( 'admin_init', array( $this, 'init' ) );
|
36 |
+
add_action( 'admin_init', array( $this, 'update_options' ) );
|
37 |
+
|
38 |
+
// Only show plugin settings page for users who can manage options
|
39 |
+
if ( current_user_can( 'manage_options' ) ) {
|
40 |
+
add_action( 'admin_menu', array( $this, 'add_options_page' ) );
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Register setting to WP
|
46 |
+
* @since 1.0
|
47 |
+
*/
|
48 |
+
public function init() {
|
49 |
+
register_setting( self::$key, self::$key );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Update Options Array
|
54 |
+
* @since 1.0
|
55 |
+
*/
|
56 |
+
public function update_options() {
|
57 |
+
|
58 |
+
// If this is not the plugin settings page, bail
|
59 |
+
if ( ! isset( $_GET['page'] ) || 'fb_pxl_options' !== $_GET['page'] ) {
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
|
63 |
+
$options = get_option( 'fb_pxl_options' );
|
64 |
+
$post_types = get_post_types();
|
65 |
+
|
66 |
+
// Remove any options that don't have a corresponding post type
|
67 |
+
if ( $options ) {
|
68 |
+
foreach ( $options as $option_key => $option_value ) {
|
69 |
+
if ( ! array_key_exists( $option_key, $post_types ) ) {
|
70 |
+
unset( $options[ $option_key ] );
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
// Add any post types missing from the options array
|
76 |
+
foreach ( $post_types as $post_type ) {
|
77 |
+
if ( ! array_key_exists( $post_type, $options ) ) {
|
78 |
+
$options[ $post_type ] = '';
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
// Save changes to the options array
|
83 |
+
self::$fb_pxl_options = $options;
|
84 |
+
update_option( 'fb_pxl_options', $options );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Add menu options page
|
89 |
+
* @since 1.0
|
90 |
+
*/
|
91 |
+
public function add_options_page() {
|
92 |
+
$this->options_page = add_options_page( $this->title, $this->title, 'manage_options', self::$key, array( $this, 'admin_page_display' ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Admin page markup
|
97 |
+
* @since 1.0
|
98 |
+
*/
|
99 |
+
public function admin_page_display() {
|
100 |
+
|
101 |
+
// If this is not the plugin settings page, bail
|
102 |
+
if ( ! isset( $_GET['page'] ) || 'fb_pxl_options' !== $_GET['page'] ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
// Only allow users who can manage options
|
107 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
108 |
+
wp_die( 'You do not have sufficient permissions to change options.' );
|
109 |
+
}
|
110 |
+
|
111 |
+
$this->admin_page_setup();
|
112 |
+
?>
|
113 |
+
|
114 |
+
<div class="wrap cmb_options_page <?php echo self::$key; ?>">
|
115 |
+
<a href="<?php echo admin_url( 'options-general.php?page=fb_pxl_options&fca_pc_upgrade=true' ) ?>" class="button button-primary">Upgrade to the new Facebook Pixel</a>
|
116 |
+
|
117 |
+
<h2><?php echo esc_html( get_admin_page_title() ) . ' ' . __( 'Settings', 'facebook-conversion-pixel' ); ?></h2>
|
118 |
+
<form method="post" action="options.php">
|
119 |
+
<?php settings_fields( self::$key ); ?>
|
120 |
+
<?php do_settings_sections( self::$key ); ?>
|
121 |
+
<?php submit_button(); ?>
|
122 |
+
</form>
|
123 |
+
</div>
|
124 |
+
<?php
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Defines the plugin option page sections and fields
|
129 |
+
* @since 1.0
|
130 |
+
* @return array
|
131 |
+
*/
|
132 |
+
public function admin_page_setup() {
|
133 |
+
|
134 |
+
add_settings_section(
|
135 |
+
'fb_pxl_display_on',
|
136 |
+
__( 'Enable Facebook Conversion Pixel field on these post types:', 'facebook-conversion-pixel' ),
|
137 |
+
'',
|
138 |
+
self::$key
|
139 |
+
);
|
140 |
+
|
141 |
+
// Display settings field for each post type
|
142 |
+
if ( ! empty( self::$fb_pxl_options ) ) {
|
143 |
+
foreach ( self::$fb_pxl_options as $option => $value ) {
|
144 |
+
add_settings_field(
|
145 |
+
'fb_pxl_display_on_' . $option,
|
146 |
+
ucfirst( $option),
|
147 |
+
array( $this, 'fb_pxl_display_on_output' ),
|
148 |
+
self::$key,
|
149 |
+
'fb_pxl_display_on',
|
150 |
+
array( $option, $value )
|
151 |
+
);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Display settings field values
|
158 |
+
* @since 1.0
|
159 |
+
*/
|
160 |
+
public function fb_pxl_display_on_output( $args ) {
|
161 |
+
$option_key = $args[ 0 ];
|
162 |
+
$option_value = $args[ 1 ];
|
163 |
+
$html = '<input type="checkbox" id="fb_pxl_disable_' . $option_key . '" name="fb_pxl_options[' . $option_key . ']" value="on"' . checked( $option_value, "on", false ) . '/>';
|
164 |
+
echo $html;
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get the party started
|
170 |
+
* @since 1.0
|
171 |
+
*/
|
172 |
+
$Fb_Pxl_Admin = new Fb_Pxl_Admin();
|
deprecated/includes/cmb2/bootstrap.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Fires when CMB2 is included/loaded
|
5 |
+
*
|
6 |
+
* Should be used to to add metaboxes. See example-functions.php
|
7 |
+
*/
|
8 |
+
do_action( 'cmb2_init' );
|
9 |
+
|
10 |
+
/**
|
11 |
+
* For back-compat. Does the dirtywork of instantiatiating all the
|
12 |
+
* CMB2 instances for the cmb2_meta_boxes filter
|
13 |
+
* @since 2.0.2
|
14 |
+
*/
|
15 |
+
$all_meta_boxes_config = apply_filters( 'cmb2_meta_boxes', array() );
|
16 |
+
foreach ( (array) $all_meta_boxes_config as $meta_box_config ) {
|
17 |
+
new CMB2( $meta_box_config );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Fires after all CMB2 instances are created
|
22 |
+
*/
|
23 |
+
do_action( 'cmb2_init_before_hookup' );
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get all created metaboxes, and instantiate CMB2_hookup
|
27 |
+
* on metaboxes which require it.
|
28 |
+
* @since 2.0.2
|
29 |
+
*/
|
30 |
+
foreach ( CMB2_Boxes::get_all() as $cmb ) {
|
31 |
+
if ( $cmb->prop( 'hookup' ) ) {
|
32 |
+
$hookup = new CMB2_hookup( $cmb );
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Fires after CMB2 initiation process has been completed
|
38 |
+
*/
|
39 |
+
do_action( 'cmb2_after_init' );
|
40 |
+
|
41 |
+
// End. That's it, folks! //
|
deprecated/includes/cmb2/css/cmb2.css
ADDED
@@ -0,0 +1,3447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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