function widget($args, $instance)
 {
     if (!is_array($instance)) {
         $instance = array();
     }
     // Located in the MailChimp plugin. It uses extract() after merging the Arrays, so now we're all good.
     mailchimpSF_signup_form(array_merge($args, $instance));
 }
Exemple #2
0
    function widget($args, $instance)
    {
        // prints the widget
        extract($args, EXTR_SKIP);
        $opt_subscrib = empty($instance['opt_subscrib']) ? '' : apply_filters('widget_opt_subscrib', $instance['opt_subscrib']);
        $id = empty($instance['id']) ? '' : apply_filters('widget_id', $instance['id']);
        if ($opt_subscrib == 'mailchimp') {
            if (function_exists(mailchimpSF_signup_form)) {
                mailchimpSF_signup_form();
            }
        } else {
            if ($opt_subscrib == 'constant_contact') {
                if (function_exists(gConstantcontact)) {
                    gConstantcontact();
                }
            } else {
                ?>
					<div class="widget newsletter" >
        
					<h3><?php 
                echo SUBSCRIBE_TEXT;
                ?>
</h3>
                    <form   action="http://feedburner.google.com/fb/a/mailverify" method="post"  onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=<?php 
                echo $id;
                ?>
', 'popupwindow', 'scrollbars=yes,width=550,height=520');return false;">
                        <input type="text" class="text_bg"  id="subscribe_text" value="<?php 
                echo ENTER_EMAIL_TEXT;
                ?>
" 
                        onfocus="if (this.value == '<?php 
                _e('E-mail adres');
                ?>
') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php 
                _e('E-mail adres', 'templatic');
                ?>
';}" />
                        <input type="hidden" value="<?php 
                echo $id;
                ?>
" name="uri"/><input type="hidden" name="loc" value="en_US"/>
     				<input class="subscribe_submit" type="submit" name="submit" value="Schrijf je in!" /> 
                    </form>	</div>  <!-- #end -->
                    <?php 
            }
        }
        ?>
<!-- subscribe box #end -->
<?php 
    }
Exemple #3
0
function mailchimpSF_shortcode($atts)
{
    ob_start();
    mailchimpSF_signup_form();
    return ob_get_clean();
}
    function widget($atts, $instance)
    {
        extract($atts, EXTR_SKIP);
        echo $before_widget;
        $serialize_ = empty($instance['serialize_']) ? '' : $instance['serialize_'];
        $selected = unserialize($serialize_);
        $output = '';
        if (in_array("mail", $selected)) {
            echo '<div class="mail small_widget">';
            echo '<a href="#" data-box="mail"><i class="moon-envelope-alt"></i>' . __('Mailing List', 'themeple') . '</a>';
            echo '<div class="top_nav_sub mail">';
            mailchimpSF_signup_form();
            echo '</div>';
            echo '</div>';
        }
        if (in_array("search", $selected)) {
            echo '<div class="search small_widget">';
            echo '<a href="#" class="getdata" data-box="search"><i class="moon-search-3"></i>' . __('Search', 'themeple') . '</a>';
            echo '<div class="top_nav_sub search">';
            get_search_form();
            echo '</div>';
            echo '</div>';
        }
        if (in_array("login", $selected)) {
            echo '<div class="login small_widget">';
            echo '<a href="#" data-box="login"><i class="moon-user"></i>' . __('Login', 'themeple') . '</a>';
            echo '<div class="top_nav_sub login">';
            if (!is_user_logged_in()) {
                ?>
               <div class="sub-loggin"> 
                 <form action="<?php 
                echo home_url();
                ?>
/wp-login.php" method="post">
		  	<input type="text" name="log" id="log" value="<?php 
                echo esc_html(stripslashes($user_login));
                ?>
" size="20" placeholder="<?php 
                _e('Username', 'themeple');
                ?>
" />
			<input type="password" name="pwd" id="pwd" size="20" placeholder="<?php 
                _e('Password', 'themeple');
                ?>
"/>
			<input type="submit" name="submit" value="Send" class="button" />
    		<p>
    		 <div class="check-login">	
       			<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
       		</div>
       			<input type="hidden" name="redirect_to" value="<?php 
                echo $_SERVER['REQUEST_URI'];
                ?>
" />
    		</p>
		  </form>
		  <a href="<?php 
                echo home_url();
                ?>
/wp-login.php?action=lostpassword">Recover password</a> </div><?php 
            } else {
                ?>
			<div class="aaaa">
			<a href="<?php 
                echo wp_logout_url();
                ?>
"> Logout </a>
			<a href="<?php 
                echo home_url();
                ?>
/wp-admin/"> Administration  </a>
                     </div>
                     <?php 
            }
            echo '</div>';
            echo '</div>';
        }
        if (in_array("multilanguage", $selected)) {
            echo '<div class="multilanguage small_widget">';
            echo '<a href="#" data-box="multilanguage"><i class="moon-flag"></i>' . __('Select Language', 'themeple') . '</a>';
            echo '<div class="top_nav_sub multilanguage aaaa">';
            echo qtrans_generateLanguageSelectCode('image');
            echo '</div>';
            echo '</div>';
        }
        ?>


        <?php 
        echo $after_widget;
    }
 function widget($args, $instance)
 {
     if (!is_array($instance)) {
         $instance = array();
     }
     mailchimpSF_signup_form(array_merge($args, $instance));
 }
    public function widget($args, $instance)
    {
        extract($args);
        $mailchimp = false;
        // these are the widget options
        if ($instance['button']) {
            $button = trim($instance['button']);
        } else {
            $button = 'Submit';
        }
        //end if( $instance['button'] )
        if ($instance['text']) {
            $text = trim(base64_decode($instance['text']));
        } else {
            $text = '<span>We equip startups for growth. Join our mailing list for updates.</span>';
        }
        //end if( $instance['text'] )
        echo $before_widget;
        // Display the widget
        //left text
        echo '
		<div class="tekserve-studio-simple-footer-left">
			' . $text . '
		</div>';
        //the form content iteself
        echo '
		<div class="tekserve-studio-simple-footer-right">';
        if (function_exists('mailchimpSF_signup_form')) {
            mailchimpSF_signup_form();
            $mailchimp = true;
        } else {
            echo '<form class="tekserve-studio-simple-footer-form">
						<input type="email" name="tekserve-studio-simple-footer-email" id="tekserve-studio-simple-footer-email" placeholder="email address" />
						<button class "btn btn-outline" type="submit">' . $button . '</button>
					</form>';
        }
        //end if( function_exists( 'mailchimpSF_signup_form' ) )
        echo '
		</div>';
        //the close button
        echo '
		<div class="tekserve-studio-simple-footer-close">
			<i class="fa fa-times"></i>
		</div>';
        echo $after_widget;
    }
 function mailchimpSF_display_widget($args = array())
 {
     mailchimpSF_signup_form($args);
 }
 function widget($args, $instance)
 {
     mailchimpSF_signup_form(array_merge($args, $instance));
 }