Plugin Directory

Changeset 1032385


Ignore:
Timestamp:
11/25/2014 08:02:24 AM (11 years ago)
Author:
blocknot.es
Message:

Fix to blocks imports

Location:
polymer-components/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • polymer-components/trunk/polymer-components.php

    r1029510 r1032385  
    44 * Plugin URI: http://blocknot.es/
    55 * Description: Add Polymer elements to your website!
    6  * Version: 1.4.1
     6 * Version: 1.4.2
    77 * Author: Mattia Roccoberton
    88 * Author URI: http://blocknot.es
     
    209209        // --- Blocks ---
    210210            $poly_blocks = get_post_meta( $post->ID, 'poly_blocks', TRUE );
    211             foreach( $poly_blocks as $block )
    212             {
    213                 $block_id = intval( $block );
    214                 if( $block_id > 0 )
     211            if( !empty( $poly_blocks ) )
     212            {
     213                foreach( $poly_blocks as $block )
    215214                {
    216                     $poly_tags = get_post_meta( $block_id, 'poly_tags', TRUE );
    217                     if( !empty( $poly_tags ) )
     215                    $block_id = intval( $block );
     216                    if( $block_id > 0 )
    218217                    {
    219                         $tags = unserialize( $poly_tags );
    220                         foreach( $tags as $tag )
     218                        $poly_tags = get_post_meta( $block_id, 'poly_tags', TRUE );
     219                        if( !empty( $poly_tags ) )
    221220                        {
    222                             if(      isset( $this->tags[$tag]  ) ) $this->import[$tag] = $this->tags[$tag];
    223                             else if( isset( $this->extra[$tag] ) ) $this->import[$tag] = $this->extra[$tag];
     221                            $tags = unserialize( $poly_tags );
     222                            foreach( $tags as $tag )
     223                            {
     224                                if(      isset( $this->tags[$tag]  ) ) $this->import[$tag] = $this->tags[$tag];
     225                                else if( isset( $this->extra[$tag] ) ) $this->import[$tag] = $this->extra[$tag];
     226                            }
    224227                        }
     228                        $block_data = get_post( $block_id );
     229                        $this->blocks[$block_id] = $block_data->post_name;
    225230                    }
    226                     $block_data = get_post( $block_id );
    227                     $this->blocks[$block_id] = $block_data->post_name;
    228231                }
    229232            }
  • polymer-components/trunk/readme.txt

    r1029671 r1032385  
    125125== Upgrade Notice ==
    126126
     127= 1.4.2 =
     128* Fix to blocks imports
    127129= 1.4.1 =
    128130* Security fix for meta box
     
    144146== Changelog ==
    145147
     148= 1.4.2 =
     149* Fix to blocks imports
    146150= 1.4.1 =
    147151* Security fix for meta box
Note: See TracChangeset for help on using the changeset viewer.