This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Dashboard User Password Generator | |
Plugin URI: http://nabeel.molham.me/blog/plugins/user-password-generator-demo | |
Description: Add a generator button next password field in the dashboard | |
Version: 1.0 | |
Author: Nabeel Molham | |
Author URI: http://nabeel.molham.me/ | |
Text Domain: user-password-generator-demo | |
Domain Path: /languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Dashboard User Password Generator | |
Plugin URI: http://nabeel.molham.me/blog/plugins/user-password-generator-demo | |
Description: Add a generator button next password field in the dashboard | |
Version: 1.0 | |
Author: Nabeel Molham | |
Author URI: http://nabeel.molham.me/ | |
Text Domain: user-password-generator-demo | |
Domain Path: /languages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Plugin Name: Dashboard User Password Generator | |
Plugin URI: http://nabeel.molham.me/blog/plugins/user-password-generator-demo | |
Description: Add a generator button next password field in the dashboard | |
Version: 1.0 | |
Author: Nabeel Molham | |
Author URI: http://nabeel.molham.me/ | |
Text Domain: user-password-generator-demo | |
Domain Path: /languages | |
License: GNU General Public License, version 2, http://www.gnu.org/licenses/gpl-2.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// in the User_Password_Generator_Demo class constructor | |
// password hint content filter | |
add_filter( 'password_hint', array( &$this, 'generator_ui' ) ); | |
// add new methon to User_Password_Generator_Demo class | |
// which will be the callback | |
/** | |
* Password Generator UI | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// in the User_Password_Generator_Demo class constructor | |
// Dashboard hook for add js and css files | |
add_action( 'admin_enqueue_scripts', array( &$this, 'enqueues' ) ); | |
// add new methon to User_Password_Generator_Demo class | |
/** | |
* Assets Enqueues | |
* | |
* @since 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@CHARSET "UTF-8"; | |
/* fix checkbox width */ | |
/* تظبيط عرض */ | |
#createuser .form-field input[type=checkbox] { | |
width: auto; | |
} | |
/* set the width of password character length field */ | |
/* بجبر العرض حسب ما بحتاح */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Password Generator | |
*/ | |
( function( w ) { | |
jQuery( function( $ ) { | |
// reference inputs for later use | |
var $user_special = $( '#generator-use-special' ), | |
$use_extra_special = $( '#generator-use-extra' ), | |
$password_length = $( '#generator-length' ), | |
$password_result = $( '#generator-result' ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$con = mysqli_connect( 'localhost' , 'root' , '' , 'market' ); | |
// Inputs from post | |
$inputs = filter_input_array( INPUT_POST, $_POST, [ | |
'kind' => FILTER_SANITIZE_STRING, | |
'salary' => FILTER_SANITIZE_NUMBER_FLOAT, | |
'advantage' => FILTER_SANITIZE_STRING, | |
] ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Get next/preview post by post_date | |
* | |
* @param int|WP_Post $post | |
* @param boolean $next_post | |
* @return WP_Post|WP_Error | |
*/ | |
function get_next_prev_post_by_date( $post, $next_post = true ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_condition( $original ) | |
{ | |
if ( is_numeric( $original ) ) | |
$original = absint( trim( $original ) ) >= 2016 ? 'new' : 'used'; | |
$makes = array( | |
'cons' => 'Used', | |
'used' => 'Used', |
OlderNewer