Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Solving problems.

JR Tashjian jrtashjian

💻
Solving problems.
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am jrtashjian on github.
  • I am jrtashjian (https://keybase.io/jrtashjian) on keybase.
  • I have a public key ASD3sj3gc-e2q-Zc83eigjc8OhJboImQ2Eejxj-tsu58aAo

To claim this, I am signing this object:

@jrtashjian
jrtashjian / .env
Last active Mar 10, 2020
OAuth2 ESI Client
View .env
EVEONLINE_KEY=**your application key**
EVEONLINE_SECRET=**your application secret**
EVEONLINE_REDIRECT_URI=http://yourapp.tld/auth/eve/callback/
View 01.php
<?php
wp_register_script(
'gwg-block',
GWG_ESNEXT_PLUGIN_URL . 'block.build.js',
[ 'wp-blocks', 'wp-i18n', 'wp-data', 'wp-compose' ],
GWG_ESNEXT_VERSION,
true // Enqueue script in the footer.
);
View .browserlistrc
> 1%
ie >= 11
last 1 Android versions
last 1 ChromeAndroid versions
last 2 Chrome versions
last 2 Firefox versions
last 2 Safari versions
last 2 iOS versions
last 2 Edge versions
last 2 Opera versions
View gwg-creating-a-block-category.php
<?php
/**
* Add a block category for "Get With Gutenberg" if it doesn't exist already.
*
* @param array $categories Array of block categories.
*
* @return array
*/
function gwg_block_categories( $categories ) {
$category_slugs = wp_list_pluck( $categories, 'slug' );
@jrtashjian
jrtashjian / 01.php
Last active Apr 11, 2019
Get With Gutenberg - How to Internationalize Your Block • https://getwithgutenberg.com/2019/04/how-to-internationalize-your-block/
View 01.php
<?php
function gwg_register_block_type() {
if ( ! function_exists( 'register_block_type' ) ) {
// Gutenberg is not active.
return;
}
wp_register_style(
'gwg-style',
View readme.txt
=== CurateWP ===
Contributors: jrtashjian
Tags: curatewp, curation, block, widget, shortcode,
Requires at least: 4.9.8
Tested up to: 5.1
Requires PHP: 5.2.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@jrtashjian
jrtashjian / functions.php
Created Jan 16, 2019
Filter: curatewp_template_dir
View functions.php
<?php
add_filter( 'curatewp_template_dir', function( $template_dir ) {
// Change the template directory in your Parent or Child theme.
return 'curation_templates';
} );
@jrtashjian
jrtashjian / functions.php
Created Jan 16, 2019
Filter: curatewp_section_layout_args
View functions.php
<?php
add_filter( 'curatewp_section_layout_args', function( $layout_args, $section ) {
// Change all section featured posts layout to the "Hero".
$layout_args['layout-featured-posts'] = 'hero';
return $layout_args;
}, 10, 2 );
@jrtashjian
jrtashjian / functions.php
Last active Jan 16, 2019
Filter: curatewp_section_objects_cache_time
View functions.php
<?php
add_filter( 'curatewp_section_objects_cache_time', function() {
// Change the cache time to hourly.
return HOUR_IN_SECONDS;
} );
You can’t perform that action at this time.