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 | |
/** | |
* Why does this exist? http://xkcd.com/1179/ also because it makes sense to have a standard way in WordPress to work with | |
* dates and times so that plugin developers can create plugins that will work in any timezone worldwide. | |
* | |
* WordPress sets the default timezone during execution to UTC, reguardless of what the server is set to. | |
* This means that date( 'FORMAT' ) will always give you the current time in UTC, not the timezone you have set | |
* in the WP admin settings. Use date( 'FORMAT', current_time( 'timestamp' ) ) instead to get WP local time. Likewise, | |
* use current_time( 'timestamp' ) instead of time() for the local time. | |
*/ |
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
You'll need proper development environment, learn about Ember CLI - https://www.youtube.com/watch?v=hygxGDjhGp8. | |
You might want to know about more about what's happening under the hood, watch Robert Jackson talk about Ember Magic - https://www.youtube.com/watch?v=OjqcI8KWesk. | |
Learn more about complex architecture in Ember https://www.youtube.com/watch?v=Kcij9lH2OyM | |
Learn more about Ember Data - https://www.youtube.com/watch?v=HL2bMjndviE. | |
You can get lost in the View layer, learn about Events and Actions from Luke Melia - https://www.youtube.com/watch?v=w6__hEUjqaw |
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
var cloneWithProps = React.addons.cloneWithProps; | |
var SmartSortable = React.createClass({ | |
getDefaultProps: function() { | |
return {component: "ul", childComponent: "li"}; | |
}, | |
render: function() { | |
var props = jQuery.extend({}, this.props); |
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
#!/bin/bash | |
# args | |
MSG=${1-'deploy from git'} | |
BRANCH=${2-'trunk'} | |
# paths | |
SRC_DIR=$(git rev-parse --show-toplevel) | |
DIR_NAME=$(basename $SRC_DIR) | |
DEST_DIR=~/svn/wp-plugins/$DIR_NAME/$BRANCH |
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
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management | |
# 6. Networking | |
# 7. System Operations & Information |
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 | |
/** | |
* Add a settings link to your WordPress plugin on the plugin listing page. | |
*/ | |
function add_settings_link( $links, $file ){ | |
if( $file == plugin_basename(__FILE__) ){ | |
$settings_link = '<a href="'.admin_url('admin.php?page=my-page').'">'.__('Settings', $this->textdomain).'</a>'; | |
array_unshift( $links, $settings_link ); | |
} |
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 | |
/** | |
* Plugin Name: TGM API Helper | |
* Plugin URI: https://thomasgriffin.io | |
* Description: Whitelists the plugins to be loaded during API requests to reduce overhead. | |
* Author: Thomas Griffin | |
* Author URI: https://thomasgriffin.io | |
* Version: 1.0.0 | |
*/ |
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
(function (wp) { | |
//WordPress APIs | |
//Render function | |
var el = wp.element.createElement; | |
//Translations | |
var __ = wp.i18n.__; | |
//Text input control | |
var TextControl = wp.blocks.InspectorControls.TextControl; | |
//Create block | |
wp.blocks.registerBlockType('shelob9/metatest2', { |
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
{"lastUpload":"2020-07-18T18:11:37.497Z","extensionVersion":"v3.4.3"} |
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 | |
/** | |
* Plugin Name: Multiple Roles per User | |
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful. | |
* Version: 1 | |
* Author: nikolov.tmw | |
* Author URI: http://paiyakdev.com/ | |
* License: GPL2 | |
*/ | |
/* |