This file contains hidden or 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
| //Place in child theme's functions.php file. Delete after you have access and have setup a permanent user. | |
| function wsv_create_admin_account(){ | |
| $user = 'Username'; | |
| $pass = 'Password'; | |
| $email = '[email protected]'; | |
| //if a username with the email ID does not exist, create a new user account | |
| if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
| $user_id = wp_create_user( $user, $pass, $email ); | |
| $user = new WP_User( $user_id ); |
This file contains hidden or 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
| // ADD NEW ADMIN USER TO WORDPRESS | |
| // ---------------------------------- | |
| // Put this file in your Wordpress root directory and run it from your browser. | |
| // Delete it when you're done. | |
| require_once 'wp-blog-header.php'; | |
| require_once 'wp-includes/registration.php'; | |
| // CONFIG | |
| $newusername = 'your_username'; |
This file contains hidden or 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
| //* Custom logo for Password Protected plugin: https://wordpress.org/plugins/password-protected/ | |
| function wsv_password_protected_logo() { | |
| ?> | |
| <style type="text/css"> | |
| body.login div#login h1 a { | |
| background-image: url(/wp-content/mu-plugins/admin_pw_login.png); | |
| margin: 0 auto; | |
| } | |
| body.login div#login h2 { |
This file contains hidden or 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
| function wsv_hide_content_name(){ | |
| global $current_user; | |
| $username = $current_user->user_login; | |
| if( !in_array ( $username, array('user1','user2')) ){ | |
| <!*** Content Here **> | |
| } | |
| } |
This file contains hidden or 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
| function wsv_hide_content_name(){ | |
| global $current_user; | |
| $username = $current_user->user_login; | |
| if ($username !== 'user1'){ | |
| <!*** Content Here **> | |
| } | |
| } |
This file contains hidden or 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
| RewriteEngine On | |
| # Force WWW | |
| RewriteCond %{HTTP_HOST} ^domain.com [NC] | |
| RewriteRule ^(.*)$ https://www.domain.com/$1 [R=302,NC] | |
| # Force HTTPS/SSL | |
| RewriteCond %{HTTPS} off | |
| RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=302,L] |
This file contains hidden or 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
| /** | |
| * Snippet Name: Change default FROM email address | |
| * Snippet URL: http://www.wpcustoms.net/snippets/change-default-from-email-address/ | |
| */ | |
| function new_mail_from($old) { | |
| return '[email protected]'; | |
| } | |
| function new_mail_from_name($old) { |
This file contains hidden or 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
| add_action('after_setup_theme', 'remove_admin_bar'); | |
| function remove_admin_bar() { | |
| if (!current_user_can('administrator') && !is_admin()) { | |
| show_admin_bar(false); | |
| } | |
| } |
This file contains hidden or 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
| /* OLD Gravity Forms */ | |
| .gform_wrapper .ginput_complex .ginput_right, | |
| .gform_wrapper .ginput_complex .ginput_left, | |
| .gform_wrapper .ginput_complex .name_first, | |
| .gform_wrapper .ginput_complex .name_last { | |
| float: none !important; | |
| width: 100% !important; | |
| } | |
| /* NEW Gravity Forms */ |