Exemplo n.º 1
0
<?php

if (!is_user_logged_in()) {
    auth_redirect();
}
$api_key = XMapsUser::get_api_key_by_user(wp_get_current_user());
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Collections</title>
		<?php 
wp_head();
?>
	</head>
	<body>
		<div id="collection-list"></div>
		<script type="text/javascript">
			jQuery( function( $ ) {

				function render_list( d ) {
					var ul = $( document.createElement( "ul" ) );
					$.each( d.data, function( i, e ) {
						var li = $( document.createElement( "li" ) );
						li.html( "<h3><a href=\"collection?id=" + e.term_id 
								+ "\">" + e.name + "</a></h3><p>" 
								+ e.description + "</p>" );
						ul.append( li );
					} );
					$( "#collection-list" ).append( ul );