Plugin Directory

Changeset 1446485


Ignore:
Timestamp:
06/30/2016 11:26:07 AM (10 years ago)
Author:
smartware.cc
Message:

Version 1.1

Location:
smart-user-slug-hider
Files:
5 added
4 edited

Legend:

Unmodified
Added
Removed
  • smart-user-slug-hider/trunk/readme.txt

    r1406212 r1446485  
    44Tags: author, authors, user, users, url, link, security, secure, login, permalink, authorlink, author link, userlink, user link, authorpage, author page
    55Requires at least: 3.0
    6 Tested up to: 4.3
    7 Stable tag: 1.0
     6Tested up to: 4.5
     7Stable tag: 1.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515> This Plugin replaces user names with 16 digits coded strings.
    1616
     17See also [Plugin Homepage](http://smartware.cc/wp-smart-user-slug-hider)
     18
    1719For author page URLs WordPress uses the pattern www.example.com/author/name where 'name' represents the users login name. This means that the **login names from all your users are publicly visible**. This is the already half of the infomations needed to log in...
    1820
     
    2325There are **no settings and no need to change anything**.
    2426
    25 = More Information =
    26 
    27 Visit the [Plugin Homepage](http://smartware.cc/wp-smart-user-slug-hider)
    28 
    2927= Do you like the smart User Slug Hider Plugin? =
    3028
    3129Thanks, I appreciate that. You don't need to make a donation. No money, no beer, no coffee. Please, just [tell the world that you like what I'm doing](http://smartware.cc/make-a-donation/)! And that's all.
     30
     31= More plugins from smartware.cc =
     32
     33* **[404page](https://wordpress.org/plugins/404page/)** - Define any of your WordPress pages as 404 error page
     34* **[hashtagger](https://wordpress.org/plugins/hashtagger/)** - Tag your posts by using #hashtags
     35* **[smart Custom Display Name](https://wordpress.org/plugins/smart-custom-display-name/)** - Set your Display Name to anything you like
     36* [See all](https://profiles.wordpress.org/smartwarecc/#content-plugins)
    3237
    3338== Installation ==
     
    5560== Changelog ==
    5661
     62= 1.1 (2016-06-30) =
     63* Code optimization
     64* Plugin info page added
     65
    5766= 1.0 (2014-10-02) =
    5867* Initial Release (tanks to [joeymalek](https://profiles.wordpress.org/joeymalek/) for drawing my attention to this problem)
     68
     69== Upgrade Notice ==
     70
     71= 1.1 =
     72* Code optimization, Plugin info page added, no functional changes
  • smart-user-slug-hider/trunk/smart-user-slug-hider.php

    r1406212 r1446485  
    44Plugin URI: http://smartware.cc/wp-smart-user-slug-hider
    55Description: Hide usernames in author pages URLs to enhance security
    6 Version: 1.1 alpha
     6Version: 1.1
    77Author: smartware.cc, Peter's Plugins
    88Author URI: http://smartware.cc
     
    3939    $this->plugin_name = 'smart User Slug Hider';
    4040    $this->plugin_slug = 'smart-user-slug-hider';
    41         $this->version = '1.1 alpha';
     41        $this->version = '1.1';
    4242    $this->init();
    4343  }
    4444 
    4545  function init() {
    46     add_action( 'admin_init', array( $this, 'admin_init' ) );
    4746    add_action( 'pre_get_posts', array( $this, 'alter_query' ), 99 );
    4847    add_filter( 'author_link', array( $this, 'alter_link' ), 99, 3 );
     48    if ( is_admin() ) {
     49      add_action( 'admin_init', array( $this, 'admin_init' ) );
     50      add_action( 'admin_menu', array( $this, 'add_info_page' ) );
     51      add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), array( $this, 'add_link' ) );
     52    }
    4953  }
    5054 
     
    8791    return str_replace ( '/' . $author_nicename, '/' . $this->encrypt( $author_id ), $link );
    8892  }
     93 
     94   function add_link( $links ) {
     95    return array_merge( $links, array( '<a class="dashicons dashicons-editor-help" href="' . menu_page_url( $this->plugin_slug, false ) . '"></a>', '<a href="https://wordpress.org/plugins/' . $this->plugin_slug . '/">' . __( 'Please rate Plugin', 'smart-user-slug-hider' ) .'</a>' ) );
     96  }
     97 
     98  function add_info_page() {
     99    add_submenu_page( null, $this->plugin_name, $this->plugin_name, 'read', $this->plugin_slug, array( $this, 'show_info_page' ) );
     100  }
     101 
     102  function show_info_page() {
     103    ?>   
     104    <div class="wrap">
     105      <?php screen_icon(); ?>
     106      <h2 style="min-height: 32px; line-height: 32px; padding-left: 40px; background-image: url(<?php echo plugins_url( 'pluginicon.png', __FILE__ ); ?>); background-repeat: no-repeat; background-position: left center"><a href="<?php echo $this->my_url; ?>"><?php echo $this->plugin_name; ?></a></h2>
     107      <hr />
     108      <p>Plugin Version: <?php echo $this->version; ?> <a class="dashicons dashicons-editor-help" href="<?php echo $this->wp_url; ?>/changelog/"></a></p>
     109      <div id="poststuff">
     110        <div id="post-body" class="metabox-holder columns-2">
     111          <div id="post-body-content">
     112            <div class="meta-box-sortables ui-sortable">
     113              <div class="postbox">
     114                <div class="inside">
     115                  <p><strong><?php _e( 'This Plugin replaces user names with 16 digits coded strings.', 'smart-user-slug-hider' ); ?></strong></p>
     116                  <p><?php _e( 'There are no settings.', 'smart-user-slug-hider' ); ?></p>
     117                </div>
     118              </div>
     119              <div class="postbox">
     120                <div class="inside">
     121                  <p><strong><?php _e( 'Do you like the smart User Slug Hider Plugin?', 'smart-user-slug-hider' ); ?></strong></p>
     122                  <p><a href="https://profiles.wordpress.org/smartwarecc/#content-plugins"><?php _e( 'Please take a look at my other plugins.', 'smart-user-slug-hider' ); ?></a></p>
     123                </div>
     124              </div>
     125            </div>
     126          </div>
     127          <?php { $this->show_meta_boxes(); } ?>
     128        </div>
     129        <br class="clear">
     130      </div>   
     131    </div>
     132    <?php
     133  }
     134 
     135  // show meta boxes
     136  function show_meta_boxes() {
     137    ?>
     138    <div id="postbox-container-1" class="postbox-container">
     139      <div class="meta-box-sortables">
     140        <div class="postbox">
     141          <h3><span><?php _e( 'Like this Plugin?', 'smart-user-slug-hider' ); ?></span></h3>
     142          <div class="inside">
     143            <ul>
     144              <li><div class="dashicons dashicons-wordpress"></div>&nbsp;&nbsp;<a href="<?php echo $this->wp_url; ?>/"><?php _e( 'Please rate the plugin', 'smart-user-slug-hider' ); ?></a></li>
     145              <li><div class="dashicons dashicons-admin-home"></div>&nbsp;&nbsp;<a href="<?php echo $this->my_url; ?>/"><?php _e( 'Plugin homepage', 'smart-user-slug-hider'); ?></a></li>
     146              <li><div class="dashicons dashicons-admin-home"></div>&nbsp;&nbsp;<a href="http://smartware.cc/"><?php _e( 'Author homepage', 'smart-user-slug-hider' );?></a></li>
     147              <li><div class="dashicons dashicons-googleplus"></div>&nbsp;&nbsp;<a href="http://g.smartware.cc/"><?php _e( 'Authors Google+ Page', 'smart-user-slug-hider' ); ?></a></li>
     148              <li><div class="dashicons dashicons-facebook-alt"></div>&nbsp;&nbsp;<a href="http://f.smartware.cc/"><?php _e( 'Authors facebook Page', 'smart-user-slug-hider' ); ?></a></li>
     149            </ul>
     150          </div>
     151        </div>
     152        <div class="postbox">
     153          <h3><span><?php _e( 'Translate this Plugin', 'smart-user-slug-hider' ); ?></span></h3>
     154          <div class="inside">
     155            <p><?php _e( 'It would be great if you\'d support the smart User Slug Hider Plugin by adding a new translation or keeping an existing one up to date!', 'smart-user-slug-hider' ); ?></p>
     156            <p><a href="https://translate.wordpress.org/projects/wp-plugins/<?php echo $this->plugin_slug; ?>"><?php _e( 'Translate online', 'smart-user-slug-hider' ); ?></a></p>
     157          </div>
     158        </div>
     159      </div>
     160    </div>
     161    <?php
     162  }
     163 
     164 
    89165}
    90166
Note: See TracChangeset for help on using the changeset viewer.