Ändere das Login-Logo

function custom_login_logo() { echo ‘<style type=”text/css”>h1 a { background-image: url(‘.get_stylesheet_directory_uri().’/images/custom-login-logo.png) !important; }</style>’; } add_action(‘login_head’, ‘custom_login_logo’);  

Lesen Sie Mehr

Füge benutzerdefinierte Felder zur Mediathek hinzu

function add_custom_media_fields($form_fields, $post) { $form_fields[‘custom_field’] = array( ‘label’ => ‘Benutzerdefiniertes Feld’, ‘input’ => ‘text’, ‘value’ => get_post_meta($post->ID, ‘_custom_field’, true), ); return $form_fields; } add_filter(‘attachment_fields_to_edit’, ‘add_custom_media_fields’, 10, 2); function save_custom_media_fields($post, $attachment) { update_post_meta($post[‘ID’], ‘_custom_field’, $attachment[‘custom_field’]); return $post; } add_filter(‘attachment_fields_to_save’, ‘save_custom_media_fields’, 10, 2);  

Lesen Sie Mehr

Deaktiviere die WordPress-REST-API

function disable_rest_api() { return new WP_Error(‘rest_disabled’, ‘Die REST-API wurde deaktiviert.’, array(‘status’ => 403)); } add_filter(‘rest_authentication_errors’, ‘disable_rest_api’);  

Lesen Sie Mehr

Ändere das Standard-Image-Upload-Verzeichnis

function custom_upload_dir($path) { $upload_dir = wp_upload_dir(); $path[‘path’] = $upload_dir[‘basedir’] . ‘/custom’; $path[‘url’] = $upload_dir[‘baseurl’] . ‘/custom’; return $path; } add_filter(‘upload_dir’, ‘custom_upload_dir’);  

Lesen Sie Mehr