github_gist_simple_embed

Use script tag to load shortcode in editor.

Description

(string) github_gist_simple_embed( (string) $id ); 

Returns (string)

Parameters (1)

0. $id (string)
The ID of the gist.

Usage

  1. if ( !function_exists( 'github_gist_simple_embed' ) ) { 
  2. require_once '/modules/shortcodes/gist.php'; 
  3.  
  4. // The ID of the gist. 
  5. $id = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = github_gist_simple_embed($id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/shortcodes/gist.php  
  1. function github_gist_simple_embed( $id ) { 
  2. $id = str_replace( 'json', 'js', $id ); 
  3. return '<script type="text/javascript" src="https://gist.github.com/' . $id . '"></script>';