Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: wpautop behavior for dynamic blocks #76882
    crerem
    Participant

    Hi,
    I’m doing the plugin for ThemeForrest and in their guidelines they ask to not remove the wpautop filter. The guys that will do the review are not gonna investigate too much the problem – they will just reject it. That’s why i was trying to not use this solution. The alternative will be to use get_post_field( 'post_excerpt',..) and see if the Gutenberg team will consider this a issue or not.

    Thank you again for taking the time to look over this.

    in reply to: wpautop behavior for dynamic blocks #76437
    crerem
    Participant

    So, is this a bug or expected behavior ? Any solutions for this situation -( removing the filter is not acceptable on places like themeforest ).
    Thank you for your help.

    in reply to: wpautop behavior for dynamic blocks #76394
    crerem
    Participant

    🙂 i think i found it, It happens in your 12-dynamic example also.(maybe you can confirm it for me )

    If you use get_the_excerpt() (and i think get_the_content() also ) it will trigger the wpautop filter.

    For ex

    
    foreach ( $recent_posts as $post ) {
            
    		$post_id  = $post['ID'];
    		$markup  .= get_the_excerpt($post_id).sprintf(
    			'<li>
                                
                            <a href="%1$s">%2$s</a>
    line1 
    
    line2
    </li>',
    			esc_url( get_permalink( $post_id ) ),
    			esc_html( get_the_title( $post_id ) )
    		);
    	}
    $markup.='</ul>';

    Here is a screenshot http://prntscr.com/luhguk

    Can you confirm my findings ? Thank you

    in reply to: wpautop behavior for dynamic blocks #76392
    crerem
    Participant

    Hi,
    The same html markup but hard coded is displayed correct. The php generated markup is not . Looking at my php function i think that. myabe, using the ob_start() and ob_get_contents php function could be the problem. This is the code that generated the output.

    
            ob_start();  
            while ($recent_posts->have_posts()): $recent_posts->the_post();
                if($type == 'estate_property'){
                    get_template_part('templates/property_unit'.$property_card_type_string);
                } else {
                    if(isset($attributes['align']) && $attributes['align']=='horizontal'){
                        get_template_part('templates/blog_unit');
                    }else{
                        get_template_part('templates/blog_unit2');
                    }
                }
            endwhile;
    
            $templates = ob_get_contents();
            ob_end_clean(); 
    in reply to: wpautop behavior for dynamic blocks #76389
    crerem
    Participant

    Hi,
    Let me some tests with hard coded html and will get back to you.
    Thanks

    in reply to: Integer attributes are not getting saved #75853
    crerem
    Participant

    Hi Zac,
    Yes, “number” works.
    Thank you

Viewing 6 posts - 1 through 6 (of 6 total)