-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmrw-functionality-plugin.php
More file actions
65 lines (58 loc) · 1.58 KB
/
mrw-functionality-plugin.php
File metadata and controls
65 lines (58 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: MRW Functionality Plugin
* Description: Standard Tweaks to WP functions for all sites by MRW Web Design
* Version: 1.0
* Author: Mark Root-Wiley, MRW Web Design
* Author URI: https://MRWweb.com
*
* @package _mrw-mu-plugins
*/
namespace MRW\Site;
if ( ! defined( 'DISALLOW_FILE_EDIT' ) ) {
add_action(
'admin_init',
function () {
define( 'DISALLOW_FILE_EDIT', true ); //phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound
}
);
}
add_action( 'init', __NAMESPACE__ . '\feed_links' );
/**
* Clean up the <head> to remove generator links and ensure RSS support
*
* @return void
*/
function feed_links() {
add_theme_support( 'automatic-feed-links' );
}
add_action( 'init', __NAMESPACE__ . '\page_post_type_supports' );
/**
* Add and remove post type supports for the Page post type
*
* @return void
*/
function page_post_type_supports() {
add_post_type_support( 'page', 'excerpt' );
add_post_type_support( 'page', 'post-thumbnail' );
}
add_filter( 'login_headerurl', __NAMESPACE__ . '\login_logo_url' );
/**
* Change URL of logo on login screen to go to site homepage
*
* @return string URL
*/
function login_logo_url() {
return esc_url( get_bloginfo( 'url' ) );
}
add_filter( 'login_headertext', __NAMESPACE__ . '\login_logo_url_title' );
/**
* Change title/alt of logo to be the site name
*
* @return URL title
*/
function login_logo_url_title() {
return esc_html( get_bloginfo( 'name' ) );
}
require_once __DIR__ . '/functionality/site-error-emails.php';
require_once __DIR__ . '/functionality/email-shortcode.php';