Skip to content

Instantly share code, notes, and snippets.

View meetawahab's full-sized avatar
🎯
Focusing

Abdul Wahab meetawahab

🎯
Focusing
View GitHub Profile
/**
* Enable svg mime type support.
* @param $mimes
* @return $mimes
*/
function loginpress_mime_types( $mimes ) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
@meetawahab
meetawahab / create-admin-user.php
Last active September 28, 2019 06:40
Create a new admin user in WordPress through code. You just need to change the variables and drop the file in the mu-plugins directory or add the following code in active theme's functions.php, then reload the homepage in WordPress. The new user will be created. Remove the file/code after that.
<?php
add_action( 'init', 'aw610_create_user' );
function aw610_create_user() {
$username = 'admin';
$password = 'password';
$email_address = 'email@domain.com';
if ( ! username_exists( $username ) ) {
@meetawahab
meetawahab / pe-customize-controls.css
Created February 21, 2017 05:38 — forked from OriginalEXE/pe-customize-controls.css
Extending WordPress Customizer Panels and Sections to allow nesting
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent,
#customize-theme-controls .customize-pane-child.current-section-parent {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
}