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

         * Function to Updating widget replacing old instances with new

         *

         * @access public

         * @since 1.0.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
public function update( $new_instance, $old_instance ) {
            $instance = array();
            $instance['supermag_cat_title'] = ( isset( $new_instance['supermag_cat_title'] ) ) ? sanitize_text_field( $new_instance['supermag_cat_title'] ) : '';
            $instance['supermag_cat'] = ( isset( $new_instance['supermag_cat'] ) ) ? esc_attr( $new_instance['supermag_cat'] ) : '';
            $instance['supermag_enable_first_featured'] = isset($new_instance['supermag_enable_first_featured'])? 1 : 0;
            $instance['supermag_post_col_layout'] = isset($new_instance['supermag_post_col_layout'])? absint( $new_instance['supermag_post_col_layout'] ) : 1;
            $instance['supermag_post_col_first_featured_image_layout'] = isset($new_instance['supermag_post_col_first_featured_image_layout'])? esc_attr( $new_instance['supermag_post_col_first_featured_image_layout'] ) : 'large';
            $instance['supermag_post_col_normal_image_layout'] = isset($new_instance['supermag_post_col_normal_image_layout'])? esc_attr( $new_instance['supermag_post_col_normal_image_layout'] ) : 'large';
            return $instance;
        }
public function update ( $ new_instance , $ old_instance ) { $ instance = array ( ) ; $ instance [ 'supermag_cat_title' ] = ( isset ( $ new_instance [ 'supermag_cat_title' ] ) ) ? sanitize_text_field ( $ new_instance [ 'supermag_cat_title' ] ) : '' ; $ instance [ 'supermag_cat' ] = ( isset ( $ new_instance [ 'supermag_cat' ] ) ) ? esc_attr ( $ new_instance [ 'supermag_cat' ] ) : '' ; $ instance [ 'supermag_enable_first_featured' ] = isset ( $ new_instance [ 'supermag_enable_first_featured' ] ) ? 1 : 0 ; $ instance [ 'supermag_post_col_layout' ] = isset ( $ new_instance [ 'supermag_post_col_layout' ] ) ? absint ( $ new_instance [ 'supermag_post_col_layout' ] ) : 1 ; $ instance [ 'supermag_post_col_first_featured_image_layout' ] = isset ( $ new_instance [ 'supermag_post_col_first_featured_image_layout' ] ) ? esc_attr ( $ new_instance [ 'supermag_post_col_first_featured_image_layout' ] ) : 'large' ; $ instance [ 'supermag_post_col_normal_image_layout' ] = isset ( $ new_instance [ 'supermag_post_col_normal_image_layout' ] ) ? esc_attr ( $ new_instance [ 'supermag_post_col_normal_image_layout' ] ) : 'large' ; return $ instance ; }
Function to Updating widget replacing old instances with new
Function to Updating widget replacing old instances with new