This file contains 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
/* global pointerLocalization */ | |
export default class Pointers { | |
constructor() { | |
this.pointersList = {}; | |
this.openedPointers = JSON.parse(localStorage.getItem('openedPointers')) || []; | |
this.openPointer = this.openPointer.bind(this); | |
this.setLabel = this.setLabel.bind(this); | |
this.initPointers = this.initPointers.bind(this); | |
} |
This file contains 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
/* global pointerLocalization */ | |
import Pointers from './pointers'; | |
$(function() { | |
const pointers = new Pointers(); | |
// Filter the current context pointers | |
const pointersInContext = Object.values(pointerLocalization.pointers) | |
.filter((pointer) => pointer.context === pointerLocalization.currentScreen); |
This file contains 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 | |
/** | |
* Pointers manger file | |
* | |
* @since 1.0.0 | |
* @package Plugin | |
*/ | |
namespace Plugin; |
This file contains 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
docker run --name travis-debug -dit travisci/ci-garnet:packer-1512502276-986baf0 /sbin/init | |
docker exec -it travis-debug bash -l | |
su - travis | |
rvm install 2.3.0 | |
rvm use 2.3.0 | |
cd builds | |
git clone --branch issue_9709_fix https://github.com/ekivolowitz/travis-build.git | |
cd travis-build | |
gem install travis | |
travis # to create ~/.travis |
This file contains 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 | |
//in media.php class | |
/** | |
* Checks if the file with the same name exists in the media library, and renames it if it does | |
* | |
* @param array $file An array of data for a single file. | |
* @return array $file Modified array of data for a single file if the file name is the same. | |
*/ | |
public function intercept_file_upload( $file ) { | |
// If, for some odd reason, the file name is empty don't bother with it and let WP handle it. |
This file contains 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
100 - Thin | |
200 - Extra Light, Ultra Light | |
300 - Light | |
400 - Normal, Book, Regular | |
500 - Medium | |
600 - Semi Bold, Demi Bold | |
700 - Bold | |
800 - Extra Bold, Ultra Bold | |
900 - Black, Heavy |
This file contains 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 | |
public function user_get_check( \WP_REST_Request $request ) { | |
// To avoid CORS issue. | |
if ( $request->get_method() === 'OPTIONS' ) { | |
return true; | |
} | |
$auth_array = $request->get_headers(); |
This file contains 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
/* global tinymce */ | |
(function() { | |
const columnsTinyMCEButton = (function(){ | |
return function(tinyMCE) { | |
tinyMCE.PluginManager.add( 'columns', function( editor, url ) { | |
// Add Button to Visual Editor Toolbar | |
editor.addButton('columns', { | |
title: 'Insert Column', | |
cmd: 'columns', |
This file contains 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 | |
/** | |
* Validate WYSIWYG field so that it outputs only 250 characters | |
* | |
* Targets the overview field in the documentation only. | |
* | |
* @param bool $valid Check the validity of the field. | |
* @param string $value The field value. | |
* @param array $field Array with the field details. |
This file contains 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
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": "<", | |
"selector": "text.html" | |
}, | |
{ | |
"characters": "$>:\\", |