Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/Divi/includes/widgets
File: widget-ads.php
<?php class AdvWidget extends WP_Widget
[0] Fix | Delete
{
[1] Fix | Delete
function __construct(){
[2] Fix | Delete
$widget_ops = array( 'description' => esc_html__( 'Displays Advertisements', 'Divi' ) );
[3] Fix | Delete
$control_ops = array('width' => 400, 'height' => 500);
[4] Fix | Delete
parent::__construct( false, $name = esc_html__( 'ET Advertisement', 'Divi' ), $widget_ops, $control_ops );
[5] Fix | Delete
}
[6] Fix | Delete
[7] Fix | Delete
/* Displays the Widget in the front-end */
[8] Fix | Delete
function widget($args, $instance){
[9] Fix | Delete
extract($args);
[10] Fix | Delete
$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? esc_html__( 'Advertisement', 'Divi' ) : esc_html( $instance['title'] ) );
[11] Fix | Delete
$use_relpath = isset($instance['use_relpath']) ? $instance['use_relpath'] : false;
[12] Fix | Delete
$new_window = isset($instance['new_window']) ? $instance['new_window'] : false;
[13] Fix | Delete
$bannerPath[1] = empty($instance['bannerOnePath']) ? '' : $instance['bannerOnePath'];
[14] Fix | Delete
$bannerUrl[1] = empty($instance['bannerOneUrl']) ? '' : $instance['bannerOneUrl'];
[15] Fix | Delete
$bannerTitle[1] = empty($instance['bannerOneTitle']) ? '' : $instance['bannerOneTitle'];
[16] Fix | Delete
$bannerAlt[1] = empty($instance['bannerOneAlt']) ? '' : $instance['bannerOneAlt'];
[17] Fix | Delete
[18] Fix | Delete
$bannerPath[2] = empty($instance['bannerTwoPath']) ? '' : $instance['bannerTwoPath'];
[19] Fix | Delete
$bannerUrl[2] = empty($instance['bannerTwoUrl']) ? '' : $instance['bannerTwoUrl'];
[20] Fix | Delete
$bannerTitle[2] = empty($instance['bannerTwoTitle']) ? '' : $instance['bannerTwoTitle'];
[21] Fix | Delete
$bannerAlt[2] = empty($instance['bannerTwoAlt']) ? '' : $instance['bannerTwoAlt'];
[22] Fix | Delete
[23] Fix | Delete
$bannerPath[3] = empty($instance['bannerThreePath']) ? '' : $instance['bannerThreePath'];
[24] Fix | Delete
$bannerUrl[3] = empty($instance['bannerThreeUrl']) ? '' : $instance['bannerThreeUrl'];
[25] Fix | Delete
$bannerTitle[3] = empty($instance['bannerThreeTitle']) ? '' : $instance['bannerThreeTitle'];
[26] Fix | Delete
$bannerAlt[3] = empty($instance['bannerThreeAlt']) ? '' : $instance['bannerThreeAlt'];
[27] Fix | Delete
[28] Fix | Delete
$bannerPath[4] = empty($instance['bannerFourPath']) ? '' : $instance['bannerFourPath'];
[29] Fix | Delete
$bannerUrl[4] = empty($instance['bannerFourUrl']) ? '' : $instance['bannerFourUrl'];
[30] Fix | Delete
$bannerTitle[4] = empty($instance['bannerFourTitle']) ? '' : $instance['bannerFourTitle'];
[31] Fix | Delete
$bannerAlt[4] = empty($instance['bannerFourAlt']) ? '' : $instance['bannerFourAlt'];
[32] Fix | Delete
[33] Fix | Delete
$bannerPath[5] = empty($instance['bannerFivePath']) ? '' : $instance['bannerFivePath'];
[34] Fix | Delete
$bannerUrl[5] = empty($instance['bannerFiveUrl']) ? '' : $instance['bannerFiveUrl'];
[35] Fix | Delete
$bannerTitle[5] = empty($instance['bannerFiveTitle']) ? '' : $instance['bannerFiveTitle'];
[36] Fix | Delete
$bannerAlt[5] = empty($instance['bannerFiveAlt']) ? '' : $instance['bannerFiveAlt'];
[37] Fix | Delete
[38] Fix | Delete
$bannerPath[6] = empty($instance['bannerSixPath']) ? '' : $instance['bannerSixPath'];
[39] Fix | Delete
$bannerUrl[6] = empty($instance['bannerSixUrl']) ? '' : $instance['bannerSixUrl'];
[40] Fix | Delete
$bannerTitle[6] = empty($instance['bannerSixTitle']) ? '' : $instance['bannerSixTitle'];
[41] Fix | Delete
$bannerAlt[6] = empty($instance['bannerSixAlt']) ? '' : $instance['bannerSixAlt'];
[42] Fix | Delete
[43] Fix | Delete
$bannerPath[7] = empty($instance['bannerSevenPath']) ? '' : $instance['bannerSevenPath'];
[44] Fix | Delete
$bannerUrl[7] = empty($instance['bannerSevenUrl']) ? '' : $instance['bannerSevenUrl'];
[45] Fix | Delete
$bannerTitle[7] = empty($instance['bannerSevenTitle']) ? '' : $instance['bannerSevenTitle'];
[46] Fix | Delete
$bannerAlt[7] = empty($instance['bannerSevenAlt']) ? '' : $instance['bannerSevenAlt'];
[47] Fix | Delete
[48] Fix | Delete
$bannerPath[8] = empty($instance['bannerEightPath']) ? '' : $instance['bannerEightPath'];
[49] Fix | Delete
$bannerUrl[8] = empty($instance['bannerEightUrl']) ? '' : $instance['bannerEightUrl'];
[50] Fix | Delete
$bannerTitle[8] = empty($instance['bannerEightTitle']) ? '' : $instance['bannerEightTitle'];
[51] Fix | Delete
$bannerAlt[8] = empty($instance['bannerEightAlt']) ? '' : $instance['bannerEightAlt'];
[52] Fix | Delete
[53] Fix | Delete
echo et_core_intentionally_unescaped( $before_widget, 'html' );
[54] Fix | Delete
[55] Fix | Delete
if ( $title ) {
[56] Fix | Delete
echo et_core_intentionally_unescaped( $before_title . $title . $after_title, 'html' );
[57] Fix | Delete
}
[58] Fix | Delete
?>
[59] Fix | Delete
<div class="adwrap">
[60] Fix | Delete
<?php $i = 1;
[61] Fix | Delete
while ($i <= 8):
[62] Fix | Delete
if ($bannerPath[$i] !== '') { ?>
[63] Fix | Delete
<?php
[64] Fix | Delete
if ($bannerTitle[$i] === '') {
[65] Fix | Delete
$bannerTitle[$i] = "advertisement";
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
if ($bannerAlt[$i] === '') {
[69] Fix | Delete
$bannerAlt[$i] = "advertisement";
[70] Fix | Delete
}
[71] Fix | Delete
?>
[72] Fix | Delete
<a href="<?php echo esc_url( $bannerUrl[$i] ); ?>" <?php if ($new_window) echo('target="_blank"') ?>><img src="<?php if ( $use_relpath ) echo esc_url( home_url() ); else echo esc_attr( $bannerPath[$i] ); ?><?php if ( $use_relpath ) echo ("/" . esc_attr( $bannerPath[$i] ) ); ?>" alt="<?php echo esc_attr( $bannerAlt[$i] ); ?>" title="<?php echo esc_attr( $bannerTitle[$i] ); ?>" /></a>
[73] Fix | Delete
<?php }; $i++;
[74] Fix | Delete
endwhile; ?>
[75] Fix | Delete
</div> <!-- end adwrap -->
[76] Fix | Delete
<?php
[77] Fix | Delete
echo et_core_intentionally_unescaped( $after_widget, 'html' );
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
/*Saves the settings. */
[81] Fix | Delete
function update($new_instance, $old_instance){
[82] Fix | Delete
$instance = $old_instance;
[83] Fix | Delete
$instance['title'] = stripslashes($new_instance['title']);
[84] Fix | Delete
$instance['use_relpath'] = 0;
[85] Fix | Delete
$instance['new_window'] = 0;
[86] Fix | Delete
if ( isset($new_instance['use_relpath']) ) $instance['use_relpath'] = 1;
[87] Fix | Delete
if ( isset($new_instance['new_window']) ) $instance['new_window'] = 1;
[88] Fix | Delete
$instance['bannerOnePath'] = esc_attr($new_instance['bannerOnePath']);
[89] Fix | Delete
$instance['bannerOneUrl'] = esc_url($new_instance['bannerOneUrl']);
[90] Fix | Delete
$instance['bannerOneTitle'] = esc_attr($new_instance['bannerOneTitle']);
[91] Fix | Delete
$instance['bannerOneAlt'] = esc_attr($new_instance['bannerOneAlt']);
[92] Fix | Delete
[93] Fix | Delete
$instance['bannerTwoPath'] = esc_attr($new_instance['bannerTwoPath']);
[94] Fix | Delete
$instance['bannerTwoUrl'] = esc_url($new_instance['bannerTwoUrl']);
[95] Fix | Delete
$instance['bannerTwoTitle'] = esc_attr($new_instance['bannerTwoTitle']);
[96] Fix | Delete
$instance['bannerTwoAlt'] = esc_attr($new_instance['bannerTwoAlt']);
[97] Fix | Delete
[98] Fix | Delete
$instance['bannerThreePath'] = esc_attr($new_instance['bannerThreePath']);
[99] Fix | Delete
$instance['bannerThreeUrl'] = esc_url($new_instance['bannerThreeUrl']);
[100] Fix | Delete
$instance['bannerThreeTitle'] = esc_attr($new_instance['bannerThreeTitle']);
[101] Fix | Delete
$instance['bannerThreeAlt'] = esc_attr($new_instance['bannerThreeAlt']);
[102] Fix | Delete
[103] Fix | Delete
$instance['bannerFourPath'] = esc_attr($new_instance['bannerFourPath']);
[104] Fix | Delete
$instance['bannerFourUrl'] = esc_url($new_instance['bannerFourUrl']);
[105] Fix | Delete
$instance['bannerFourTitle'] = esc_attr($new_instance['bannerFourTitle']);
[106] Fix | Delete
$instance['bannerFourAlt'] = esc_attr($new_instance['bannerFourAlt']);
[107] Fix | Delete
[108] Fix | Delete
$instance['bannerFivePath'] = esc_attr($new_instance['bannerFivePath']);
[109] Fix | Delete
$instance['bannerFiveUrl'] = esc_url($new_instance['bannerFiveUrl']);
[110] Fix | Delete
$instance['bannerFiveTitle'] = esc_attr($new_instance['bannerFiveTitle']);
[111] Fix | Delete
$instance['bannerFiveAlt'] = esc_attr($new_instance['bannerFiveAlt']);
[112] Fix | Delete
[113] Fix | Delete
$instance['bannerSixPath'] = esc_attr($new_instance['bannerSixPath']);
[114] Fix | Delete
$instance['bannerSixUrl'] = esc_url($new_instance['bannerSixUrl']);
[115] Fix | Delete
$instance['bannerSixTitle'] = esc_attr($new_instance['bannerSixTitle']);
[116] Fix | Delete
$instance['bannerSixAlt'] = esc_attr($new_instance['bannerSixAlt']);
[117] Fix | Delete
[118] Fix | Delete
$instance['bannerSevenPath'] = esc_attr($new_instance['bannerSevenPath']);
[119] Fix | Delete
$instance['bannerSevenUrl'] = esc_url($new_instance['bannerSevenUrl']);
[120] Fix | Delete
$instance['bannerSevenTitle'] = esc_attr($new_instance['bannerSevenTitle']);
[121] Fix | Delete
$instance['bannerSevenAlt'] = esc_attr($new_instance['bannerSevenAlt']);
[122] Fix | Delete
[123] Fix | Delete
$instance['bannerEightPath'] = esc_attr($new_instance['bannerEightPath']);
[124] Fix | Delete
$instance['bannerEightUrl'] = esc_url($new_instance['bannerEightUrl']);
[125] Fix | Delete
$instance['bannerEightTitle'] = esc_attr($new_instance['bannerEightTitle']);
[126] Fix | Delete
$instance['bannerEightAlt'] = esc_attr($new_instance['bannerEightAlt']);
[127] Fix | Delete
[128] Fix | Delete
return $instance;
[129] Fix | Delete
}
[130] Fix | Delete
[131] Fix | Delete
/*Creates the form for the widget in the back-end. */
[132] Fix | Delete
function form($instance){
[133] Fix | Delete
//Defaults
[134] Fix | Delete
$instance = wp_parse_args( (array) $instance, array('title'=>__( 'Advertisement', 'Divi' ), 'use_relpath' => false, 'new_window' => true, 'bannerOnePath'=>'', 'bannerOneUrl'=>'', 'bannerOneTitle'=>'', 'bannerOneAlt'=>'', 'bannerTwoPath'=>'', 'bannerTwoUrl'=>'', 'bannerTwoTitle'=>'', 'bannerTwoAlt'=>'','bannerThreePath'=>'', 'bannerThreeUrl'=>'','bannerThreeTitle'=>'', 'bannerThreeAlt'=>'','bannerFourPath'=>'', 'bannerFourUrl'=>'','bannerFourTitle'=>'', 'bannerFourAlt'=>'','bannerFivePath'=>'', 'bannerFiveUrl'=>'','bannerFiveTitle'=>'', 'bannerFiveAlt'=>'','bannerSixPath'=>'', 'bannerSixUrl'=>'','bannerSixTitle'=>'','bannerSixAlt'=>'', 'bannerSevenPath'=>'', 'bannerSevenUrl'=>'','bannerSevenTitle'=>'','bannerSevenAlt'=>'','bannerEightPath'=>'', 'bannerEightUrl'=>'','bannerEightTitle'=>'','bannerEightAlt'=>'') );
[135] Fix | Delete
[136] Fix | Delete
$title = $instance['title'];
[137] Fix | Delete
$bannerPath[1] = $instance['bannerOnePath'];
[138] Fix | Delete
$bannerUrl[1] = $instance['bannerOneUrl'];
[139] Fix | Delete
$bannerTitle[1] = $instance['bannerOneTitle'];
[140] Fix | Delete
$bannerAlt[1] = $instance['bannerOneAlt'];
[141] Fix | Delete
[142] Fix | Delete
$bannerPath[2] = $instance['bannerTwoPath'];
[143] Fix | Delete
$bannerUrl[2] = $instance['bannerTwoUrl'];
[144] Fix | Delete
$bannerTitle[2] = $instance['bannerTwoTitle'];
[145] Fix | Delete
$bannerAlt[2] = $instance['bannerTwoAlt'];
[146] Fix | Delete
[147] Fix | Delete
$bannerPath[3] = $instance['bannerThreePath'];
[148] Fix | Delete
$bannerUrl[3] = $instance['bannerThreeUrl'];
[149] Fix | Delete
$bannerTitle[3] = $instance['bannerThreeTitle'];
[150] Fix | Delete
$bannerAlt[3] = $instance['bannerThreeAlt'];
[151] Fix | Delete
[152] Fix | Delete
$bannerPath[4] = $instance['bannerFourPath'];
[153] Fix | Delete
$bannerUrl[4] = $instance['bannerFourUrl'];
[154] Fix | Delete
$bannerTitle[4] = $instance['bannerFourTitle'];
[155] Fix | Delete
$bannerAlt[4] = $instance['bannerFourAlt'];
[156] Fix | Delete
[157] Fix | Delete
$bannerPath[5] = $instance['bannerFivePath'];
[158] Fix | Delete
$bannerUrl[5] = $instance['bannerFiveUrl'];
[159] Fix | Delete
$bannerTitle[5] = $instance['bannerFiveTitle'];
[160] Fix | Delete
$bannerAlt[5] = $instance['bannerFiveAlt'];
[161] Fix | Delete
[162] Fix | Delete
$bannerPath[6] = $instance['bannerSixPath'];
[163] Fix | Delete
$bannerUrl[6] = $instance['bannerSixUrl'];
[164] Fix | Delete
$bannerTitle[6] = $instance['bannerSixTitle'];
[165] Fix | Delete
$bannerAlt[6] = $instance['bannerSixAlt'];
[166] Fix | Delete
[167] Fix | Delete
$bannerPath[7] = $instance['bannerSevenPath'];
[168] Fix | Delete
$bannerUrl[7] = $instance['bannerSevenUrl'];
[169] Fix | Delete
$bannerTitle[7] = $instance['bannerSevenTitle'];
[170] Fix | Delete
$bannerAlt[7] = $instance['bannerSevenAlt'];
[171] Fix | Delete
[172] Fix | Delete
$bannerPath[8] = esc_attr($instance['bannerEightPath']);
[173] Fix | Delete
$bannerUrl[8] = esc_url($instance['bannerEightUrl']);
[174] Fix | Delete
$bannerTitle[8] = esc_attr($instance['bannerEightTitle']);
[175] Fix | Delete
$bannerAlt[8] = esc_attr($instance['bannerEightAlt']);
[176] Fix | Delete
[177] Fix | Delete
# Title
[178] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('title') ) . '">' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('title') ) . '" name="' . esc_attr( $this->get_field_name('title') ) . '" type="text" value="' . esc_html( $title ) . '" /></p>'; ?>
[179] Fix | Delete
[180] Fix | Delete
<input class="checkbox" type="checkbox" <?php checked($instance['use_relpath'], true) ?> id="<?php echo esc_attr( $this->get_field_id('use_relpath') ); ?>" name="<?php echo esc_attr( $this->get_field_name('use_relpath') ); ?>" />
[181] Fix | Delete
<label for="<?php echo esc_attr( $this->get_field_id('use_relpath') ); ?>"><?php esc_html_e( 'Use Relative Image Paths', 'Divi' ); ?></label><br />
[182] Fix | Delete
<input class="checkbox" type="checkbox" <?php checked($instance['new_window'], true) ?> id="<?php echo esc_attr( $this->get_field_id('new_window') ); ?>" name="<?php echo esc_attr( $this->get_field_name('new_window') ); ?>" />
[183] Fix | Delete
<label for="<?php echo esc_attr( $this->get_field_id('new_window') ); ?>"><?php esc_html_e( 'Open in a new window', 'Divi' ); ?></label><br /><br />
[184] Fix | Delete
[185] Fix | Delete
<?php # Banner #1 Image
[186] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerOnePath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #1 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerOnePath') ) . '" name="' . esc_attr( $this->get_field_name('bannerOnePath') ) . '" type="text" value="' . esc_attr( $bannerPath[1] ) . '" /></p>';
[187] Fix | Delete
# Banner #1 Url
[188] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerOneUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #1 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerOneUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerOneUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[1] ) . '" /></p>';
[189] Fix | Delete
# Banner #1 Title
[190] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerOneTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #1 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerOneTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerOneTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[1] ) . '" /></p>';
[191] Fix | Delete
# Banner #1 Alt
[192] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerOneAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #1 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerOneAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerOneAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[1] ) . '" /></p>';
[193] Fix | Delete
# Banner #2 Image
[194] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerTwoPath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #2 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerTwoPath') ) . '" name="' . esc_attr( $this->get_field_name('bannerTwoPath') ) . '" type="text" value="' . esc_attr( $bannerPath[2] ) . '" /></p>';
[195] Fix | Delete
# Banner #2 Url
[196] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerTwoUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #2 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerTwoUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerTwoUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[2] ) . '" /></p>';
[197] Fix | Delete
# Banner #2 Title
[198] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerTwoTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #2 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerTwoTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerTwoTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[2] ) . '" /></p>';
[199] Fix | Delete
# Banner #2 Alt
[200] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerTwoAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #2 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerTwoAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerTwoAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[2] ) . '" /></p>';
[201] Fix | Delete
# Banner #3 Image
[202] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerThreePath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #3 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerThreePath') ) . '" name="' . esc_attr( $this->get_field_name('bannerThreePath') ) . '" type="text" value="' . esc_attr( $bannerPath[3] ) . '" /></p>';
[203] Fix | Delete
# Banner #3 Url
[204] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerThreeUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #3 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerThreeUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerThreeUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[3] ) . '" /></p>';
[205] Fix | Delete
# Banner #3 Title
[206] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerThreeTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #3 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerThreeTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerThreeTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[3] ) . '" /></p>';
[207] Fix | Delete
# Banner #3 Alt
[208] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerThreeAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #3 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerThreeAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerThreeAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[3] ) . '" /></p>';
[209] Fix | Delete
# Banner #4 Image
[210] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFourPath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #4 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFourPath') ) . '" name="' . esc_attr( $this->get_field_name('bannerFourPath') ) . '" type="text" value="' . esc_attr( $bannerPath[4] ) . '" /></p>';
[211] Fix | Delete
# Banner #4 Url
[212] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFourUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #4 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFourUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerFourUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[4] ) . '" /></p>';
[213] Fix | Delete
# Banner #4 Title
[214] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFourTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #4 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFourTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerFourTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[4] ) . '" /></p>';
[215] Fix | Delete
# Banner #4 Alt
[216] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFourAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #4 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFourAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerFourAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[4] ) . '" /></p>';
[217] Fix | Delete
# Banner #5 Image
[218] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFivePath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #5 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFivePath') ) . '" name="' . esc_attr( $this->get_field_name('bannerFivePath') ) . '" type="text" value="' . esc_attr( $bannerPath[5] ) . '" /></p>';
[219] Fix | Delete
# Banner #5 Url
[220] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFiveUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #5 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFiveUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerFiveUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[5] ) . '" /></p>';
[221] Fix | Delete
# Banner #5 Title
[222] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFiveTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #5 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFiveTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerFiveTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[5] ) . '" /></p>';
[223] Fix | Delete
# Banner #5 Alt
[224] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerFiveAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #5 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerFiveAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerFiveAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[5] ) . '" /></p>';
[225] Fix | Delete
# Banner #6 Image
[226] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSixPath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #6 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSixPath') ) . '" name="' . esc_attr( $this->get_field_name('bannerSixPath') ) . '" type="text" value="' . esc_attr( $bannerPath[6] ) . '" /></p>';
[227] Fix | Delete
# Banner #6 Url
[228] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSixUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #6 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSixUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerSixUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[6] ) . '" /></p>';
[229] Fix | Delete
# Banner #6 Title
[230] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSixTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #6 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSixTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerSixTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[6] ) . '" /></p>';
[231] Fix | Delete
# Banner #6 Alt
[232] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSixAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #6 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSixAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerSixAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[6] ) . '" /></p>';
[233] Fix | Delete
# Banner #7 Image
[234] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSevenPath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #7 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSevenPath') ) . '" name="' . esc_attr( $this->get_field_name('bannerSevenPath') ) . '" type="text" value="' . esc_attr( $bannerPath[7] ) . '" /></p>';
[235] Fix | Delete
# Banner #7 Url
[236] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSevenUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #7 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSevenUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerSevenUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[7] ) . '" /></p>';
[237] Fix | Delete
# Banner #7 Title
[238] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSevenTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #7 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSevenTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerSevenTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[7] ) . '" /></p>';
[239] Fix | Delete
# Banner #7 Alt
[240] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerSevenAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #7 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerSevenAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerSevenAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[7] ) . '" /></p>';
[241] Fix | Delete
# Banner #8 Image
[242] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerEightPath') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #8 ' . esc_html__( 'Image', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerEightPath') ) . '" name="' . esc_attr( $this->get_field_name('bannerEightPath') ) . '" type="text" value="' . esc_attr( $bannerPath[8] ) . '" /></p>';
[243] Fix | Delete
# Banner #8 Url
[244] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerEightUrl') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #8 ' . esc_html__( 'Url', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerEightUrl') ) . '" name="' . esc_attr( $this->get_field_name('bannerEightUrl') ) . '" type="text" value="' . esc_url( $bannerUrl[8] ) . '" /></p>';
[245] Fix | Delete
# Banner #8 Title
[246] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerEightTitle') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #8 ' . esc_html__( 'Title', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerEightTitle') ) . '" name="' . esc_attr( $this->get_field_name('bannerEightTitle') ) . '" type="text" value="' . esc_attr( $bannerTitle[8] ) . '" /></p>';
[247] Fix | Delete
# Banner #8 Alt
[248] Fix | Delete
echo '<p><label for="' . esc_attr( $this->get_field_id('bannerEightAlt') ) . '">' . esc_html__( 'Banner', 'Divi' ) . ' #8 ' . esc_html__( 'Alt', 'Divi' ) . ':' . '</label><input class="widefat" id="' . esc_attr( $this->get_field_id('bannerEightAlt') ) . '" name="' . esc_attr( $this->get_field_name('bannerEightAlt') ) . '" type="text" value="' . esc_attr( $bannerAlt[8] ) . '" /></p>';
[249] Fix | Delete
echo '<p><small>' . esc_html__( "If you don't want to display some banners - leave approptiate fields blank", 'Divi' ) . '.</small></p>';
[250] Fix | Delete
}
[251] Fix | Delete
[252] Fix | Delete
}// end AdvWidget class
[253] Fix | Delete
[254] Fix | Delete
function AdvWidgetInit() {
[255] Fix | Delete
register_widget('AdvWidget');
[256] Fix | Delete
}
[257] Fix | Delete
[258] Fix | Delete
add_action('widgets_init', 'AdvWidgetInit');
[259] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function