Plugin Directory

Changeset 579213


Ignore:
Timestamp:
07/30/2012 02:25:51 PM (13 years ago)
Author:
victor4g
Message:
 
Location:
my-settings/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • my-settings/trunk/mys.php

    r577716 r579213  
    119119    </tr>
    120120    <tr>
    121     <td class="left"></td>
    122     <td class="left" colspan="2"><span class="description"> Change Login URL for custom login page and Redirect URL for redirect after login.</span></td>
     121    <td class="left">Logout Redirect URL:</td>
     122    <td class="left"><input type="text" name="mys_logout_url" size="45" value="<?php echo get_option('mys_logout_url'); ?>" /></td>
     123    <td class="left"></td>
     124    </tr>
     125    <tr>
     126    <td class="left"></td>
     127    <td class="left" colspan="2"><span class="description"> Change Login URL for custom login page and Redirect URL for redirect after login and logout.</span></td>
    123128    </tr>
    124129    </tbody>
     
    194199    <th class="left"></th>
    195200    <td align="left"><input type="hidden" name="action" value="update" />
    196                     <input type="hidden" name="page_options" value="mys_email_from, mys_email_sender, mys_login_url, mys_login_rurl, mys_hide_theme_edt, mys_hide_plugin_edt, mys_show_tag, mys_show_tag_all, mys_before_tag, mys_after_tag, mys_show_to_admin, mys_hide_bar, mys_footer, mys_show_tag_page" /></td>
     201                    <input type="hidden" name="page_options" value="mys_email_from, mys_email_sender, mys_login_url, mys_login_rurl, mys_hide_theme_edt, mys_hide_plugin_edt, mys_show_tag, mys_show_tag_all, mys_before_tag, mys_after_tag, mys_show_to_admin, mys_hide_bar, mys_footer, mys_show_tag_page,mys_logout_url" /></td>
    197202    <td align="left"><input class="save_all button-primary" type="submit" name="Submit" value="Save Options"/></td>
    198203    </tr>
     
    245250}
    246251
    247 function mys_delete_plugin() {
    248     global $wpdb;
    249 
    250     $table_name = $wpdb->prefix . "options";
    251 
    252     $wpdb->query( "delete from ".$table_name." where option_name like 'mys_%'" );
    253 }
    254    
    255 if(get_option('mys_show_tag') == 'show' || get_option('mys_show_tag_all') == 'show'){
    256     add_filter('the_content', 'mys_replace_custom_word');
    257     add_filter('the_excerpt', 'mys_replace_custom_word');
    258 }
    259 
     252function mys_logout_redirect(){
     253    wp_safe_redirect( get_option('mys_logout_url') );
     254    die();
     255}
     256
     257    if(get_option('mys_logout_url') != '')
     258    add_action( 'wp_logout', 'mys_logout_redirect', 10 );
     259       
     260    if(get_option('mys_show_tag') == 'show' || get_option('mys_show_tag_all') == 'show'){
     261        add_filter('the_content', 'mys_replace_custom_word');
     262        add_filter('the_excerpt', 'mys_replace_custom_word');
     263    }
    260264
    261265    if(get_option('mys_show_to_admin') != 'show')
     
    268272    add_action('admin_menu', 'mys_global_custom_options');
    269273    add_filter( 'login_url', 'mys_login_url', 10, 2);
    270     add_action( 'deactivate_' . WC_PLUGIN_BASENAME  , 'mys_delete_plugin' );
    271274
    272275?>
  • my-settings/trunk/readme.txt

    r577725 r579213  
    22Contributors: victor4g, vishaljp
    33Donate link: http://just4u.x10.bz/donate
    4 Tags: Email, Email From, Sender name, Sender, plugin editor, theme editor, hide, Login Redirect, New Login URL, change Login URL, hide submenu,tag, Highlight tags, display tag in post, Hide Toolbar, Footer Text, tag.
     4Tags: Email, Email From, Sender name, Sender, plugin editor, theme editor, hide, Login Redirect, New Login URL, change Login URL, logout url, logout, hide submenu,tag, Highlight tags, display tag in post, Hide Toolbar, Footer Text, tag.
    55Requires at least: 2.0.2
    66Tested up to: 2.1
     
    17171. you can change default email settings of wordpress like sender name and from email.
    1818
    19 2. you can add custom login url and change redirect url after login.
     192. you can add custom login url and change redirect url after login and logout.
    2020
    21213. you can hide plugin and theme editor from sub menu so that no one can change and see your theme and plugin files from admin.
Note: See TracChangeset for help on using the changeset viewer.