Skip to content

Instantly share code, notes, and snippets.

add_shortcode('short_code_name', 'short_code_function');
function short_code_function() {
return "Returned string from short code";
}
add_shortcode('short_code_name', 'short_code_function');
function short_code_function() {
return "Returned string from short code";
}
add_shortcode('short_code_name', 'short_code_function');
function short_code_function() {
return "Returned string from short code";
}
define('FS_METHOD', 'direct');
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"];
}
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"];
<html>
<head>
<title>HackerNet</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
</head>
<body>
<h1 id="mainHeader">HackerNet Terminal</h1>

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.

@Oceas
Oceas / wds-hello-world.php
Last active September 16, 2019 16:20
WP-CLI 101 Messages
/**
* Returns multiple messages to demonstrate different command return types.
*
* @since 1.0.0
* @author Scott Anderson
*/
public function display_messages( $args, $assoc_args ) {
// No prepends.
WP_CLI::line( 'Standard line return.' ); // No prefix on line return.
@Oceas
Oceas / gist:76ee6e7dbf1bec56c1833bdf0d218591
Created September 16, 2019 16:42
WP-CLI 101 Progress Bar
/**
* Displays progress bar to demonstrate progression through a time consuming process.
*
* @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 generate_posts_progress_bar( $args, $assoc_args ) {