-
AuthorPosts
-
January 21st, 2019 at 00:26 #72908naomiPower User
Good evening,
one last question for today 🙂
I tried to integrate custom smileys using a snippet for functions.php that I have found through some research:
add_filter( 'smilies_src', 'my_custom_smilies_src', 10, 3 ); function my_custom_smilies_src( $img_src, $img, $siteurl ) { return get_stylesheet_directory_uri() . '/smilies/' . $img; }
I am not quite sure what “10” and “3” do, but I uploaded 11 smileys into a new folder “smilies” that is now located in the child theme folder on my FTP (which I adjusted in the snippet). Also, I have named the smileys after the standard smileys from “/wp-includes/images/smilies/” including the ending (they actually are .png but my FTP seems to still display them properly in .gif).
For testing purposes, I have entered a comment on my website in a private post but the entered smiley is still the standard one. I tried naming it after both the standard smiling smileys in the folder. Then, I figured that this is not really the smiley I see on my comment, but this one: 🙂
The smiley is not part of my FTP, now I am confused of what and how to use to see my own smileys 🙂
I am looking forward to your reply!
Kind regards,
NaomiWebsite: earth-renewing.com
February 4th, 2019 at 17:29 #73362ZedCryout Creations mastermindIf the location of the new files coincides with that described in the code, the new smilies should work. 10 & 3 are add_filter() parameters.
Make sure you also clear the cache (both on the site and in your browser).
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.February 4th, 2019 at 22:02 #73391naomiPower UserThe smileys that I have attempted to replace seem to be the standard Worpress smileys which already were not being used on the website.
It looks to me like the smileys I try to change are your smileys (https://s.w.org/images/core/emoji/11/svg/1f642.svg, Cryout Creations)?
My issue is that they are >not< on my FTP to be able to replace the folder with the smileys. So how do I replace them? 🙂
February 23rd, 2019 at 16:32 #74539ZedCryout Creations mastermindw.org is a WordPress-controlled domain.
The fact that the smilies are loaded from that location may be either because of some form of caching/image optimization functionality (like that provided by Jetpack) or perhaps the WordPress team decided to “optimize” the smilies by loading them off-site.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.February 24th, 2019 at 14:56 #74576naomiPower UserThis is interesting. I will do some more research on that. Thank you!
-
AuthorPosts
The topic ‘Integrating Custom Smileys’ is closed to new replies.