jetpack_shortcode_get_archiveorg_id

Get ID of requested archive.org embed.

Description

(int|string) jetpack_shortcode_get_archiveorg_id( (array) $atts ); 

Returns (int|string)

Parameters (1)

0. $atts (array)
The atts.

Usage

  1. if ( !function_exists( 'jetpack_shortcode_get_archiveorg_id' ) ) { 
  2. require_once '/modules/shortcodes/archiveorg.php'; 
  3.  
  4. // The atts. 
  5. $atts = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_shortcode_get_archiveorg_id($atts); 
  9.  

Defined (1)

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

/modules/shortcodes/archiveorg.php  
  1. function jetpack_shortcode_get_archiveorg_id( $atts ) { 
  2. if ( isset( $atts[0] ) ) { 
  3. $atts[0] = trim( $atts[0] , '=' ); 
  4. if ( preg_match( '#archive.org/(details|embed)/(.+)/?$#i', $atts[0], $match ) ) { 
  5. $id = $match[2]; 
  6. } else { 
  7. $id = $atts[0]; 
  8. return $id; 
  9. return 0;