Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Reg-Log

EIn Plugin von Elektroniker

<?php
/*
Plugin Name: Test Plugin
Plugin URI: http://www.widgetifyr.com
Description: Test Plugin
Author: widgetifyr.com
Version: 0.01
Author URI: http://www.widgetifyr.com

*/


// We're putting the plugin's functions inside the init function to ensure the
// required Sidebar Widget functions are available.
  
  function widget_Log_Reg_init() 
	  {
	  /* Your custom code starts here */
	  /* ---------------------------- */
	  
	  /* Your Function */
	  function Log_Reg()
	  {
		  
		  /* Your Code ----------------- */ 
		  
		  
/*
Plugin Name: Login/Register
Plugin URI: http://spaceelite.esy.es/index
Description: Das Widget für Login/Registartion
Author: Elektroniker
Version: 0.2
Author URI: http://spaceelite.esy.es/index
*/


	// We're putting the plugin's functions inside the init function to ensure the
	// required Sidebar Widget functions are available.
	
	function widget_userInfo_init() 
	{
	
		
		
		function userInfo()
		
			
		
			
			echo "<ul>";
			wp_register(); 
			echo "<li>";
			wp_loginout(); 
            echo "</li>";
			echo "</ul>";
			
			
			
		
		function widget_userInfo($args) 
		{
			
	  	  // Collect our widget's options, or define their defaults.
		  $options = get_option('widget_userInfo');
		  $title = empty($options['title']) ? __('User Info') : $options['title'];
			
		  extract($args);
		  echo $before_widget;
		  echo $before_title;
		  echo $title;
		  echo $after_title;
		  userInfo();
		  echo $after_widget;
	  }  
	  
	  // This is the function that outputs the form to let users edit
	  // the widget's title. It's an optional feature, but were're doing 
	  // it all for you so why not!
				
	  function widget_userInfo_control()
	  {
					
	    // Collect our widget options.
		$options = $newoptions = get_option('widget_userInfo');
					
		// This is for handing the control form submission.
		if ( $_POST['widget_userInfo-submit'] ) 
		{
		  // Clean up control form submission options
		  $newoptions['title'] = strip_tags(stripslashes($_POST['widget_userInfo-title']));
		}
							
		// If original widget options do not match control form
		// submission options, update them.
		if ( $options != $newoptions ) 
		{
		  $options = $newoptions;
		  update_option('widget_userInfo', $options);
		}
									
		$title = attribute_escape($options['title']);
									
		echo '<p><label for="userInfo-title">';
		echo 'Title: <input style="width: 250px;" id="widget_userInfo-title" name="widget_userInfo-title" type="text" value="';
		echo $title;
		echo '" />';
		echo '</label></p>';
		echo '<input type="hidden" id="widget_userInfo-submit" name="widget_userInfo-submit" value="1" />';
	  }
								
								
	  // This registers the widget.
	  register_sidebar_widget('User Info', 'widget_userInfo');
								
	  // This registers the (optional!) widget control form.
	  register_widget_control('User Info', 'widget_userInfo_control');
								
	}
							
	add_action('plugins_loaded', 'widget_userInfo_init');
							

							

		  
		  /* End of Your Code ---------- */
		  
	  }
	  
	  /* -------------------------- */
	  /* Your custom code ends here */
	  
	  function widget_Log_Reg($args) 
	  {
	  
	  	  // Collect our widget's options, or define their defaults.
		  $options = get_option('widget_Log_Reg');
		  $title = empty($options['title']) ? __('Log_Reg') : $options['title'];
			
		  extract($args);
		  echo $before_widget;
		  echo $before_title;
		  echo $title;
		  echo $after_title;
		  Log_Reg();
		  echo $after_widget;
	  }  
	  
	  // This is the function that outputs the form to let users edit
	  // the widget's title. It's an optional feature, but were're doing 
	  // it all for you so why not!
	  
	  function widget_Log_Reg_control()
	  {
	  
		// Collect our widget options.
		$options = $newoptions = get_option('widget_Log_Reg');
		
		// This is for handing the control form submission.
		if ( $_POST['widget_Log_Reg-submit'] ) 
		{
			// Clean up control form submission options
			$newoptions['title'] = strip_tags(stripslashes($_POST['widget_Log_Reg-title']));
		}
				
		// If original widget options do not match control form
		// submission options, update them.
		if ( $options != $newoptions ) 
		{
			$options = $newoptions;
			update_option('widget_Log_Reg', $options);
		}
						
		$title = attribute_escape($options['title']);

		echo '<p><label for="Log_Reg-title">';
		echo 'Title: <input style="width: 250px;" id="widget_Log_Reg-title" name="widget_Log_Reg-title" type="text" value="';
		echo $title;
		echo '" />';
		echo '</label></p>';
		echo '<input type="hidden" id="widget_Log_Reg-submit" name="widget_Log_Reg-submit" value="1" />';
	  }
	  
	  
	// This registers the widget.
    register_sidebar_widget('Log_Reg', 'widget_Log_Reg');
	
	// This registers the (optional!) widget control form.
    register_widget_control('Log_Reg', 'widget_Log_Reg_control');
	
  }
    
  add_action('plugins_loaded', 'widget_Log_Reg_init');

?>