• Resolved Gregosz

    (@gregosz)


    Hi!
    I have a problem with loading a custom CSS file by calling a filter hook in my child theme functions.php:
    1) In my child theme I have added a new folder: custom-jvm-rich-text-icons.
    2) I added the emoji-icons.css file to the custom-jvm-rich-text-icons folder.
    3) For test purpose the content of emoji-icons.css is exactly same like in wp-content/plugins/jvm-richtext-insert-icons/dist/fa-4.7/font-awesome.min.css.
    4) I have added the following snippet to my function.php:

    function add_my_css($cssfile) {
        $cssfile = get_stylesheet_directory_uri().'/custom-jvm-rich-text-icons/emoji-icons.css';
        return $cssfile;
    }
    add_filter( 'jvm_richtext_icons_css_file', 'add_my_css');

    The panel opened with the Insert Icon button correctly opens the window with icons, but the icons themselves are not visible. There are blanks there.

    What I am doing wrong?:)
    Grzegorz

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Gregosz

    (@gregosz)

    Hi,

    I found the solution ??
    It is enough to replace
    add_filter( 'jvm_richtext_icons_css_file', 'add_my_css');
    with
    add_filter( 'jvm_richtext_icons_css_file', 'add_my_css', 10, 1);

    regards,
    Grzegorz

    Plugin Author Joris van Montfort

    (@jorisvanmontfort)

    Great you fixed it yourself!

    Kind regards, Joris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with loading a custom CSS file by calling a filter hook’ is closed to new replies.