includes/DFP_Ads.php
Function get_tag_targeting
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function get_tag_targeting() {
global $post;
$targets = array();
if ( $post ) {
$tags = get_the_tags( $post->ID );
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
PHP keywords must be lowercase; expected "class" but found "Class" Open
Open
Class DFP_Ads {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::set_asynchronous_loading" is not in camel caps format Open
Open
public function set_asynchronous_loading( $val ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace of a class must be on the line after the definition Open
Open
Class DFP_Ads {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$id"; 1 found Open
Open
public function set_account_id( $id ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$val" and closing bracket; 1 found Open
Open
public function set_asynchronous_loading( $val ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::set_account_id" is not in camel caps format Open
Open
public function set_account_id( $id ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::set_targeting" is not in camel caps format Open
Open
public function set_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$val"; 1 found Open
Open
public function set_asynchronous_loading( $val ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$id" and closing bracket; 1 found Open
Open
public function set_account_id( $id ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( defined( 'DFP_CONCAT_SCRIPTS' ) && true === DFP_CONCAT_SCRIPTS ) {
- Create a ticketCreate a ticket
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $tags as $tag ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( count( $url_parts ) >= 2 ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::get_category_targeting" is not in camel caps format Open
Open
protected function get_category_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$atts" and closing bracket; 1 found Open
Open
public function shortcode( $atts ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::get_page_targeting" is not in camel caps format Open
Open
protected function get_page_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
The closing brace for the Class must go on the next line after the body Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $categories as $c ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $tags ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$atts"; 1 found Open
Open
public function shortcode( $atts ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between opening bracket and argument "$dfp_ads"; 1 found Open
Open
public function send_ads_to_js( $dfp_ads ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces between argument "$dfp_ads" and closing bracket; 1 found Open
Open
public function send_ads_to_js( $dfp_ads ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $wp->request != null ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $tags as $tag ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::send_ads_to_js" is not in camel caps format Open
Open
public function send_ads_to_js( $dfp_ads ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
foreach ( $categories as $c ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::scripts_and_styles" is not in camel caps format Open
Open
public function scripts_and_styles() {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $post ) {
- Create a ticketCreate a ticket
- Exclude checks
Space found after opening bracket of FOREACH loop Open
Open
foreach ( $tags as $tag ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( $post ) {
- Create a ticketCreate a ticket
- Exclude checks
Method name "DFP_Ads::get_tag_targeting" is not in camel caps format Open
Open
protected function get_tag_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Space found before closing bracket of FOREACH loop Open
Open
foreach ( $categories as $c ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sets page level targeting
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'Tag' => array(),
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function set_account_id( $id ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Set Asynchronous Loading
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* people want to be able to turn it off.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.3.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function set_asynchronous_loading( $val ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* or synchronous
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var bool $account_id
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var Position DFP_Ads Position
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* PHP5 Constructor
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string $script_name
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return bool|string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string $dir_uri
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Ad Positions - Array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ( isset( $this->account_id ) ? $this->account_id : false );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* the normal, correct way. This is because asynchronous is default and some
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param string $val
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Loads Google Ads JS to header
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sets the DFP Property Code. An 8-digit integer
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->asynch = ( $val == 'on' ? false : true );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sets all ad targeting
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ( isset( $this->asynch ) ? $this->asynch : false );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return mixed
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $asynch;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $page_targeting = array(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function __construct() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string $account_id
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
add_shortcode( 'dfp_ads', array( $this, 'shortcode' ) );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'Page' => array(),
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Categories
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Setting for whether to load an ad as asynchronous
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Stores the URI of the directory
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* so it will send 'on' when it's set to load synchronously, rather than
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function set_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $account_id;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $positions;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sets the flag for how the ads should load. By default, the setting is off,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.3.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $google_ad_script_name = 'google_ad_js';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'Category' => array(),
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Set DFP Property Code
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param $id int Code ID Number
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* DFP Account ID. Includes the two slashes
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->account_id = '/' . $id . '/';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @var string $google_ad_script_name
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Name of the javascript file.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $script_name = 'dfp_ads';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public $dir_uri;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/** Creates DFP_Ads Shortcode */
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return bool
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Page Title
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->page_targeting['Page'] = $this->get_page_targeting();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->page_targeting['Tag'] = $this->get_tag_targeting();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$object->positions = dfp_get_ad_positions();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$current_url = $wp->query_string;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( count( $url_parts ) >= 2 ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sets the tag targeting on the object
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( $this->google_ad_script_name, 'jquery' ),
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
false,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function scripts_and_styles() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/* Get the Final Ad Positions */
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_localize_script( $this->google_ad_script_name, 'dfp_ad_object', array( $ad_positions ) );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Example: [ '2015', '10', '11', 'post_slug' ]
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$targets[] = $tag->name;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
false,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} else {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected function get_category_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $categories as $c ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ( count( $targets ) < 1 ? '' : $targets );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
global $post;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $tags ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
false
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return DFP_Ads
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array|string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected function get_page_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$object->set_targeting();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
global $post;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
global $wp;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array|string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Send data to front end.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$object->script_name = null;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access protected
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$targets = array();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->script_name,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Display Shortcode
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $position->get_position();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->page_targeting['Category'] = $this->get_category_targeting();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$object->dir_uri = null;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$current_url = $wp->request;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$array = explode( '/', $current_url );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access protected
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $wp->request != null ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $post ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ( count( $array ) < 1 ? array( 'Home' ) : $array );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return ( count( $targets ) < 1 ? '' : $targets );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access public
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( defined( 'DFP_CONCAT_SCRIPTS' ) && true === DFP_CONCAT_SCRIPTS ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_register_script(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$dfp_ads_script_url,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$gads_script_url = $this->dir_uri . '/assets/js/google-ads.js';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return mixed Returns HTML data for the position
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Google Ads JS Script
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param $atts array
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Adds URL sections to targeting
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$position = dfp_get_ad_position( $atts['id'] );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$categories = get_the_category( $post->ID );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ( $post ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$tags = get_the_tags( $post->ID );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return mixed
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$gads_script_url = $this->dir_uri . '/assets/js/google-ads.min.js';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} else {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_script( $this->google_ad_script_name );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Preps the script
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_enqueue_script( $this->script_name );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Copy the original
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$object = clone $this;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $object;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* This function will return an array of page directories without the URL.
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
// Tags
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Sets the category targeting on the object
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$url_parts = explode( '=', $current_url );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return array|string
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
} else {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$array = array();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
array( 'jquery' ),
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
wp_register_script(
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$dfp_ads_script_url = $this->dir_uri . '/assets/js/dfp-ads.js';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @access protected
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$targets[] = $cat->name;
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Registers Scripts. Localizes data to interstitial_ad.js
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$gads_script_url,
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$ad_positions = apply_filters( 'pre_dfp_ads_to_js', $this );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
false
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
);
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function send_ads_to_js( $dfp_ads ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$array[ $url_parts[0] ] = $url_parts[1];
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$targets = array();
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$cat = get_category( $c );
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
protected function get_tag_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param DFP_Ads $dfp_ads
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function shortcode( $atts ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @since 0.0.1
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
foreach ( $tags as $tag ) {
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$dfp_ads_script_url = $this->dir_uri . '/assets/js/dfp-ads.min.js';
- Create a ticketCreate a ticket
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->google_ad_script_name,
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return ( isset( $this->asynch ) ? $this->asynch : false );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function __construct() {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function set_account_id( $id ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
add_shortcode( 'dfp_ads', array( $this, 'shortcode' ) );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function set_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function set_asynchronous_loading( $val ) {
- Create a ticketCreate a ticket
- Exclude checks
Class name "DFP_Ads" is not in camel caps format Open
Open
Class DFP_Ads {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
add_shortcode( 'dfp_ads', array( $this, 'shortcode' ) );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return ( isset( $this->asynch ) ? $this->asynch : false );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return ( isset( $this->account_id ) ? $this->account_id : false );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return ( isset( $this->account_id ) ? $this->account_id : false );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$url_parts = explode( '=', $current_url );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $tags as $tag ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_script( $this->google_ad_script_name );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( count( $url_parts ) >= 2 ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$tags = get_the_tags( $post->ID );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$url_parts = explode( '=', $current_url );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return ( count( $targets ) < 1 ? '' : $targets );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return ( count( $targets ) < 1 ? '' : $targets );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
if ( defined( 'DFP_CONCAT_SCRIPTS' ) && true === DFP_CONCAT_SCRIPTS ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_script( $this->google_ad_script_name );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
foreach ( $categories as $c ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$ad_positions = apply_filters( 'pre_dfp_ads_to_js', $this );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $wp->request != null ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$array = explode( '/', $current_url );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return ( count( $targets ) < 1 ? '' : $targets );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$ad_positions = apply_filters( 'pre_dfp_ads_to_js', $this );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$position = dfp_get_ad_position( $atts['id'] );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( count( $url_parts ) >= 2 ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$tags = get_the_tags( $post->ID );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $tags ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function shortcode( $atts ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$cat = get_category( $c );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$array = explode( '/', $current_url );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( defined( 'DFP_CONCAT_SCRIPTS' ) && true === DFP_CONCAT_SCRIPTS ) {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
protected function get_category_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
protected function get_page_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$categories = get_the_category( $post->ID );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $post ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return ( count( $targets ) < 1 ? '' : $targets );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
Open
if ( $post ) {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_localize_script( $this->google_ad_script_name, 'dfp_ad_object', array( $ad_positions ) );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
return ( count( $array ) < 1 ? array( 'Home' ) : $array );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( defined( 'DFP_CONCAT_SCRIPTS' ) && true === DFP_CONCAT_SCRIPTS ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_localize_script( $this->google_ad_script_name, 'dfp_ad_object', array( $ad_positions ) );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$position = dfp_get_ad_position( $atts['id'] );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function send_ads_to_js( $dfp_ads ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
$categories = get_the_category( $post->ID );
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
protected function get_tag_targeting() {
- Create a ticketCreate a ticket
- Exclude checks
Opening brace should be on a new line Open
Open
public function scripts_and_styles() {
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_enqueue_script( $this->script_name );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
if ( count( $url_parts ) >= 2 ) {
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
return ( count( $array ) < 1 ? array( 'Home' ) : $array );
- Create a ticketCreate a ticket
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
$cat = get_category( $c );
- Create a ticketCreate a ticket
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_enqueue_script( $this->script_name );
- Create a ticketCreate a ticket
- Exclude checks