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 | |
| /* ————————————————————————— */ | |
| /* ACF Inline SVGs | |
| /* ————————————————————————— */ | |
| $repeater = 'repeater_field_name' | |
| if ( have_rows( $repeater ) ): ?> | |
| <section class="content-main"> | |
| <div class="container"> <?php |
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
| var ReactTable = React.createClass({ | |
| getInitialState: function() { | |
| return {currentData: this.props.data}; | |
| }, | |
| render: function() { | |
| var key = Date.now(); |
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
| <snippet> | |
| <content><![CDATA[ | |
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { bindActionCreators } from 'redux'; | |
| import { connect } from 'react-redux'; | |
| const propTypes = { | |
| name: PropTypes.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
| <snippet> | |
| <content><![CDATA[ | |
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| const propTypes = { | |
| name: PropTypes.string, | |
| }; | |
| class ${1:${TM_FILENAME/(.+)\..+|.*/$1/:ComponentName}} extends React.Component { |
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
| <snippet> | |
| <content><![CDATA[ | |
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| const propTypes = { | |
| }; | |
| function ${1:${TM_FILENAME/(.+)\..+|.*/$1/:ComponentName}}(${2:props}) { |
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
| import React, {PropTypes} from 'react'; | |
| export const Tab = (props) => { | |
| return ( | |
| <li className="tab"> | |
| <a className={`tab-link ${props.linkClassName} ${props.isActive ? 'active' : ''}`} | |
| onClick={(event) => { | |
| event.preventDefault(); | |
| props.onClick(props.tabIndex); | |
| }}> |
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
| import React, { Component } from 'react' | |
| import { Redirect } from 'react-router' | |
| export default class ContactForm extends Component { | |
| constructor () { | |
| super(); | |
| this.state = { | |
| fireRedirect: false | |
| } | |
| } |
Let's say you start a project locally, and do some editing.
$ mkdir -p ~/git/foo && cd ~/git/foo
$ touch NEWFILENow you decide you want to create a new github repo and track it, but the directory is non-empty so git won't let you clone into it. You can fix this, thusly:
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 | |
| /* | |
| Plugin Name: Remote Uploads Directory | |
| Author: David Gowrie | |
| */ | |
| add_filter('upload_dir', 'remote_media_upload_dir'); | |
| function remote_media_upload_dir( $upload ) { |