Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/advanced.../includes
File: array_ad_conditions.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Conditions under which to (not) show an ad
[3] Fix | Delete
* I don’t like huge arrays like this to clutter my classes
[4] Fix | Delete
* and anyway, this might be needed on multiple places
[5] Fix | Delete
*
[6] Fix | Delete
* at the bottom, you find a filter to be able to extend / remove your own elements
[7] Fix | Delete
*
[8] Fix | Delete
* elements
[9] Fix | Delete
* key - internal id of the condition; needs to be unique, obviously
[10] Fix | Delete
* label - title in the dashboard
[11] Fix | Delete
* description - (optional) description displayed in the dashboard
[12] Fix | Delete
* type - information / markup type
[13] Fix | Delete
* idfield - input field for comma separated lists of ids
[14] Fix | Delete
* radio - radio button
[15] Fix | Delete
* others - added to not trigger internal sanitization
[16] Fix | Delete
*
[17] Fix | Delete
* note: ’idfield’ always has a {field}_not version that is created automatically and being its own condition
[18] Fix | Delete
*
[19] Fix | Delete
* @deprecated since 1.7
[20] Fix | Delete
*/
[21] Fix | Delete
[22] Fix | Delete
// avoid direct execution
[23] Fix | Delete
if ( ! class_exists( 'Advanced_Ads', false ) ) {
[24] Fix | Delete
die();
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
$advanced_ads_slug = Advanced_Ads::get_instance()->get_plugin_slug();
[28] Fix | Delete
[29] Fix | Delete
$advanced_ads_ad_conditions = [
[30] Fix | Delete
'enabled' => [ // dummy, to let the validation of the general ad conditions past
[31] Fix | Delete
// 'label' => __('Post Types', 'advanced-ads'),
[32] Fix | Delete
// 'description' => __('Choose the public post types on which to display the ad.', 'advanced-ads'),
[33] Fix | Delete
'type' => 'other',
[34] Fix | Delete
// 'callback' => array('Advanced_Ads_Display_Condition_Callbacks', 'post_types')
[35] Fix | Delete
],
[36] Fix | Delete
'posttypes' => [
[37] Fix | Delete
'label' => __( 'Post Types', 'advanced-ads' ),
[38] Fix | Delete
'description' => __( 'Choose the public post types on which to display the ad.', 'advanced-ads' ),
[39] Fix | Delete
'type' => 'textvalues',
[40] Fix | Delete
'callback' => ['Advanced_Ads_Display_Condition_Callbacks', 'post_types']
[41] Fix | Delete
],
[42] Fix | Delete
'categoryids' => [
[43] Fix | Delete
'label' => __( 'Categories, Tags and Taxonomies', 'advanced-ads' ),
[44] Fix | Delete
'description' => __( 'Choose terms from public category, tag and other taxonomies a post must belong to in order to have ads.', 'advanced-ads' ),
[45] Fix | Delete
'type' => 'idfield',
[46] Fix | Delete
'callback' => ['Advanced_Ads_Display_Condition_Callbacks', 'terms']
[47] Fix | Delete
],
[48] Fix | Delete
'categoryarchiveids' => [
[49] Fix | Delete
'label' => __( 'Category Archives', 'advanced-ads' ),
[50] Fix | Delete
'description' => __( 'comma seperated IDs of category archives', 'advanced-ads' ),
[51] Fix | Delete
'type' => 'idfield',
[52] Fix | Delete
'callback' => ['Advanced_Ads_Display_Condition_Callbacks', 'category_archives']
[53] Fix | Delete
],
[54] Fix | Delete
'postids' => [
[55] Fix | Delete
'label' => __( 'Individual Posts, Pages and Public Post Types', 'advanced-ads' ),
[56] Fix | Delete
'description' => __( 'Choose on which individual posts, pages and public post type pages you want to display or hide ads.', 'advanced-ads' ),
[57] Fix | Delete
'type' => 'other',
[58] Fix | Delete
'callback' => ['Advanced_Ads_Display_Condition_Callbacks', 'single_posts']
[59] Fix | Delete
],
[60] Fix | Delete
'is_front_page' => [
[61] Fix | Delete
'label' => __( 'Home Page', 'advanced-ads' ),
[62] Fix | Delete
'description' => __( 'show on Home page', 'advanced-ads' ),
[63] Fix | Delete
'type' => 'radio',
[64] Fix | Delete
],
[65] Fix | Delete
'is_singular' => [
[66] Fix | Delete
'label' => __( 'Singular Pages', 'advanced-ads' ),
[67] Fix | Delete
'description' => __( 'show on singular pages/posts', 'advanced-ads' ),
[68] Fix | Delete
'type' => 'radio',
[69] Fix | Delete
],
[70] Fix | Delete
'is_archive' => [
[71] Fix | Delete
'label' => __( 'Archive Pages', 'advanced-ads' ),
[72] Fix | Delete
'description' => __( 'show on any type of archive page (category, tag, author and date)', 'advanced-ads' ),
[73] Fix | Delete
'type' => 'radio',
[74] Fix | Delete
],
[75] Fix | Delete
'is_search' => [
[76] Fix | Delete
'label' => __( 'Search Results', 'advanced-ads' ),
[77] Fix | Delete
'description' => __( 'show on search result pages', 'advanced-ads' ),
[78] Fix | Delete
'type' => 'radio',
[79] Fix | Delete
],
[80] Fix | Delete
'is_404' => [
[81] Fix | Delete
'label' => __( '404 Page', 'advanced-ads' ),
[82] Fix | Delete
'description' => __( 'show on 404 error page', 'advanced-ads' ),
[83] Fix | Delete
'type' => 'radio',
[84] Fix | Delete
],
[85] Fix | Delete
'is_attachment' => [
[86] Fix | Delete
'label' => __( 'Attachment Pages', 'advanced-ads' ),
[87] Fix | Delete
'description' => __( 'show on attachment pages', 'advanced-ads' ),
[88] Fix | Delete
'type' => 'radio',
[89] Fix | Delete
],
[90] Fix | Delete
'is_main_query' => [
[91] Fix | Delete
'label' => __( 'Secondary Queries', 'advanced-ads' ),
[92] Fix | Delete
'description' => __( 'allow ads in secondary queries', 'advanced-ads' ),
[93] Fix | Delete
'type' => 'radio',
[94] Fix | Delete
]
[95] Fix | Delete
];
[96] Fix | Delete
[97] Fix | Delete
return apply_filters( 'advanced-ads-conditions', $advanced_ads_ad_conditions );
[98] Fix | Delete
[99] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function