views/noticias/wp-content/themes/supermag/acmethemes/sidebar-widget/acme-ad.php
/**

         * Function to Updating widget replacing old instances with new

         *

         * @access public

         * @since 1.0

         *

         * @param array $new_instance new arrays value

         * @param array $old_instance old arrays value

         * @return array

         *

         */
Function to Updating widget replacing old instances with new



@param array $new_instance new arrays value
@param array $old_instance old arrays value
@return array
Function to Updating widget replacing old instances with new @param array $new_instance new arrays value @param array $old_instance old arrays value @return array
function update( $new_instance, $old_instance ) {
            $instance = $old_instance;
            $instance['supermag_ad_title'] = ( isset( $new_instance['supermag_ad_title'] ) ) ?  sanitize_text_field( $new_instance['supermag_ad_title'] ): '';
            $instance['supermag_ad_image'] = ( isset( $new_instance['supermag_ad_image'] ) ) ?  esc_url( $new_instance['supermag_ad_image'] ): '';
            $instance['supermag_ad_link'] = ( isset( $new_instance['supermag_ad_link'] ) ) ?  esc_url( $new_instance['supermag_ad_link'] ): '';
            $instance['supermag_ad_img_alt'] = ( isset( $new_instance['supermag_ad_img_alt'] ) ) ?  esc_attr( $new_instance['supermag_ad_img_alt'] ): '';
            $instance['supermag_ad_new_window'] = isset($new_instance['supermag_ad_new_window'])? 1 : 0;
            return $instance;
        }
function update ( $ new_instance , $ old_instance ) { $ instance = $ old_instance ; $ instance [ 'supermag_ad_title' ] = ( isset ( $ new_instance [ 'supermag_ad_title' ] ) ) ? sanitize_text_field ( $ new_instance [ 'supermag_ad_title' ] ) : '' ; $ instance [ 'supermag_ad_image' ] = ( isset ( $ new_instance [ 'supermag_ad_image' ] ) ) ? esc_url ( $ new_instance [ 'supermag_ad_image' ] ) : '' ; $ instance [ 'supermag_ad_link' ] = ( isset ( $ new_instance [ 'supermag_ad_link' ] ) ) ? esc_url ( $ new_instance [ 'supermag_ad_link' ] ) : '' ; $ instance [ 'supermag_ad_img_alt' ] = ( isset ( $ new_instance [ 'supermag_ad_img_alt' ] ) ) ? esc_attr ( $ new_instance [ 'supermag_ad_img_alt' ] ) : '' ; $ instance [ 'supermag_ad_new_window' ] = isset ( $ new_instance [ 'supermag_ad_new_window' ] ) ? 1 : 0 ; return $ instance ; }
Function to Updating widget replacing old instances with new
Function to Updating widget replacing old instances with new