If you are a developer, then this page is for you.
chpadbpro/settings/default
/**
* Change Default settings
*
* @package adbpro
*/
add_filter("chpadbpro/settings/default", function($settings){
//remove default settings key
unset($settings['SETTING_NAME']);
//add new settings
$settings['SETTING_NAME'] = "SETTING_VALUE";
return $settings;
});
adb/modify/settings
/**
* Change Final Settings
*
* @package chpadpro
*/
add_filter("adb/modify/settings", function($settings){
//remove default settings key
unset($settings['SETTING_NAME']);
//add new settings
$settings['SETTING_NAME'] = "SETTING_VALUE";
return $settings;
});
adbpro/condition/check
/**
* Validate the page for adblock check
*
* @package chpadbpro
*/
add_filter("adbpro/condition/check", function($enable){
//TRUE - If want to disable else
//FALSE
return $enable;
});
adb/frontend/css
/**
* Change CSS code of modal - Frontend
*
* @package chpadbpro
*/
add_filter("adb/frontend/css", function($css){
//modify css code
});
adb/frontend/js
/**
* Change Javascript code of modal - Frontend
*
* @package chpadbpro
*/
add_filter("adb/frontend/js", function($js){
//modify css code
});
adb/frontend/footer
/**
* Change Footer code of modal and script - Frontend
*
* @package chpadbpro
*/
add_filter("adb/frontend/footer", function($css){
//modify footer code
});
adb/change/icon
/**
* Change Adblock Icon URL
*
* @package chpadbpro
*/
add_filter("adb/change/icon", function($iconURL){
//change icon url
$iconURL = "ICON URL";
return $iconURL;
});
adb/change/icon/alt
/**
* Change Adblock Icon Alt Text
*
* @package chpadbpro
*/
add_filter("adb/change/icon/alt", function($altText){
//change icon alt text
$altText = "WRITE ALT TEXT";
return $altText;
});
adb/change/html/icon
/**
* Change Adblock Icon HTML code
*
* @package chpadbpro
*/
add_filter("adb/change/html/icon", function($iconCode, $iconURL, $altText){
//change html code of icon
$iconCode = '<img src="'.$iconURL.'" alt="'.$altText.'">';
return $iconCode;
}, 10, 3);
chpadb/theme
For more details, see https://chpadblock.com/docs/custom-modal/#1-toc-title
/**
* Add custom Design for modal
*
* @package chpadbpro
* @see https://chpadblock.com/docs/custom-modal/#1-toc-title
*/
add_filter("chpadb/theme", function($theme){
$themeKey = "THEMEKEY";
$theme[$themeKey] = array(
"title" => "THEMENAME",
"settings" => "SETTINGS_ARRAY",
"defaults" => "SETTINGS_DEFAULT_VALUE",
"path" => "DESIGN_RELATIVE_PATH",
'url' => "DESIGN_RELATIVE_URL"
);
return $theme;
}, 10);
chpadbpro/settings/tab
For more details, see https://chpadblock.com/docs/custom-modal/#1-toc-title
/**
* Add custom settings tab to Admin Settings
*
* @package chpadbpro
* @see https://chpadblock.com/docs/add-settings-tab-to-admin/
*/
add_filter("chpadbpro/settings/tab", function($tabs){
$tabs["SETTING_SLUG"] = array(
"title" => "TITLE",
"tabTitle" => "TAB TITLE",
"desc" => "TAB DESCRIPTION"
);
return $tabs;
});
chpadb/settings/tab/content/{$SETTING_SLUG}
For detail documentation, see https://chpadblock.com/docs/add-settings-tab-to-admin/
/**
* Render Content for settings tab of Admin
* Return the path of the file where content is rendered
*
* @package chpadpro
* @see https://chpadblock.com/docs/add-settings-tab-to-admin/
*/
add_filter("chpadb/settings/tab/content/{$SETTING_SLUG}", function($path){
//modify content
return $path;
});
chpadbpro/request/servers
/**
* Modify or add server list
*
* @package chpadbpro
*/
add_filter("chpadbpro/request/servers", function($server){
//remove server section
unset($server["SECTION_KEY"]);
//add new server list to new section
$server["SECTION_KEY"] = array(
"title" => "SECTION TITLE",
"desc" => "SECTION DESCRIPTION",
"servers" => array(
"SERVER_NAME" => "URL"
)
);
//add new server to existing section
if( isset( $server["SECTION_KEY"] ) ){
$server['SECTION_KEY']['servers']["SERVER_NAME_1"] = "URL_1";
$server['SECTION_KEY']['servers']["SERVER_NAME_2"] = "URL_2";
}
return $server;
});
adb/debug/js
You can see the debug message on the javascript console.
/**
* Debug the plugin - frontend
*
* @package chpadbpro
*/
add_filter("adb/debug/js", function($enable){
return true;
});
adb/check/interval
Check the Adblock extension or plugins on the interval of x times
Modify the interval time
For more details, see https://chpadblock.com/docs/modal-options/#1-toc-title
/**
* Modify the adblock extension check interval
*
* @package chpadbpro
*/
add_filter("adb/check/interval", function(){
return 5000; //5 seconds
});
adb/popup/delay
/**
* Display popup message after x seconds
*
* @package chpadbpro
*/
add_filter("adb/popup/delay", function($sec){
return 5000; //5 seconds
});
chpadbpro/instruction/extensions
Add new extension to
/**
* Add Single Adblock Extension to instruction modal
*
* @package chpadbpro
*/
add_filter("chpadbpro/instruction/extensions", function($exts){
//add new extensions
$exts[] = array(
"id" => "EXTENSION_ID",
"img" => "EXTENSION IMAGE URL",
"title" => "EXTENSION TITLE",
"content" => "HTML CONTENT"
);
return $exts;
});