Plugin Directory

Changeset 1701271


Ignore:
Timestamp:
07/23/2017 10:15:30 PM (9 years ago)
Author:
balessan
Message:

Updating to 2.0.2

Location:
wp-ldp/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-ldp/trunk/wpldp-api.php

    r1701266 r1701271  
    180180                    'orderby'=> 'menu_order',
    181181                    'author' => $user->data->ID,
    182                     'post_status' => 'any',
    183                     'paged'=>$paged
    184                 ));
    185 
    186                 if ($loop->have_posts ()) {
     182                    'post_status' => 'any'
     183                ) );
     184       
     185        $posts = $loop->get_posts();
     186                if ( !empty( $posts ) ) {
    187187                    $result["@graph"][0]['posts'] = array( array( ) );
    188                     foreach( $loop as $post ) {
     188                    foreach( $posts as $post ) {
    189189                        $current_post_entry = array();
    190190                        $current_post_entry["@id"] = get_permalink($post->ID);
  • wp-ldp/trunk/wpldp-site-taxonomy.php

    r1701258 r1701271  
    155155
    156156            $ldpSiteUrls = array();
    157             foreach ( $terms as $term ){
    158                 $possibleUrl = get_term_meta( $term->term_id, "ldp_site_url", true );
    159                 if ( $possibleUrl ) {
    160                     $ldpSiteUrls[] = rtrim( $possibleUrl, '/' );
     157        if ( !empty( $terms ) && !is_wp_error( $terms ) ) {
     158                foreach ( $terms as $term ){
     159                    $possibleUrl = get_term_meta( $term->term_id, "ldp_site_url", true );
     160                    if ( $possibleUrl ) {
     161                        $ldpSiteUrls[] = rtrim( $possibleUrl, '/' );
     162                    }
    161163                }
    162             }
     164        }
    163165
    164166            $outputs = array();
     
    239241    exit ('Class WpLdpSiteTaxonomy already exists');
    240242}
    241 
    242  ?>
  • wp-ldp/trunk/wpldp.php

    r1701266 r1701271  
    55 * Description: This is a plugin which aims to emulate the default caracteristics of a Linked Data Platform compatible server
    66 * Text Domain: wpldp
    7  * Version: 2.0.1
     7 * Version: 2.0.2
    88 * Author: Sylvain LE BON, Benoit ALESSANDRONI
    99 * Author URI: http://www.happy-dev.fr/team/sylvain, http://benoit-alessandroni.fr/
     
    3232       * The current plugin version number
    3333       */
    34       protected static $version_number = '2.0.1';
     34      protected static $version_number = '2.0.2';
    3535
    3636      /**
Note: See TracChangeset for help on using the changeset viewer.