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 { | |
NavLink, | |
withRouter | |
} from 'react-router-dom'; | |
import { ApolloProvider } from 'react-apollo'; | |
import ApolloClient from 'apollo-boost'; | |
import { Query } from 'react-apollo'; | |
import { bitesQuery } from './Query'; | |
import Pagination from 'components/Pagination/pagination.js' |
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 | |
class SubscriptionType extends \WPGraphQL\Type\WPObjectType { | |
private static $fields; | |
public function __construct() { | |
$config = [ | |
'name' => 'SubscriptionType', | |
'fields' => self::fields(), |
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 | |
class SubscriptionType extends \WPGraphQL\Type\WPObjectType { | |
private static $fields; | |
public function __construct() { | |
$config = [ | |
'name' => 'SubscriptionType', |
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
add_action( 'graphql_init', function() { | |
add_filter( 'graphql_user_fields', function( $fields ) { | |
$fields['userBadges'] = [ | |
'type' => \WPGraphQL\Types::String(), | |
'description' => __( 'The badges of the user', 'gqlbadges' ), | |
'resolve' => function( \WP_User $user ) { | |
// $user = new WP_User($user->ID); | |
// Or... |
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, Fragment } from 'react' | |
import { | |
NavLink, | |
Link, | |
BrowserRouter as Router, | |
Route, | |
Switch, | |
Redirect, | |
} from 'react-router-dom' | |
import FeedPage from './FeedPage' |
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 | |
/** | |
* BuddyPress User Blog - Post Create | |
* | |
* @package WordPress | |
* @subpackage BuddyPress User Blog | |
*/ | |
$theme = wp_get_theme(); // gets the current theme | |
$theme_name = $theme->template; |
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 hashlib as hasher | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash | |
self.hash = self.hash_block() | |
NewerOlder