File manager - Edit - /var/www/wordpress_preproduction/mu-plugins.tar
Back
mu-lost-password.php 0000775 00000001527 15214222425 0010526 0 ustar 00 <?php /* * Plugin Name: Password Reset Removed * Description: Removes the ability for non admin users to change/reset their passwords. * Version: 1.1 * Author: Derek Herman ; Modified by Juliobox (boiteaweb.fr) * Author URI: http://valendesigns.com */ add_filter( 'show_password_fields', 'baw_prr_i_am_admin' ); add_filter( 'allow_password_reset', 'baw_prr_i_am_admin' ); add_filter( 'gettext', 'baw_prr_remove_me' ); function baw_prr_i_am_admin() { return is_admin() && current_user_can('administrator'); } function baw_prr_remove_me($text) { return str_replace( array('Lost your password?', 'Lost your password'), '', trim($text, '?') ); } function baw_prr_no_password_change( $dummy1, $dummy2, $user ) { if( !baw_prr_i_am_admin() ) unset( $user->user_pass ); } add_action( 'user_profile_update_errors', 'baw_prr_no_password_change', 10, 3 ); css/login.css 0000775 00000002337 15214222425 0007167 0 ustar 00 body{background:#fff}#login{padding-top:2%;width:475px}.login h1 a{margin:0 auto}.login form{background: none repeat scroll 0 0 #222;margin-top:25px;padding:20px 20px 40px}a.button-primary:active,a.button-primary:focus,a.button-primary:hover,button.button-primary:hover,input.button-primary:hover{color:#000;text-shadow:none}#backtoblog{margin: 24px 0 0}.login #backtoblog a,.login #nav a,a{color:#222!important;text-shadow:none}.login #backtoblog a:hover,.login #nav a:hover{color:#09222A!important}.login #backtoblog,.login #nav{font-size:12px;padding:0 10px}#nav{float:right}.login .message,div.updated{background-color:#222;border-color:#fff;color:#fff;margin-top:15px}input#wp-submit{background:none repeat scroll 0 0 transparent;border-color:#fff;border-radius:0;border-width:2px;box-shadow:none;color:#FFF;height:40px;line-height:28px;padding:0 12px 2px;text-shadow:none}input#wp-submit:hover,input#wp-submit:focus{background:none repeat scroll 0 0 transparent;border-color:#fff;border-width:2px;color:#FFF}.login #login_error,div.error{display:none;visibility:hidden}.wp-core-ui .button-primary{background:#FFF;border-color:#FFF}.wp-core-ui .button-primary:hover{background:#000;border-color:#FFF}.login label{color: #FFF;font-size: 12px;} mu-login.php 0000775 00000003316 15214222425 0007013 0 ustar 00 <?php if (!defined('ABSPATH')) die('Restricted Area'); /* * Plugin Name: Custom WordPress Login * Description: Customize WordPress login page. * Version: 20160612 * Author: Aurélien Denis (Neticpro) * Author URI: http://neticpro.com/ */ /* Custom Login Link */ function ntp_url_login() { $url = home_url(); return $url; } add_filter('login_headerurl', 'ntp_url_login'); /* 'title' Tag on Login Form */ function ntp_url_title() { $slogan = get_option('blogdescription'); return $slogan; } add_filter('login_headertext', 'ntp_url_title'); /* Custom Login Logo */ function ntp_login_css() { /* Custom CSS */ $uri_login_css = plugins_url('css/login.css', __FILE__); wp_enqueue_style('login_css', $uri_login_css); /* Custom Logo */ $custom_logo_url = get_stylesheet_directory_uri() . '/images/catalunya-experience-logo.svg'; $custom_logo_width = 170; $custom_logo_height = 100; if ($custom_logo_url) { echo '<style> h1 a{ background-image:url("'.$custom_logo_url.'")!important; background-size:'.$custom_logo_width.'px '.$custom_logo_height.'px!important; } .login h1 a { height:'.$custom_logo_height.'px; width:'.$custom_logo_width.'px; } </style>'; } } add_action('login_head', 'ntp_login_css'); add_filter('login_errors', 'ntp_login_css'); /* Remember Me Always Checked */ function ntp_login_checked_remember_me() { echo "<script>document.getElementById('rememberme').checked = true;</script>"; } add_filter('login_footer', 'ntp_login_checked_remember_me'); /* Remove Shake Effect */ function ntp_login_error() { remove_action('login_head', 'wp_shake_js', 12); } add_action('login_head', 'ntp_login_error'); mu-sanitize-filename.php 0000775 00000003007 15214222425 0011304 0 ustar 00 <?php if (!defined('ABSPATH')) die('Restricted Area'); /* * Plugin Name: Sanitize File Name * Description: Clean file name when uploading files in WordPress. * Version: 20160612 * Author: Mickaël Gris (Neticpro) * Author URI: https://wpchannel.com/renommer-automatiquement-fichiers-accentues-wordpress/ */ function wpc_sanitize_french_chars($filename) { /* Force the file name in UTF-8 (encoding Windows / OS X / Linux) */ $filename = mb_convert_encoding($filename, "UTF-8"); $char_not_clean = array('/À/','/Á/','/Â/','/Ã/','/Ä/','/Å/','/Ç/','/È/','/É/','/Ê/','/Ë/','/Ì/','/Í/','/Î/','/Ï/','/Ò/','/Ó/','/Ô/','/Õ/','/Ö/','/Ù/','/Ú/','/Û/','/Ü/','/Ý/','/à/','/á/','/â/','/ã/','/ä/','/å/','/ç/','/è/','/é/','/ê/','/ë/','/ì/','/í/','/î/','/ï/','/ð/','/ò/','/ó/','/ô/','/õ/','/ö/','/ù/','/ú/','/û/','/ü/','/ý/','/ÿ/', '/©/'); $clean = array('a','a','a','a','a','a','c','e','e','e','e','i','i','i','i','o','o','o','o','o','u','u','u','u','y','a','a','a','a','a','a','c','e','e','e','e','i','i','i','i','o','o','o','o','o','o','u','u','u','u','y','y','copy'); $friendly_filename = preg_replace($char_not_clean, $clean, $filename); /* After replacement, we destroy the last residues */ $friendly_filename = utf8_decode($friendly_filename); $friendly_filename = preg_replace('/\?/', '', $friendly_filename); /* Lowercase */ $friendly_filename = strtolower($friendly_filename); return $friendly_filename; } add_filter('sanitize_file_name', 'wpc_sanitize_french_chars', 10); mu-frontoffice.php 0000775 00000003704 15214222425 0010210 0 ustar 00 <?php if (! defined('ABSPATH')) die('Restricted Area'); /* * Plugin Name: Front-Office Enhancements * Description: Tweaks for WordPress (front-office). * Version: 20160612 * Author: Aurélien Denis (Neticpro) * Author URI: https://neticpro.fr/ */ /* Cleaning WordPress <head> */ function ntp_head_clean() { remove_action('wp_head', 'feed_links_extra', 3); remove_action('wp_head', 'feed_links', 2); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'parent_post_rel_link', 10, 0); remove_action('wp_head', 'start_post_rel_link', 10, 0); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); remove_action('wp_head', 'wp_generator'); } add_action('init', 'ntp_head_clean'); /* Removing WordPress Version from Feed */ function ntp_rss_version() { return''; } add_filter('the_generator', 'ntp_rss_version'); /* Remove emoji */ remove_action('wp_head', 'print_emoji_detection_script', 7); remove_action('admin_print_scripts', 'print_emoji_detection_script'); remove_action('wp_print_styles', 'print_emoji_styles'); remove_action('admin_print_styles', 'print_emoji_styles'); /* Remove hentry CSS Class */ function ntp_remove_hentry($classes) { if (! is_single() || is_main_query()) { $classes = array_diff($classes, array('hentry')); } return $classes; } add_filter('post_class','ntp_remove_hentry'); /* Prevent Sub-Domains Tracking as External Link */ function ntp_prevent_subdomains() { return "window.addEventListener('load', function () { var links = document.querySelectorAll('a'); for (let i = 0; i < links.length; i++) { links[i].addEventListener('click', function(e) { var n = this.href.includes('catalunyaexperience.fr'); if (n == false) { gtag('event', 'click', {'event_category': 'external links','event_label' : this.href}); } }); } });"; } add_filter('seopress_gtag_link_tracking_ev', 'ntp_prevent_subdomains'); mu-backoffice.php 0000775 00000007000 15214222425 0007751 0 ustar 00 <?php if (!defined('ABSPATH')) die('Restricted Area'); /* * Plugin Name: Back-Office Enhancements * Description: Tweaks for WordPress (back-office). * Version: 20160612 * Author: Aurélien Denis (Neticpro) * Author URI: https://neticpro.fr/ */ /* Widget 'At a glance' for all content */ function ntp_right_now_content_table_end() { $args = array( 'public' => true, '_builtin' => false ); $output = 'object'; $operator = 'and'; $post_types = get_post_types($args , $output , $operator); foreach($post_types as $post_type) { $num_posts = wp_count_posts($post_type->name); $num = number_format_i18n($num_posts->publish); $text = _n($post_type->labels->name, $post_type->labels->name , intval($num_posts->publish)); if (current_user_can('edit_posts')) { $cpt_name = $post_type->name; } echo '<li><tr><a class="'.$cpt_name.'" href="edit.php?post_type='.$cpt_name.'"><td></td>' . $num . ' <td>' . $text . '</td></a></tr></li>'; } $taxonomies = get_taxonomies($args , $output , $operator); foreach($taxonomies as $taxonomy) { $num_terms = wp_count_terms($taxonomy->name); $num = number_format_i18n($num_terms); $text = _n($taxonomy->labels->name, $taxonomy->labels->name , intval($num_terms)); if (current_user_can('manage_categories')) { $cpt_tax = $taxonomy->name; } echo '<li><tr><a class="'.$cpt_tax.'" href="edit-tags.php?taxonomy='.$cpt_tax.'"><td></td>' . $num . ' <td>' . $text . '</td></a></tr></li>'; } } add_action('dashboard_glance_items', 'ntp_right_now_content_table_end'); /* Removing unnecessary widgets from Dashboard */ function ntp_dashboard_widgets() { // Plugins remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // Recent Comments remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // Incoming Links remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // Plugins remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Press remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side'); // Recent Drafts remove_meta_box('dashboard_primary', 'dashboard', 'side'); // WordPress blog remove_meta_box('dashboard_secondary', 'dashboard', 'side'); // Other WordPress News } add_action('wp_dashboard_setup', 'ntp_dashboard_widgets'); /* Remove Unnecessary Menus */ function ntp_remove_menus() { remove_menu_page('edit.php?post_type=project'); } add_action('admin_init', 'ntp_remove_menus'); /* Remove WordPress Logo */ function ntp_remove_wp_logo($wp_admin_bar) { $wp_admin_bar->remove_node('wp-logo'); } add_action('admin_bar_menu', 'ntp_remove_wp_logo', 999); /* Custom Footer */ function ntp_remove_footer_admin () { $slogan = get_option('blogdescription'); $title = get_option('blogname'); echo '© ' . date('Y') . ' ' . $title . ' - ' . $slogan; } add_filter('admin_footer_text', 'ntp_remove_footer_admin'); /* Remove Items from Admin Bar */ function ntp_remove_from_admin_bar() { global $wp_admin_bar; $wp_admin_bar->remove_menu('comments'); $wp_admin_bar->remove_menu('updates'); } add_action('wp_before_admin_bar_render', 'ntp_remove_from_admin_bar'); /* TinyMCE Large Editor */ function ntp_force_show_large_editor($in) { if(is_array($in)) { $in['wordpress_adv_hidden'] = FALSE; } return $in; } add_filter('tiny_mce_before_init', 'ntp_force_show_large_editor'); /* Remove H1 in headings */ function ntp_remove_headings($arr) { $arr['block_formats'] = 'Paragraphe=p; Titre 2=h2; Titre 3=h3;Titre 4=h4; Titre 5=h5; Titre 6=h6'; return $arr; } add_filter('tiny_mce_before_init', 'ntp_remove_headings');
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings