uvca.php
38 lines
| 1 | <?php |
| 2 | |
| 3 | function auxin_uvca_font_icons() { |
| 4 | |
| 5 | $uvca_icons = get_option( 'smile_fonts', array() ); |
| 6 | |
| 7 | $phlox_icons[ THEME_ID . '-icons' ] = array( |
| 8 | 'include' => 'smile_fonts/' . THEME_ID, |
| 9 | 'folder' => 'smile_fonts/' . THEME_ID, |
| 10 | 'style' => THEME_ID . '/auxin-front.css', |
| 11 | 'config' => 'charmap.php' |
| 12 | ); |
| 13 | |
| 14 | $uvca_icons = $phlox_icons + $uvca_icons; |
| 15 | |
| 16 | update_option( 'smile_fonts', $uvca_icons ); |
| 17 | |
| 18 | $upload_dir = wp_upload_dir(); |
| 19 | |
| 20 | global $wp_filesystem; |
| 21 | |
| 22 | $path = trailingslashit( $upload_dir['basedir'] ) . 'smile_fonts/' . THEME_ID . '/'; |
| 23 | |
| 24 | $charmap_file = trailingslashit( $path ) . 'charmap.php'; |
| 25 | $css_file = trailingslashit( $path ) . 'auxin-front.css'; |
| 26 | |
| 27 | $charmap = file_get_contents( AUXELS_ADMIN_DIR . '/includes/compatibility/uvca/auxicon/charmap.txt' ); |
| 28 | $css = file_get_contents( AUXELS_ADMIN_DIR . '/includes/compatibility/uvca/auxicon/auxin-front.css' ); |
| 29 | |
| 30 | auxin_put_contents( $charmap, $charmap_file ); |
| 31 | auxin_put_contents( $css, $css_file ); |
| 32 | |
| 33 | |
| 34 | } |
| 35 | |
| 36 | add_action( 'auxels_activated', 'auxin_uvca_font_icons' ); |
| 37 | |
| 38 |