public_html/wp-content/plugins/google-document-embedder/functions.php
/**
 * Get profile data
 *
 * @since   2.5.0.1
 * @return  array Array of profiles with their data, or a specific profile
 */
Get profile data
@since   2.5.0.1
@return  array Array of profiles with their data, or a specific profile
Get profile data @since 2 . 5 . 0 . 1 @return array Array of profiles with their data or a specific profile
function gde_get_profiles( $ident = '', $include_id = true, $include_desc = false ) {
	global $wpdb;
	$table = $wpdb->prefix . 'gde_profiles';
	if ( empty( $ident ) ) {
		$where = "WHERE 1 = 1 ORDER BY profile_id ASC";
	} elseif ( ! is_numeric( $ident ) ) {
		$where = "WHERE profile_name = '$ident'";
	} else {
		$where = "WHERE profile_id = $ident";
	}
	$profiles = $wpdb->get_results( "SELECT * FROM $table $where", ARRAY_A );
	if ( ! is_array( $profiles ) ) {
		gde_dx_log("Requested profile $ident not found");
		return false;
	} elseif ( ! empty( $ident ) ) {
		if ( isset( $profiles[0] ) ) {
			$data = unserialize($profiles[0]['profile_data']);
			if ( $include_id ) {
				$data['profile_id'] = $profiles[0]['profile_id'];
			}
			if ( $include_desc ) {
				$data['profile_desc'] = $profiles[0]['profile_desc'];
			}
			$profiles = $data;
		} else {
			gde_dx_log("Requested profile $ident doesn't exist");
			return false;
		}
	}
	return $profiles;
}
function gde_get_profiles ( $ ident = '' , $ include_id = true , $ include_desc = false ) { global $ wpdb ; $ table = $ wpdb -> prefix . 'gde_profiles' ; if ( empty ( $ ident ) ) { $ where = " WHERE 1 = 1 ORDER BY profile_id ASC " ; } elseif ( ! is_numeric ( $ ident ) ) { $ where = " WHERE profile_name = ' $ ident ' " ; } else { $ where = " WHERE profile_id =  $ ident " ; } $ profiles = $ wpdb -> get_results ( " SELECT * FROM  $ table $ where " , ARRAY_A ) ; if ( ! is_array ( $ profiles ) ) { gde_dx_log ( " Requested profile  $ ident  not found " ) ; return false ; } elseif ( ! empty ( $ ident ) ) { if ( isset ( $ profiles [ 0 ] ) ) { $ data = unserialize ( $ profiles [ 0 ] [ 'profile_data' ] ) ; if ( $ include_id ) { $ data [ 'profile_id' ] = $ profiles [ 0 ] [ 'profile_id' ] ; } if ( $ include_desc ) { $ data [ 'profile_desc' ] = $ profiles [ 0 ] [ 'profile_desc' ] ; } $ profiles = $ data ; } else { gde_dx_log ( " Requested profile  $ ident  doesn't exist " ) ; return false ; } } return $ profiles ; }
Get profile data
 @since   2.5.0.1
 @return  array Array of profiles with their data, or a specific profile
Get profile data @since 2 . 5 . 0 . 1 @return array Array of profiles with their data or a specific profile
// return specific profile data