Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter AlexIbiza

    (@alexibiza)

    Thank you, would be highly appreciated. Just re-linked it to the contact button i was talking about.

    will be available for trackback during the next few hours.

    Kind regards

    Thread Starter AlexIbiza

    (@alexibiza)

    OK, for anybody stumbling upon the same issue, actually writing it out makes it work – so if you have somehting like:

    public function update($new_instance, $old_instance)
    	{
    		$instance = $old_instance;
    
    'foreach($instance as $key => $value) {
    $instance[$key] = strip_tags( $new_instance[$key]);
    }

    using the “written out form” like this:

    public function update($new_instance, $old_instance)
    	{
    		$instance = $old_instance;
    
    $instance['title'] = strip_tags( $new_instance['title']);
    	$instance['Headline'] = strip_tags( $new_instance['Headline']);
    	...
    
    	 }'

    works – although i do not have a clue why this works like that, as the foreach method should actually do the same – or am i having a thinking problem there ?

    Thread Starter AlexIbiza

    (@alexibiza)

    Sorry, first post, as i said.
    I narrowed down the problem, seems to be an issues with using

    ‘foreach($instance as $key => $value) {
    $instance[$key] = strip_tags( $new_instance[$key]);
    }’

    in the update function to generate variable mapping.

    Is this not allowed ?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)