Plugin Directory

Changeset 1865241


Ignore:
Timestamp:
04/27/2018 07:14:22 AM (8 years ago)
Author:
Grandy
Message:

version 0.9.7 hotfix

Location:
gdy-modular-content
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gdy-modular-content/tags/0.9.7/includes/version.php

    r1864164 r1865241  
    150150        global $wpdb;
    151151
    152         // Change global contents to JSON
     152        // Change global contents to JSON (post)
    153153
    154154        $contents = $wpdb->get_results( "SELECT post_id, meta_key, meta_value FROM $wpdb->postmeta WHERE meta_key = '_gdymc_object_contents'" );
     
    164164        endforeach;
    165165
     166        // Change global contents to JSON (term)
     167
     168        $contents = $wpdb->get_results( "SELECT term_id, meta_key, meta_value FROM $wpdb->termmeta WHERE meta_key = '_gdymc_object_contents'" );
     169
     170        foreach( $contents as $content ):
     171
     172            $contentIDs = explode( ',', str_replace( array( '[', ']' ), array( '', '' ), $content->meta_value ) );
     173
     174            $encoded = json_encode( $contentIDs );
     175
     176            update_metadata( 'term', $content->term_id, $content->meta_key, $encoded );
     177
     178        endforeach;
     179
     180
    166181    endif;
    167182
  • gdy-modular-content/tags/0.9.7/readme.txt

    r1864164 r1865241  
    55Tested up to: 4.9
    66Requires PHP: 5.6
    7 Stable tag: 0.9.6
     7Stable tag: 0.9.7
    88
    99Create and edit modular content from the frontend of your site.
     
    2222
    2323= 0.9.7 =
    24 * Update database format for object contents (outside of modules)
     24* Database update to the new JSON format for object contents
    2525
    2626= 0.9.6 =
    27 * Fix a remaining dump
     27* Removed a remaining `var_dump`
    2828
    2929= 0.9.5 =
  • gdy-modular-content/trunk/includes/version.php

    r1864164 r1865241  
    150150        global $wpdb;
    151151
    152         // Change global contents to JSON
     152        // Change global contents to JSON (post)
    153153
    154154        $contents = $wpdb->get_results( "SELECT post_id, meta_key, meta_value FROM $wpdb->postmeta WHERE meta_key = '_gdymc_object_contents'" );
     
    164164        endforeach;
    165165
     166        // Change global contents to JSON (term)
     167
     168        $contents = $wpdb->get_results( "SELECT term_id, meta_key, meta_value FROM $wpdb->termmeta WHERE meta_key = '_gdymc_object_contents'" );
     169
     170        foreach( $contents as $content ):
     171
     172            $contentIDs = explode( ',', str_replace( array( '[', ']' ), array( '', '' ), $content->meta_value ) );
     173
     174            $encoded = json_encode( $contentIDs );
     175
     176            update_metadata( 'term', $content->term_id, $content->meta_key, $encoded );
     177
     178        endforeach;
     179
     180
    166181    endif;
    167182
  • gdy-modular-content/trunk/readme.txt

    r1864164 r1865241  
    2222
    2323= 0.9.7 =
    24 * Update database format for object contents (outside of modules)
     24* Database update to the new JSON format for object contents
    2525
    2626= 0.9.6 =
    27 * Fix a remaining dump
     27* Removed a remaining `var_dump`
    2828
    2929= 0.9.5 =
Note: See TracChangeset for help on using the changeset viewer.