gde_valid_type

The Google Doc Embedder gde valid type function.

Description

gde_valid_type( $link ); 

Parameters (1)

0. $link
The link.

Usage

  1. if ( !function_exists( 'gde_valid_type' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions.php'; 
  3.  
  4. // The link. 
  5. $link = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gde_valid_type($link); 
  9.  

Defined (1)

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

/functions.php  
  1. function gde_valid_type( $link ) { 
  2. global $gdetypes; 
  3.  
  4. if ( is_array( $gdetypes ) ) { 
  5. $supported_exts = implode( "|", array_keys( $gdetypes ) ); 
  6.  
  7. if ( preg_match( "/\.($supported_exts)$/i", $link ) ) { 
  8. return true; 
  9. } else { 
  10. return false;