內容簡介
該外掛包含通常被認為是所有專案中最常用的功能和設置。它的用途是與aucor-starter一起使用,但也可以獨立運行。使用特定於網站的外掛程式來配置此外掛的規格。
內容
抽象類別
目錄:根目錄
這些功能建立在這些類別上
功能和子功能
目錄:/features/
功能(包含子功能),從安全設置到速度優化和儀表板清理。
管理員:
相片集
圖片連結
登錄
管理員選單清理
通知
個人資料清理
移除自訂器
經典編輯器:
tinymce
儀表板:
清理
最近的小工具
移除面板
前端:
節錄
HTML 修復程式
本地化:
Polyfill
字串翻譯
外掛程式:
ACF
GravityForms
重定向
SEO
Yoast
安全性:
停用管理員電子郵件檢查
停用檔案編輯
停用未過濾的 HTML
標頭清理
隱藏用戶
移除評論審核
移除評論
速度:
限制版本
移動 jQuery
移除表情符號
移除 metabox
除錯:
樣式指南
設計稿
輔助功能
目錄:根目錄
包含所有功能/子功能使用的功能,例如增強式(內部)除錯
配置(可選)
「啟用」子功能
樣式指南子功能會使用預設標記測試最常見的標記樣式,當在 URL 中發現 GET 參數「?ac-debug=styleguide」時,會覆蓋 WP 函數「the_content()」。但是,您可以使用過濾器替換此標記:
add_filter('aucor_core_custom_markup',function($content) {
$content = '自訂標記';
return $content;
});
wireframe 子功能會在頁面上的所有元素添加輪廓線,以協助視覺除錯,當在 URL 中發現 GET 參數「?ac-debug=wireframe」時。它還會在頁面上的所有錨點標記的 href 值中添加「?ac-debug=wireframe」,以保持啟用狀態。
停用功能/子功能
預設情況下,所有功能和子功能都是啟用的,但您可以使用過濾器停用不需要的功能。但必須在另一個外掛程式中進行,因為功能挂鉤在主題設置之前執行,因此位於 functions.php 中的過濾器將沒有任何效果。這是您可以使用的最小代碼片段,用於停用功能:
<?php
/**
* Plugin Name: YOUR PLUGIN NAME
*/
// 停用 Aucor Core 中的某個功能
add_filter('键入功能或子功能','__return_false');
將此片段放入名為 plugin.php 的文件中,在 [YOUR PLUGIN NAME] 命名的目錄中,與其他外掛程式相同。
外掛標籤
開發者團隊
原文外掛簡介
The plugin contains the features and settings generally deemed to be the most commonly used in all projects. It is meant to be used together with aucor-starter but functions on its own as well. Use the site specific plugin to configure the specs of this plugin.
Contents
Abstract Classes
Directory: root
The models the features are built on
Features and subfeatures
Directory: /features/
Features (containing subfeatures) ranging from security settings to speed optimizations and dashboard cleanup.
admin:
gallery
image-links
login
admin menu cleanup
notifications
profile cleanup
remove customizer
classic-editor:
tinymce
dashboard:
cleanup
recent widget
remove panels
front-end:
excerpt
html fixes
localization:
polyfill
string translations
plugins:
acf
gravityforms
redirection
seo
yoast
security:
disable admin email check
disable file edit
disable unfiltered html
head cleanup
hide users
remove comment moderation
remove commenting
speed:
limit revisions
move jquery
remove emojis
remove metabox
debug:
style guide
wireframe
Helper functions
Directory: root
Contains functions, like enhanced (internal) debugging, for all features/subfeatures to use
Configuration (optional)
“Active” subfeatures
The style guide subfeature overrides the WP function the_content() with default markup for testing the most common tag styles, when the GET parameter ‘?ac-debug=styleguide’ is found in the url. You can however replace this markup with a filter:
add_filter(‘aucor_core_custom_markup’, function($content) {
$content = ‘custom markup’;
return $content;
});
The wireframe subfeature adds outlines to all elements on page to help with visual debugging, when the GET parameter ‘?ac-debug=wireframe’ is found in the url. It also appends ‘?ac-debug=wireframe’ to the href value in all anchor tags on the page to keep the feature enabled during navigation.
Disable feature/subfeature
By default all the features/subfeatures are on, but you can disable the ones you don’t want with filters. This need to be done in a separate plugin, however, because the hooks that the features latch onto are executed earlier than the theme setup, so filters in e.g. functions.php won’t have any effect. Here is a minimal code snippet you can use to disable features:
