
內容簡介
The Suite 是一套由 MarasIT 構建的 WordPress 一站式解決方案,包括以下工具和設定:
核心設定(Core Configuration)是其他所有設定的基礎,啟用預設的 WordPress 設定。
外掛(PLUGINS):
– iThemes Security (前身為 Better WP Security)
– W3 Total Cache
– WP-Optimize – Clean
– Compress
– Cache
– Timber
– CMB2
– 啟動主題中的命名空間 (由 Maras IT 開發)
– 啟動外掛中的命名空間 (由 Maras IT 開發)
– 開發環境套件 (由 Maras IT 開發)
常數(CONSTANTS):
`
define(\’FS_METHOD\’, \’direct\’);
define(\’DISALLOW_FILE_EDIT\’, true );
define(\’DVK_DEBUG\’, false);
define(\’WP_DEBUG\’, false);
define(\’FORCE_SSL_LOGIN\’, true);
define(\’FORCE_SSL_ADMIN\’, true);
define(\’FORCE_SSL\’, true);
define(\’CONCATENATE_SCRIPTS\’, true);
define(\’COMPRESS_SCRIPTS\’, true);
define(\’COMPRESS_CSS\’, true);
define(\’ENFORCE_GZIP\’, true);
define(\’FS_CHMOD_DIR\’, ( 0755 & ~ umask() ) );
define(\’FS_CHMOD_FILE\’, ( 0644 & ~ umask() ) );
define(\’WP_MEMORY_LIMIT\’, \’512M\’);
// 調試
define(\’WP_DEBUG_LOG\’, true);
define(\’WP_DEBUG_DISPLAY\’, false);
define(\’SCRIPT_DEBUG\’, true );
define(\’SAVEQUERIES\’, true );
`
命名空間(NAMESPACE):
\DvkConf 命名空間可讓您通過 use 而不是 require_once 或其他變體,訪問 wp-content/plugins/dvk-conf 目錄。
方法(METHODS):
通過添加:use DvkConf\\Utils\\Debug;,您可以使用 Debug::dump($your_variable) 將您的測試傾印出來,這將根據您的配置使用 var_dump 或 Symfony 的 VarDumper。
通過添加 use DvkConf\\Utils\\Functions;,您可以使用此語法覆蓋父佈景主題功能:Functions::f($my_prefix.\'wp_header\')();
要使用此功能,您需要創建一個名為wp_header()的函數,其中包含替換原始函數所需的代碼。
如果該函數不存在,將執行 wp_header();如果 wp_header() 不存在,將顯示一個 Ooops 傾印。
外掛標籤
開發者團隊
② 後台搜尋「Maras IT Suite : Core Configuration」→ 直接安裝(推薦)
原文外掛簡介
The Suite is a set of tools and configuration from MarasIT your End to End WordPress Agency.
Core Configuration is the basement of all others which activate a default set of WordPress settings.
PLUGINS:
– iThemes Security (formerly Better WP Security)
– W3 Total Cache
– WP-Optimize – Clean
– Compress
– Cache
– Timber
– CMB2
– Activate Namespace In Themes (by Maras IT)
– Activate Namespace In Plugin (by Maras IT)
– Development Environement Suite (by Maras IT)
CONSTANTS:
`
define(\’FS_METHOD\’, \’direct\’);
define(\’DISALLOW_FILE_EDIT\’, true );
define(\’DVK_DEBUG\’, false);
define(\’WP_DEBUG\’, false);
define(\’FORCE_SSL_LOGIN\’, true);
define(\’FORCE_SSL_ADMIN\’, true);
define(\’FORCE_SSL\’, true);
define(\’CONCATENATE_SCRIPTS\’, true);
define(\’COMPRESS_SCRIPTS\’, true);
define(\’COMPRESS_CSS\’, true);
define(\’ENFORCE_GZIP\’, true);
define(\’FS_CHMOD_DIR\’, ( 0755 & ~ umask() ) );
define(\’FS_CHMOD_FILE\’, ( 0644 & ~ umask() ) );
define(\’WP_MEMORY_LIMIT\’, \’512M\’);
// debug
define(\’WP_DEBUG_LOG\’, true);
define(\’WP_DEBUG_DISPLAY\’, false);
define(\’SCRIPT_DEBUG\’, true );
define(\’SAVEQUERIES\’, true );
`
NAMESPACE:
\DvkConf namespace allow you to acces the wp-content/plugins/dvk-conf directory with namespace use instead of require_once or variations
METHODS:
by adding :use DvkConf\\Utils\\Debug; you can dump your test with Debug::dump($your_variable) which will use var_dump or VarDumper for Symfony depending on your configuration.
by adding use DvkConf\\Utils\\Functions; you can \”override\” a parent theme function with this syntax : Functions::f($my_prefix.\'wp_header\')();
To use this feature, you will need to create a function wp_header()\' which will contain the code to replace the original functionwp_header().
In case your function do not existswp_header()will be executed.
In casewp_header()do not exists aOoops` dump will show in place of the function
