Skip to content

Instantly share code, notes, and snippets.

View ashtonlance's full-sized avatar

Ashton Lance ashtonlance

View GitHub Profile
@ashtonlance
ashtonlance / functions.php
Created March 10, 2022 16:55 — forked from mlipscombe/functions.php
Render Elementor-styled content in WP-GraphQL
add_action('graphql_register_types', function() {
$post_types = WPGraphQL::$allowed_post_types;
if (!empty($post_types) && is_array($post_types)) {
foreach($post_types as $post_type) {
$post_type_object = get_post_type_object($post_type);
register_graphql_field($post_type_object->graphql_single_name, 'styledContent', [
'type' => 'String',
'description' => __('The styled elementor content of the page', 'cottontailpress-headless'),
'resolve' => function($post) {
$content = '';
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@ashtonlance
ashtonlance / letsencrypt.md
Created December 18, 2017 20:13
Installing Let's Encrypt with Cerbot on DigitalOcean & ServerPilot

Let's Encrypt

SSH as root into the server

ssh root@SERVER_IP_ADDRESS

Install Certbot

wget https://dl.eff.org/certbot-auto