frc / wp-base
A collection of modifications and default settings to apply for theme, admin, login & plugins.
Installs: 19 792
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 10
Forks: 0
Open Issues: 0
Type:wordpress-muplugin
Requires
- php: >=7.0
- composer/installers: ^2.0
- dev-master
- v2.0.0
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-feature/allow-gforms-address
- dev-fix/rest-api-rules
- dev-feature/disable-emoji-conversion
- dev-fix/gravityforms-gfapi-namespace
- dev-feature/theme-js-to-footer
- dev-feature/theme-clean-up-gutenberg
- dev-feature/shared-humans-txt
- dev-feature/theme-meta
- dev-fix/auth0-style-modifications
This package is auto-updated.
Last update: 2024-11-15 22:24:53 UTC
README
This is a must-use plugin, plugin activation not required.
To activate module add theme support:
add_theme_support('frc-base-{SIDE}-{MODULE-NAME}');
For example:
add_theme_support('frc-base-theme-disable-api');
Available sides:
plugin
- Applied if supported plugin is activatedlogin
- Login and access related modulesadmin
- Applied only when in admin panel (theme modules will not be loaded)theme
- Applied for theme, REST API and any public side of the application
Usage
Add theme support to functions.php
.
Example - recommended supports:
// Theme add_theme_support('frc-base-theme-clean-up'); add_theme_support('frc-base-theme-disable-api'); add_theme_support('frc-base-theme-disable-asset-versioning'); add_theme_support('frc-base-theme-disable-rest-api', [ 'disabled' => ['/'], ]); add_theme_support('frc-base-theme-disable-trackbacks'); // Admin add_theme_support('frc-base-admin-clean-up'); add_theme_support('frc-base-admin-defaults-tinymc'); add_theme_support('frc-base-admin-disable-update-checks'); // Plugins add_theme_support('frc-base-plugin-all');
Enable side´s all modules
Example - enable all theme related modules:
add_theme_support('frc-base-theme-all');
Disable modules
It is possible to disable modules added by 'default' or 'all' feature by adding !
begeing of the feature.
Example:
add_theme_support('frc-base-theme-all'); // Activate all plugin modules add_theme_support('!frc-base-plugin-woocommerce'); // Disable WooCommerce plugin module
Feature options
Some modules supports options:
frc-base-theme-disable-rest-api
:
add_theme_support('frc-base-theme-disable-rest-api', [ 'disabled' => ['/'], // Disable all routes // or 'disabled' => ['users', 'posts'], // Disable user & post routes 'allowed' => ['posts'], // If all routes has been disabled but allow 'posts' route // super admin / admins have access to all routes always, other logged in users can be limited as follows 'authenticated' => [ 'disabled' => ['/'], 'allowed' => ['posts'], ] ]);
Available modules
Admin
frc-base-admin-clean-up
frc-base-admin-defaults-tinymc
frc-base-admin-defaults
(enabled by default)
frc-base-admin-disable-update-checks
Login
frc-base-login-defaults
(enabled by default)
frc-base-login-force
frc-base-login-expiration
Plugin
frc-base-plugin-acf
frc-base-plugin-auth0
frc-base-plugin-defaults
(enabled by default)
frc-base-plugin-gravityforms
frc-base-plugin-woocommerce
Theme
frc-base-theme-clean-up
frc-base-theme-defaults
(enabled by default)
frc-base-theme-disable-api
frc-base-theme-disable-asset-versioning
frc-base-theme-disable-rest-api
frc-base-theme-disable-trackbacks