This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* strtr() for JavaScript | |
* Translate characters or replace substrings | |
* | |
* @author Dmitry Sheiko | |
* @version strtr.js, v 1.0 | |
* @license MIT | |
* @copyright (c) Dmitry Sheiko http://dsheiko.com | |
**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Setting post views in meta | |
* | |
* @param int $postID | |
* @return void | |
* | |
*/ | |
if ( !function_exists('prefix_set_post_views') ) : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Font Awesome</title> | |
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.3.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.9.1/js-yaml.min.js"></script> | |
<script type='text/javascript'> | |
$(window).load(function(){ | |
$.get('https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/src/icons.yml', function(data){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pattern = '/\.(' . 'fa-' . '(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/'; | |
$subject = file_get_contents('fontawesome-all.css'); | |
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER); | |
$icons = array(); | |
foreach($matches as $match){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pattern = '/\.(' . 'fa-' . '(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/'; | |
$subject = file_get_contents(FIELD_PRESS_PATH.'/assets/frameworks/font-awesome-5/css/fontawesome-all.css'); | |
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER); | |
$icons = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { __ } = wp.i18n; // Import __() from wp.i18n | |
const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks | |
/** | |
* Register: aa Gutenberg Block. | |
*/ | |
registerBlockType( 'my-plugin/my-custom-block', { | |
title: __( 'Hook Example' ), // Block title. | |
icon: 'shield', // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/. | |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get CSS without empty selector | |
* Call after minification of CSS | |
* | |
* @since 2.1.0 | |
* @access public | |
* | |
* @param string $minified_css | |
* @return string | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Block Export: gutentor | |
* | |
* Export Block on JSON | |
*/ | |
/* From WordPress Core*/ | |
const { | |
__ |
OlderNewer