• Resolved TheDani

    (@thedani)


    Hey. It works fine on most of the all of the WP menus on emoji, but only WP Table Builder that has problem. First I have written text and emoji on admin.php?page=wptb-builder&table=123123, so there is no problem with it. But saving and reload browser, I have unfortunately problem with it. Either the emoji is “?” or “□” (square, not emoji), or I have with <img> with .svg and size is 2-300px on frontside.

    Backside on page=wptb-builder&table:

    <img draggable="false" role="img" class="emoji" alt="??" src="https://s.w.org/images/core/emoji/15.0.3/svg/1f603.svg" data-mce-selected="1"> 

    I want to show only this emoji icon: “??” But it fails each time.

    functions.php:

    function disable_emojis() {
     remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
     remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
     remove_action( 'wp_print_styles', 'print_emoji_styles' );
     remove_action( 'admin_print_styles', 'print_emoji_styles' );
     remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
     remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
     remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
    
     add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
     add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
    }
    
    add_action( 'init', 'disable_emojis' );
    
    function disable_emojis_tinymce( $plugins ) {
     if ( is_array( $plugins ) ) {
     return array_diff( $plugins, array( 'wpemoji' ) );
     } else {
     return array();
     }
    }
    
    function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) {
     if ( 'dns-prefetch' == $relation_type ) {
     $emoji_svg_url = apply_filters( 'emoji_svg_url', 
     //"https://s.w.org/images/core/emoji/15.0.3/svg/" ); //I have tried this first, but fails
    "https://s.w.org/images/core/emoji/"."*"."/svg/" ); //15.0.3 atm, update automatic  
     $urls = array_diff( $urls, array( $emoji_svg_url ) );
     }
    
    return $urls;
    }
    

    • This topic was modified 11 months, 1 week ago by TheDani.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    Hello @thedani if you want to add emojis to WPTB tables, you’ll need to use the Custom HTML element.

    Cheers!

    Thread Starter TheDani

    (@thedani)

    Using “Custom HTML” under WP Table Builder, here is the correct symbol/image on the backside (click the pic):

    [url=https://ibb.co/rGQP9dW][img]https://i.ibb.co/zhmcd6k/wp-table-bs-correct-02.jpg[/img][/url]

    And on frontside is unfortunately error symbol/image (click the pic):

    [url=https://ibb.co/GdxyNLr][img]https://i.ibb.co/4Fmz3G0/wp-table-bs-error-02.jpg[/img][/url]

    Can you help me more?

    Plugin Contributor Zahin Azmayeen

    (@permafrost06)

    It’s working fine on my side. Please note that emojis (e.g. ??, ??, ?? etc.) get converted to an <img> tag like this:

    <img draggable="false" role="img" class="emoji" alt="??" src="https://s.w.org/images/core/emoji/15.0.3/svg/1f600.svg">

    This happens automatically when you insert emojis into a custom html element and then select something else. When you select the custom html element again, you’ll see that the emoji has changed to an <img> tag.

    Hope that helps.

    Thread Starter TheDani

    (@thedani)

    Custom HTML > Insert HTML
    before save:
    Hello ??, ??

    after save + F5:
    Hello ?, 慄

    I have converted the database to enginee InnoDB and collation utf8mb4_unicode_520_ci
    SHOW TABLE STATUS;

    Thread Starter TheDani

    (@thedani)

    I’ve tested it with basic emoji ala “??” with the cell top and left (1 row and 1 column). And tested it with both Basic Text and Basic Custom HTML. No matter what I use, it was either large size emoji or similar to “□”.

    Finally done it now:
    [wptb id=1234567]

    style.css: 

    #wptb-table-id-1234567 img.emoji {
    height: 15px;
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘emoji doesn’t work on Table Builder’ is closed to new replies.