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 | |
use Exception; | |
/** | |
* Class Connection | |
* | |
* Adds a layer of abstraction over WP's $wpdb global for | |
* DB operations | |
* | |
* @package Manager\WPDatabase |
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 | |
function sort_objects_by_total($a, $b) { | |
if($a->total_posts == $b->total_posts){ return 0 ; } | |
return ($a->total_posts < $b->total_posts) ? -1 : 1; | |
} | |
// The function returns -1 (smaller than), 0 (equal to), or 1 (larger than) | |
// when doing the sort comparisons. The last is applying the sortation | |
// function to the array, which is done by usort: | |
usort($users, 'sort_objects_by_total'); |
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 | |
/** | |
* mwcc Theme Customizer | |
* | |
* @package mwcc | |
*/ | |
if ( class_exists( 'WP_Customize_Control' ) ): | |
class WP_Customize_Alert_Post_Control extends WP_Customize_Control { |
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
<!-- This is the main Blade file that you want your components to show up in --> | |
<!DOCTYPE html> | |
<html lang="{{ config('app.locale') }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Laravel</title> |
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 | |
** | |
* Parse file size | |
* | |
* @param string $size File size | |
* @param string $default Default size | |
* @return string | |
*/ | |
function ai1wm_parse_size( $size, $default = null ) { | |
$suffixes = array( |
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
import React from 'react' | |
import axios, { post } from 'axios'; | |
class SimpleReactFileUpload extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state ={ | |
file:null | |
} |
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
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import configureStore from "./store/configureStore"; | |
const store = configureStore(); | |
const rootEl = document.getElementById("root"); |
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
<h2>Craft Beers</h2> | |
<p>Doghead Superfish</p> | |
<h2>Summer Wine</h2> | |
<p>Red</p> |
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
import React, { Fragment } from "react"; | |
render() { | |
return ( | |
<Fragment> | |
<h2>Craft Beers</h2> | |
<p>Doghead Superfish</p> | |
<h2>Summer Wine</h2> | |
<p>Red</p> | |
</Fragment> |
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
render() { | |
return ( | |
<h2>Craft Beers</h2> | |
<p>Doghead Superfish</p> | |
<h2>Summer Wine</h2> | |
<p>Red</p> | |
) | |
} |