• Resolved underro

    (@underro)


    Hi.

    Please help.
    I want to disable autoformatting for the brand description (until I finish the descriptions).
    If I put a “-” (minus sign) and space, it automatically turns into a “?” bullet (a centered dot).

    I don’t want to turn it into a list. I just want the paragraph to start with “-“.
    How could I do this?
    I made several attempts, but without success.

    Thank you.

    //test1
    function my_brand_description_formatter($content) {
        $new_content = $content;
        $new_content = str_replace(array("\r\n", "\r", "\n", "\t"), '', $new_content);
        $new_content = str_replace(' ', ' ', $new_content);
        return $new_content;
    }
    
    add_filter('pwb-brand-description', 'my_brand_description_formatter', 99);
    
    
    
    
    //test 2
    function wpb_stop_br_formatting( $content ) {
        return str_replace( '<br />', '', $content );
    }
    add_filter( 'pwb_brand_description', 'wpb_stop_br_formatting' );
    
    
    
    //test 3
    add_filter('pwb_brand_description', 'pwb_disable_auto_formatting');
    function pwb_disable_auto_formatting($content) {
       return wp_kses_post($content);
    }
    
    
    //test 4
    add_filter( 'pwb_brand_description', 'remove_automatic_formatting' );
    function remove_automatic_formatting( $description ) {
      return wp_kses_post( $description );
    }
    
    • This topic was modified 2 years, 1 month ago by underro.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable auto formatting’ is closed to new replies.