function register_mysettings_facebookpixel()
{
    //register our settings
    register_setting('fbkPixel-settings-group', 'fbk_pixel_id');
    register_setting('fbkPixel-settings-group', 'fbk_pixel_currency');
    register_setting('fbkPixel-custom-settings-group', 'fbk_pixel_custom_id');
    $helper = new HelperPixel();
    $audienceOptions = $helper->getAudienceOptions();
    foreach ($audienceOptions as $option) {
        register_setting('fbkPixel-custom-settings-group', 'fbk_pixel_custom_option_' . $option);
    }
}
Esempio n. 2
0
<?php

$helper = new HelperPixel();
?>


<h1>Facebook Pixel Settings</h1>
<hr>
<div class="wrap">
    <h2>Conversion Pixel ID</h2>
    <p>
        This plugin will add the Facebook Id Code to the head of the wordpress site.
    </p>
    <form method="post" action="options.php">
        <?php 
settings_fields('fbkPixel-settings-group');
?>
        <?php 
do_settings_sections('fbkPixel-settings-group');
?>
        <table class="form-table">
            <tr valign="top">
                <th scope="row">Custom Pixel ID</th>
                <td><input type="text" name="fbk_pixel_id" value="<?php 
echo get_option('fbk_pixel_id');
?>
" /></td>

            </tr>
            <tr valign="top">
                <th scope="row">Currency Code</th>