public static function add_test_subscribers($post)
 {
     if (isset($post['count'])) {
         $count = $post['count'];
         for ($c = 0; $c < $count; $c++) {
             EZP_CS_Query_Utility::add_new_subscriber("person-{$c}", "{$c}@gmail.com");
         }
     } else {
         EZP_CS_Utility::debug('Count parameter not set for add_test_subscribers!');
     }
 }
 function __construct()
 {
     $this->headline = EZP_CS_Utility::__("Coming soon");
     $this->description = EZP_CS_Utility::__("Our exciting new website is coming soon! Check back later.");
     $this->disclaimer = EZP_CS_Utility::__("We won't spam you or sell your email address. Pinky swear.");
     $this->footer = EZP_CS_Utility::__("(C)2014 My Company LLC");
     $this->email_placeholder_text = EZP_CS_Utility::__("Enter email");
     $this->name_placeholder_text = EZP_CS_Utility::__("Enter name");
     $this->email_button_text = EZP_CS_Utility::__("Subscribe");
     $this->thank_you_headline = EZP_CS_Utility::__("Thank you!");
     $this->thank_you_description = EZP_CS_Utility::__("You'll hear from us when we launch.");
     $this->title = EZP_CS_Utility::__("Coming soon");
     $this->countdown_due_date = "";
     parent::__construct();
 }
 public static function add_new_subscriber($friendly_name, $email_address)
 {
     $error_text = null;
     $friendly_name = sanitize_text_field($friendly_name);
     $email_address = sanitize_text_field($email_address);
     if (strlen($friendly_name) > 255) {
         $error_text = EZP_CS_Utility::__('Name is too long') . '.';
     }
     if (!is_email($email_address) || strlen($email_address) > 255) {
         $error_text = EZP_CS_Utility::__('Email address is not valid') . '.';
     }
     // Note: If error with entity, silently let it go. No sense telling user, just admin.
     if ($error_text == null) {
         $contact = new EZP_Contact_Entity();
         $contact->friendly_name = $friendly_name;
         if ($contact->save()) {
             $email = new EZP_Email_Entity();
             $email->email_address = $email_address;
             $email->contact_id = $contact->id;
             if ($email->save()) {
                 $cse = new EZP_CS_Subscriber_Entity();
                 $cse->contact_id = $contact->id;
                 if (!$cse->save()) {
                     EZP_CS_Utility::debug('add_new_subscriber:Error saving subscriber entity to deleting email and contact');
                     $email->delete();
                     $contact->delete();
                 }
             } else {
                 EZP_CS_Utility::debug('add_new_subscriber:Error saving email entity so deleting contact');
                 $contact->delete();
             }
         } else {
             EZP_CS_Utility::debug('add_new_subscriber:Error saving contact entity');
         }
     }
     return $error_text;
 }
                <p>Import the saved CSV file into one of the following providers or use your own.</p>
                <div style="height:100px">
                    <div class='ezp-cs-mail-provider' style="margin-left:0px;"><a href="http://easypiewp.com/aweber" target="_blank"><img src="<?php 
echo EZP_CS_Utility::$PLUGIN_URL . '/images/affiliates/aweber-200.png';
?>
 "/></a></div>
                    <div class='ezp-cs-mail-provider'><a href="http://easypiewp.com/getresponse" target="_blank"><img src="<?php 
echo EZP_CS_Utility::$PLUGIN_URL . '/images/affiliates/getresponse-200.png';
?>
 "/></a></div>
                    <div class='ezp-cs-mail-provider'><a href="http://easypiewp.com/MadMimi" target="_blank"><img src="<?php 
echo EZP_CS_Utility::$PLUGIN_URL . '/images/affiliates/mad-mimi2-200.png';
?>
 "/></a></div>
                    <div class='ezp-cs-mail-provider' style="clear:right"><a href="http://easypiewp.com/mailchimp" target="_blank"><img src="<?php 
echo EZP_CS_Utility::$PLUGIN_URL . '/images/affiliates/mailchimp-200.png';
?>
 "/></a></div>
                </div>
            </div>
            <p style="margin-left:8px;margin-top:10px;font-style:italic; clear:both">
            <small style="margin-top:17px; ">AutoSync your subscribers to MailChimp with <a style="color:red" target="_blank" href="http://easypiewp.com">Coming Soon Page Elite</a></small>
            </p>
        </div>
    </div>
    <div id="easy-pie-cs-delete-confirm" title="<?php 
EZP_CS_Utility::_e('Delete User?');
?>
" >
        <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><span id='easy-pie-cs-delete-confirm-text'></span></p>
    </div>         
Ejemplo n.º 5
0
        <form id="easy-pie-cs-main-form" method="post" action="<?php 
echo admin_url('admin.php?page=' . EZP_CS_Constants::$SUBSCRIBERS_SUBMENU_SLUG . '&tab=' . $active_tab);
?>
" > 
            <?php 
//  settings_fields(EZP_CS_Constants::MAIN_PAGE_KEY);
//do_settings_sections(EZP_CS_Constants::MAIN_PAGE_KEY);
?>
      
            <div id='tab-holder'>
                <?php 
if ($active_tab == 'list') {
    include 'page-subscribers-list-tab.php';
} else {
    include 'page-subscribers-newsletter-tab.php';
}
?>
         
            </div>             
        
            <?php 
EZP_CS_Utility::echo_footer_links();
?>
        </form>
        
        
        
    </div>
</div>

 function __construct()
 {
     parent::__construct(self::$TABLE_NAME);
     $this->public_id = EZP_CS_Utility::get_guid();
     $this->creation_date = date("Y-m-d H:i:s");
 }
</div>


<div class="postbox" >
    <div class="inside" >
        <h3 style="float:left;" ><span style="font-weight:bold"><?php 
EZP_CS_Utility::_e('Advanced');
?>
<span></h3>
                    <table class="form-table">
                        <tr valign="top">
                            <th scope="row"><?php 
EZP_CS_Utility::_e("Custom CSS");
?>
</th><td>
                                <div>
                                    <textarea cols="67" rows="9" id="easy-pie-cs-field-junk" name="css"><?php 
echo $display->css;
?>
</textarea>
                                </div>             
                            </td>
                        </tr>
                    </table>

                    <div style="margin-top:4px;"><a target="_blank" href="http://easypiewp.com/coming-soon-plugin-css-tips"><span class="description"><?php 
EZP_CS_Utility::_e('CSS Customization tips');
?>
</span></a></div>
                    </div>
                    </div>
 private static function get_instance_from_row($row, $class_name, $table_name)
 {
     $instance = new $class_name();
     $instance->id = $row->id;
     $instance->table_name = $table_name;
     $properties = EZP_CS_Utility::get_public_class_properties($class_name);
     foreach ($properties as $prop_name => $prop_value) {
         if (property_exists($row, $prop_name)) {
             $instance->{$prop_name} = $row->{$prop_name};
         }
     }
     return $instance;
 }
Ejemplo n.º 9
0
 function __construct()
 {
     $this->name = EZP_CS_Utility::__("Main Email");
     parent::__construct(self::$TABLE_NAME);
 }
Ejemplo n.º 10
0
                        <tr>
                            <td style="padding-left:0; padding-bottom:0;" colspan="2">
                                <small>Advanced Access Control available in <a style="color:red" href="http://easypiewp.com" target="_blank">Coming Soon Page Elite</a></small>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>    

<?php 
submit_button();
?>
            <a href="http://easypiewp.com/easy-pie-coming-soon-faq" target="_blank"><?php 
EZP_CS_Utility::_e('FAQ');
?>
</a>
            |
            <a href="http://wordpress.org/support/view/plugin-reviews/easy-pie-coming-soon" target="_blank"><?php 
echo EZP_CS_Utility::__('Rate');
?>
</a>
            |            
            <a href="http://easypiewp.com/about/" target="_blank"><?php 
EZP_CS_Utility::_e('Contact');
?>
</a>
        </form>
    </div>
</div>

Ejemplo n.º 11
0
 public static function uninstall()
 {
     EZP_CS_Utility::debug("uninstall");
 }
Ejemplo n.º 12
0
 public static function debug_dump($message, $object)
 {
     EZP_CS_Utility::debug($message . ":" . var_export($object, true));
 }
Ejemplo n.º 13
0
<div class="postbox" >
    <div class="inside" >
        <h3 ><?php 
EZP_CS_Utility::_e("Countdown");
?>
</h3>
        <table class="form-table"> 
            <tr>
                <th scope="row">
                    <?php 
echo EZP_CS_Utility::_e("Due Date");
?>
                </th>
                <td>
                    <div class="compound-setting">                            
                        <input style="width:130px;" id="ezp-countdown-due-date" class="long-input" name="countdown_due_date" type="text" value="<?php 
EZP_CS_Utility::_he($content->countdown_due_date);
?>
" />
                        <div><span class="description"><?php 
EZP_CS_Utility::_e('Countdown timer will display when populated');
?>
</span></div>
                    </div>
                </td>
            </tr>


        </table>
    </div></div>
 private static function render_font_options($current_font_name_value)
 {
     EZP_CS_Utility::render_option("arial", EZP_CS_Utility::__("Arial"), $current_font_name_value);
     EZP_CS_Utility::render_option("courier-new", EZP_CS_Utility::__("Courier New"), $current_font_name_value);
     EZP_CS_Utility::render_option("comic-sans-ms", EZP_CS_Utility::__("Comic Sans MS"), $current_font_name_value);
     EZP_CS_Utility::render_option("georgia", EZP_CS_Utility::__("Georgia"), $current_font_name_value);
     EZP_CS_Utility::render_option("impact", EZP_CS_Utility::__("Impact"), $current_font_name_value);
     EZP_CS_Utility::render_option("times-new-roman", EZP_CS_Utility::__("Times New Roman"), $current_font_name_value);
     EZP_CS_Utility::render_option("verdana", EZP_CS_Utility::__("Verdana"), $current_font_name_value);
 }
 public static function get_by_id_and_type($id, $type, $table_name = self::DEFAULT_TABLE_NAME)
 {
     global $wpdb;
     $table_name = $wpdb->prefix . $table_name;
     $query_string = "SELECT * FROM " . $table_name;
     $query_string .= " WHERE id = %d;";
     $prepped = $wpdb->prepare($query_string, $id);
     $row = $wpdb->get_row($prepped);
     if ($row != NULL) {
         $instance = new $type();
         $instance->id = $row->id;
         $instance->type = $row->type;
         $instance->table_name = $table_name;
         $data = json_decode($row->data);
         foreach ($data as $property_name => $property_value) {
             $instance->{$property_name} = $property_value;
         }
         return $instance;
     } else {
         EZP_CS_Utility::debug('get_by_id_and_type: row is null');
         return null;
     }
 }
Ejemplo n.º 16
0
                        <!-- Setting: {{name-collection-on}}-->
                        <div id="name-form-group" class="form-group">
                            <label class="sr-only" for="ezp_cs_name"><?php 
EZP_CS_Utility::_e("Name");
?>
</label>
                            <!-- Setting: {{name-placeholder}}-->
                            <input id="name-input" name="ezp_cs_name" type="text" class="form-control" placeholder="<?php 
echo $content->name_placeholder_text;
?>
"/>
                        </div>
                        <div id="email-form-group" class="form-group">
                            <label class="sr-only" for="ezp_cs_email"><?php 
EZP_CS_Utility::_e("Email");
?>
</label>                            
                            <input required id="email-input" name="ezp_cs_email" type="email" class="form-control" placeholder="<?php 
echo $content->email_placeholder_text;
?>
"/>
                        </div>

                        <button id="email-submit-button" form="email-collection-box" type="submit" class="btn btn-danger"><?php 
echo $content->email_button_text;
?>
</button>                        
                        <div id="error-block"><?php 
if ($error_text != null) {
    echo $error_text;