public_html/wp-content/plugins/google-document-embedder/functions-admin.php
/**
 * Modify the file insertion from Media Library if requested
 *
 * @since   2.4.0.1
 * @note	Requires WP 3.5+
 * @return  string HTML to insert into editor
 */
Modify the file insertion from Media Library if requested
@since   2.4.0.1
@note        Requires WP 3.5+
@return  string HTML to insert into editor
Modify the file insertion from Media Library if requested @since 2 . 4 . 0 . 1 @note Requires WP 3 . 5 + @return string HTML to insert into editor
function gde_media_insert( $html, $id, $attachment ) {
	global $gdeoptions;
	$gdoc_url = '';
	if (isset($attachment['url'])) {
		$gdoc_url = $attachment['url'];
	}
	elseif ($id > 0) {
		$post = get_post($id);
		if ($post) {
			$gdoc_url = wp_get_attachment_url($id);
		}
	}
	if ($gdoc_url != '' && gde_valid_type( $gdoc_url ) && $gdeoptions['ed_embed_sc'] == "yes" ) {
		return '[gview file="' . $gdoc_url . '"]';
	} else {
		return $html;
	}
}
function gde_media_insert ( $ html , $ id , $ attachment ) { global $ gdeoptions ; $ gdoc_url = '' ; if ( isset ( $ attachment [ 'url' ] ) ) { $ gdoc_url = $ attachment [ 'url' ] ; } elseif ( $ id > 0 ) { $ post = get_post ( $ id ) ; if ( $ post ) { $ gdoc_url = wp_get_attachment_url ( $ id ) ; } } if ( $ gdoc_url != '' && gde_valid_type ( $ gdoc_url ) && $ gdeoptions [ 'ed_embed_sc' ] == " yes " ) { return '[gview file="' . $ gdoc_url . '"]' ; } else { return $ html ; } }
Modify the file insertion from Media Library if requested
 @since   2.4.0.1
 @note        Requires WP 3.5+
 @return  string HTML to insert into editor
Modify the file insertion from Media Library if requested @since 2 . 4 . 0 . 1 @note Requires WP 3 . 5 + @return string HTML to insert into editor