Skip to content

Instantly share code, notes, and snippets.

View davidshq's full-sized avatar

Dave Mackey davidshq

View GitHub Profile
@davidshq
davidshq / wopas.py
Created May 14, 2018 02:57
Main WOPAS File - In Process
import requests
import os.path
import html
import sys
import time
import pdb
import json
import get_plugin_info_page
from get_plugin_info_page import get_plugin_info_page
# Python 3 has the json library, if we are running Python 2 we need to use simplejson,
@davidshq
davidshq / wp-plugins.json
Created May 13, 2018 01:15
Example of JSON File Resulting in decoder.py error
{
"name": "Contact Form 7",
"slug": "contact-form-7",
"version": "5.0.1",
"author": "<a href=\"https://ideasilo.wordpress.com/\">Takayuki Miyoshi</a>",
"author_profile": "https://profiles.wordpress.org/takayukister",
"requires": "4.8",
"tested": "4.9.5",
"requires_php": false,
"compatibility": [],
@davidshq
davidshq / wp-plugins-page-1.json
Created July 19, 2017 00:01
One Page Returned from WordPress.org Plugin API
This file has been truncated, but you can view the full file.
{
"info": {
"page": 1,
"pages": 1759,
"results": 42193
},
"plugins": [
{
"added": "2007-08-02",
"author": "<a href=\"https://ideasilo.wordpress.com/\">Takayuki Miyoshi</a>",
@davidshq
davidshq / WordPress Plugin API JSON
Created July 17, 2017 00:57
Demonstrates what multiple API calls to JSON look like, sorted.
{
"info": {
"page": 1,
"pages": 1759,
"results": 42193
},
"plugins": [
{
"added": "2007-08-02",
"author": "<a href=\"https://ideasilo.wordpress.com/\">Takayuki Miyoshi</a>",
@davidshq
davidshq / archive-ccbpress-core.php
Created September 12, 2016 16:06
Displaying a List of Groups Using WordPress, CCBPress Core Plugin, and DataTables.
<div class="row table-responsive">
<table id="groups" class="table table-striped sortable">
<thead>
<tr>
<th>Group</th>
<th>Day</th>
<th>Time</th>
<th>Childcare</th>
<!--<th>Type</th> -->
<!--<th>At Church</th> -->
@davidshq
davidshq / simplexml-output.php
Created September 10, 2016 23:27
Output from simplexml when using XML from CCB Groups API Documentation
<?php
SimpleXMLElement Object (
[request] => SimpleXMLElement Object (
[parameters] => SimpleXMLElement Object (
[argument] => Array (
[0] => SimpleXMLElement Object (
[@attributes] => Array (
[value] => group_profiles [name] => srv
)
)
@davidshq
davidshq / css-for-fixing-content-am.css
Created May 5, 2016 21:36
CSS for Fixing Content Too High on AM
<style>
#pages_wrapper {
margin-top: 50px !important;
}
</style>
@davidshq
davidshq / header.php
Last active March 16, 2016 22:30
WordPress Twenty Sixteen Theme Header
<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "site-content" div.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
@davidshq
davidshq / index.php
Last active March 16, 2016 22:10
Twenty Sixteen: index.php
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link http://codex.wordpress.org/Template_Hierarchy
@davidshq
davidshq / wp_customizer_base_object_ex.php
Last active January 6, 2016 22:30
WordPress Customizer - Base Object Example
<?php
$wp_customize->add_control(
new WP_Customize_Control(
$wp_customize,
'name_of_setting',
array(
'label' => __( 'Name of Setting', 'theme_name' ),
'section' => 'name_of_section',
'settings' => 'name_of_setting',
'type' => 'text',