gdwpm_gallery_code

The Google Drive WP Media gdwpm gallery code function.

Description

gdwpm_gallery_code( $atts ); 

Parameters (1)

0. $atts
The atts.

Usage

  1. if ( !function_exists( 'gdwpm_gallery_code' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-drive-wp-media/google-drive-wp-media.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gdwpm_gallery_code($atts); 
  9.  

Defined (1)

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

/google-drive-wp-media.php  
  1. function gdwpm_gallery_code($atts) { 
  2. extract( shortcode_atts( array('id' => null), $atts ) ); 
  3.  
  4. $terms = get_the_terms( $id, 'gdwpm_album' );  
  5. if ( $terms && ! is_wp_error( $terms ) ) { 
  6. $post = get_post($id); 
  7. $content = $post->post_content; 
  8. }else{ 
  9. $content = 'Gallery not found: wrong/invalid ID.'; 
  10. return $content;