PluginProbe
WP MapIt / 1.2
WP MapIt v1.2
3.1.1 trunk 1.0 1.1 1.2 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.7.1 3.0 3.1.0
wp-mapit / wp_mapit / classes / class.wp_mapit_functions.php

class.wp_mapit_functions.php in WP MapIt 1.2, at wp_mapit/classes/class.wp_mapit_functions.php

22 lines 630 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if( ! class_exists( 'wp_mapit_functions' ) ) {
4 /**
5 * CLass to manage common functions of the plugin
6 */
7 class wp_mapit_functions
8 {
9 /**
10 * Function to generate a random string
11 *
12 * @since 1.0
13 * @static
14 * @access public
15 * @param $length Int Length of the string
16 * @return string Returns a random string
17 */
18 public static function generate_random_string($length = 10) {
19 return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length);
20 }
21 }
22 }