mirror of
https://github.com/SophiaAtkinson/yourls-emojis.git
synced 2025-06-27 14:57:42 -07:00
Initial commit, and final commit.
This commit is contained in:
1
util/emojis.txt
Normal file
1
util/emojis.txt
Normal file
File diff suppressed because one or more lines are too long
24
util/get_emojis.php
Normal file
24
util/get_emojis.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
* you can update the emoji list by changing the unicode link below
|
||||
* then, visit your site's /user/plugins/yourls-emojis/util/get_emojis.php page to run the script
|
||||
*
|
||||
* most recent 13.1 https://www.unicode.org/emoji/charts/full-emoji-list.html
|
||||
*/
|
||||
|
||||
if( !defined( 'YOURLS_ABSPATH' ) ) die();
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
/*
|
||||
* Last retrieved: April 11, 2021
|
||||
*/
|
||||
function get_emojis() {
|
||||
$detect_emoji = Emoji\detect_emoji(file_get_contents('https://unicode.org/Public/emoji/13.1/emoji-test.txt'));
|
||||
$file = fopen(__DIR__ . '/emojis.txt', 'w+');
|
||||
|
||||
if ( sizeof($detect_emoji) > 0 ) {
|
||||
foreach ( $detect_emoji as $emoji ) {
|
||||
fwrite($file, $emoji['emoji']);
|
||||
}
|
||||
}
|
||||
}
|
||||
get_emojis();
|
Reference in New Issue
Block a user