Ready to get started?Download WordPress


Aesthetics (1 post)

  1. Khairul
    Posted 3 years ago #

    Made a small tweak to the code, for aesthetics. Hehe...

    Here's the edited portion:

    // login_out_menu() displays the page content for the Login & Out admin submenu
    function login_out_menu() { ?>
    	<div class="wrap">
    		<h2>Login and Out Configuration</h2>
    		if ( isset ($_POST['update_loginout']) )  {
    			if ( !wp_verify_nonce ( $_POST['loginout-verify-key'], 'loginout') )
    				die(__('Failed security check. Reload page and retry','hypervisor-login-logout'));
            			if ( $_POST['insert_php'] == 'php' ) update_option ( 'rh_insert_php', '1' );
    					update_option ( 'rh_insert_php', '0' );
    		$options["display_email"] = $_POST['edisplay_email'];
    		$options["hide_register"] = $_POST['ehide_register'];
    		$options["hide_option_label"] = $_POST['ehide_option_label'];
    		$options["before_html"] = $_POST['ebefore_html'];
    		$options["after_html"] = $_POST['eafter_html'];
    	        update_option ( 'rh_hidedash_options', $options ); ?>
    		<div id="message" class="updated fade">
    			<p><strong><?php _e('Login and Out options updated.','hypervisor-login-logout'); ?></strong></p>
    		} // end if isset
    		<form name="form1" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
    		<div class="form-field">
    			<?php echo '<input type="hidden" name="loginout-verify-key" id="loginout-verify-key" value="' . wp_create_nonce('loginout') . '" />';
    			$options = get_option('rh_hidedash_options');
    			$insert_php = get_option ( 'rh_insert_php' );
    			$before_html = stripslashes($options['before_html']);
    			$after_html = stripslashes($options['after_html']);
    			echo "<h3>". __('How to display Login Logout','hypervisor-login-logout'). "</h3>";
    			echo "<p>". __('Display the plugin by placing the widget in a sidebar or by inserting "&lt&#63php rh_hype_lilo();&#63&gt" into your template file(s).','hypervisor-login-logout'). "</p>";
    			<tr><td><label for="edisplay_email"><?php _e('Display email address: ','hypervisor-login-logout'); ?></td><td><input type="checkbox" <?php if ( $options["display_email"] == '1' ) echo 'checked="yes" '?> name="edisplay_email" id="edisplay_email" value="1" /></label></td></tr>
    			<tr><td><label for="ehide_option_label"><?php _e('Hide option label: ','hypervisor-login-logout'); ?></td><td><input type="checkbox" <?php if ( $options["hide_option_label"] == '1' ) echo 'checked ' ?> name="ehide_option_label" id="ehide_option_label" value="1" /></label></td></tr>
    			<tr><td><label for="ehide_register"><?php _e('Hide Register link: ','hypervisor-login-logout'); ?></td><td><input type="checkbox" <?php if ( $options["hide_register"] == '1' ) echo 'checked ' ?> name="ehide_register" id="ehide_register" value="1" /></label>
    	<h3><?php _e('Customise Appearance','hypervisor-login-logout');?></h3>
    	<label for="before_html"><?php _e('Insert before Login Logout HTML: (e.g. any valid HTML)','hypervisor-login-logout'); ?> <input type="text" id="ebefore_html" name="ebefore_html" value="<?php echo wp_specialchars($before_html) ?>" /></label></td></tr>
    	<tr><td><label for="after_html"><?php _e('Insert after Login Logout HTML: (e.g. any valid HTML)','hypervisor-login-logout'); ?> <input type="text" id="eafter_html" name="eafter_html" value="<?php echo wp_specialchars($after_html) ?>" /></label></td></tr>
    	<p class="submit">
    	<input type="submit" name="update_loginout" value="<?php _e('Submit!','hypervisor-login-logout'); ?>" />

    All is in order...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by Khairul
  • This topic is not a support question
  • WordPress version: 3.1.3