From 41e2714dd3da0b9766ea547dadb24c5ca2a72ec8 Mon Sep 17 00:00:00 2001 From: Ryan Nagle Date: Mon, 17 Aug 2015 13:53:50 -0500 Subject: [PATCH] remove all traces of inc/ad-codes.php --- docs/api/inc/index.rst | 5 -- fonts/fontello/demo.html | 2 +- functions.php | 7 --- inc/ad-codes.php | 118 --------------------------------------- 4 files changed, 1 insertion(+), 131 deletions(-) delete mode 100644 inc/ad-codes.php diff --git a/docs/api/inc/index.rst b/docs/api/inc/index.rst index ddd79efee..43492b2fe 100644 --- a/docs/api/inc/index.rst +++ b/docs/api/inc/index.rst @@ -5,11 +5,6 @@ WordPress theme custom functions are defined in functions.php. To make maintenan Miscellaneous functions: ------------------------ - - ad-codes.php: If you have the `Ad Codes Manager `_ plugin installed, this provides: - - - some additional whitelisting - - ad tag locations for Largo - - cached-core-functions.php: - caches the ``wp_nav_menu`` for all tag and category pages used in the nav menus diff --git a/fonts/fontello/demo.html b/fonts/fontello/demo.html index 742f3b7f2..732c8a564 100644 --- a/fonts/fontello/demo.html +++ b/fonts/fontello/demo.html @@ -335,4 +335,4 @@

- \ No newline at end of file + diff --git a/functions.php b/functions.php index f437f64fa..63106696a 100644 --- a/functions.php +++ b/functions.php @@ -182,10 +182,6 @@ private function require_files() { $includes[] = '/inc/custom-less-variables.php'; } - if ( $this->is_plugin_active( 'ad-code-manager' ) ) { - $includes[] = '/inc/ad-codes.php'; - } - foreach ( $includes as $include ) { require_once( get_template_directory() . $include ); } @@ -339,9 +335,6 @@ public function is_less_enabled() { public function is_plugin_active( $plugin_slug ) { switch ( $plugin_slug ) { - case 'ad-code-manager': - return (bool) class_exists( 'Ad_Code_Manager' ); - case 'co-authors-plus': return (bool) class_exists( 'coauthors_plus' ); diff --git a/inc/ad-codes.php b/inc/ad-codes.php deleted file mode 100644 index 588069156..000000000 --- a/inc/ad-codes.php +++ /dev/null @@ -1,118 +0,0 @@ -register_breakpoint('phone', array('minWidth'=>0,'maxWidth'=>769)); - $DoubleClick->register_breakpoint('tablet', array('minWidth'=>769,'maxWidth'=>980)); - $DoubleClick->register_breakpoint('desktop', array('minWidth'=>980,'maxWidth'=>9999)); - - } - -} -add_action( 'dfw_setup', 'largo_dfw_setup' ); - - - -/** - * Ad Codes configuration for use with Ad Code Manager plugin - * http://wordpress.org/extend/plugins/ad-code-manager/ - */ - -// Need to allow script tags in elements for the ad_html option -// This is a potential security risk, but it's pretty slight -/* -global $allowedposttags; -$allowedposttags['script'] = array( - 'type' => array(), - 'src' => array(), - 'language' => array() -); -$allowedposttags['noscript'] = array(); -*/ - -// Any ad network URLs must be whitelisted here first. This may be superfluous as ACM includes the major ones. -function largo_acm_whiltelisted_script_urls( $whitelisted_urls ) { - $whitelisted_urls = array($_SERVER['HTTP_HOST']); - return $whitelisted_urls; -} -add_filter( 'acm_whitelisted_script_urls', 'largo_acm_whiltelisted_script_urls'); - -/* Set a default URL if %url% is used? (currently placeholder) - * Example in Gist: https://gist.github.com/1631131 - */ -function largo_acm_default_url( $url ) { - if ( 0 === strlen( $url ) ) { - return "http://ad.doubleclick.net/adj/%site_name%/%zone1%;s1=%zone1%;s2=;pid=%permalink%;fold=%fold%;kw=;test=%test%;ltv=ad;pos=%pos%;dcopt=%dcopt%;tile=%tile%;sz=%size%;"; - } -} -//add_filter( 'acm_default_url', 'largo_acm_default_url' ) ; - -// Add additional output tokens -function largo_acm_output_tokens( $output_tokens, $tag_id, $code_to_display ) { - // This is a quick example to show how to assign an output token to any value. Things like the zone1 value can be used to compute. - $output_tokens['%rand%'] = rand(1,100); - return $output_tokens; -} -// The low priority will not overwrite what's set up. Higher values will. -// add_filter('acm_output_tokens', 'largo_acm_output_tokens', 5, 3 ); - - -// Add actual ad tags -if ( ! function_exists( 'largo_ad_tags_ids' ) ) { - function largo_ad_tags_ids( $ad_tag_ids ) { - return array( - array( - 'tag' => 'leaderboard', - 'url_vars' => array( - 'tag' => '728x90', - 'sz' => '728x90', - 'height' => '90', - 'width' => '728', - ), - 'enable_ui_mapping' => true, - ), - array( - 'tag' => 'sidebar 300x250', - 'url_vars' => array( - 'tag' => '300x250', - 'sz' => '300x250', - 'height' => '250', - 'width' => '300', - ), - 'enable_ui_mapping' => true, - ), - array( - 'tag' => 'mobile banner', - 'url_vars' => array( - 'tag' => '300x50', - 'sz' => '300x50', - 'height' => '50', - 'width' => '300', - ), - 'enable_ui_mapping' => true, - ), - - ); - } -} -add_filter( 'acm_ad_tag_ids', 'largo_ad_tags_ids' ); - - -function largo_acm_output_html( $output_html, $tag_id ) { - return ''; - //return of_get_option('ad_html'); -} -//add_filter( 'acm_output_html','largo_acm_output_html', 5, 2 ); -add_filter( 'acm_display_ad_codes_without_conditionals', '__return_true' ); \ No newline at end of file