Skip to content

Instantly share code, notes, and snippets.

Avatar

Scott Anderson Oceas

View GitHub Profile
View gist:9354432b86cd9367c99f3b7881592c17
add_shortcode('short_code_name', 'short_code_function');
function short_code_function() {
return "Returned string from short code";
}
View index.php
add_shortcode('short_code_name', 'short_code_function');
function short_code_function() {
return "Returned string from short code";
}
View plugin.php
add_shortcode('short_code_name', 'short_code_function');
function short_code_function() {
return "Returned string from short code";
}
View wp-config.php
define('FS_METHOD', 'direct');
View plugin.php
add_shortcode('five-o-clock', 'five_o_clock_here');
//Shortcode function that accepts attributes
function five_o_clock_here($atts) {
return "It's 5 o' clock " . $atts["where"];
}
View plugin.php
add_shortcode('five-o-clock', 'five_o_clock_here');
//Shortcode function that defines default values
function five_o_clock_here($atts) {
$atts = shortcode_atts( array(
'where' => 'somewhere!',
), $atts );
return "It's 5 o' clock " . $atts["where"];
View index.html
<html>
<head>
<title>HackerNet</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<h1 id="mainHeader">HackerNet Terminal</h1>
View Web Development Contract.md

Web Design Contract

Based on Contract Killer, an open-source contract for web developers.

Summary:

I’ll always do my best to fulfill your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. I have no desire to trick you into signing something that you might later regret. What I do want is what’s best for both parties, now and in the future.

So in short;

You ([CLIENT COMPANY]), located at [CLIENT ADDRESS] are hiring me ([DEVELOPER]) located at [DEVELOPER ADDRESS] to design and develop a web site for the estimated total price of [QUOTE] as outlined in our previous correspondence.

View wds-hello-world.php
<?php
/*
Plugin Name: WDS Hello World
Plugin URI: https://webdevstudios.com/
Description: Teaching the basics of WP-CLI
Author: Web Dev Studios
Version: 1.0.0
Author URI: https://webdevstudios.com/
*/
@Oceas
Oceas / wds-hello-world.php
Last active Sep 19, 2019
WP-CLI 101 Function with Arguments
View wds-hello-world.php
/**
* Returns all arguments passed into command to demonstrate how to access them.
*
* @param Array $args Arguments in array format.
* @param Array $assoc_args Key value arguments stored in associated array format.
* @since 1.0.0
* @author Scott Anderson
*/
public function display_arguments( $args, $assoc_args ) {