Пример #1
0
				</div>
		  </div>
		</div>
		
		<div class="modal fade" id="registrationmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		  <div class="modal-dialog" role="document">
			<div class="modal-content">
			  <div class="modal-header">
				<img src="/images/logosmall2.png">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">Регистрация</h4>
			  </div>
			  
			  <div class="modal-body">
				<form action="/handler?from=registration" method="post">
				  <div class="form-group">
					<label for="Email">Напишите ваш Email</label>
					<input type="email" class="form-control" name="email" placeholder="Email">
					<img src="/images/forreg.jpg"><br>
				    <input type="submit" class="regbtn btn" value="Зарегистрироваться">
				  </div>
				</form> 
					или <?php 
echo class_exists('VK_api') ? VK_api::get_vk_login() : null;
?>
				
			  </div>			  
			</div>
		  </div>
		</div>	
	</center>	
Пример #2
0
 function widget($args, $instance)
 {
     extract($args);
     $vkapi_divid = $args['widget_id'];
     /** @var $before_widget string */
     /** @var $before_title string */
     /** @var $after_title string */
     /** @var $after_widget string */
     echo $before_widget . $before_title . $instance['Message'] . $after_title . '<div id="' . $vkapi_divid . '_wrapper">';
     if (is_user_logged_in()) {
         $wp_uid = get_current_user_id();
         $ava = get_avatar($wp_uid, 75);
         echo "<div style='display: inline-block; padding-right:20px'>{$ava}</div>";
         echo '<div style="display: inline-block;">';
         $href = site_url('/wp-admin/profile.php');
         $text = __('Profile', $this->plugin_domain);
         echo "<a href='{$href}' title=''>{$text}</a><br /><br />";
         $href = wp_logout_url(home_url($_SERVER['REQUEST_URI']));
         $text = __('Logout', $this->plugin_domain);
         echo "<a href='{$href}' title=''>{$text}</a>";
         echo '</div>';
     } else {
         $href = wp_login_url(home_url($_SERVER['REQUEST_URI']));
         $text = __('Login', $this->plugin_domain);
         $link = wp_register('', '', false);
         echo "<div><a href='{$href}' title=''>{$text}</a></div><br />";
         echo "<div>{$link}</div><br />";
         echo VK_api::get_vk_login();
     }
     echo '</div>' . $after_widget;
 }