Plugin Directory

Changeset 684285


Ignore:
Timestamp:
03/19/2013 03:58:01 PM (13 years ago)
Author:
Trendwerk
Message:

Bugfixes and private post type support (3.0.2)

Location:
multiple-content-blocks
Files:
15 added
4 edited

Legend:

Unmodified
Added
Removed
  • multiple-content-blocks/trunk/assets/inc/class.MCB.php

    r631702 r684285  
    3333        global $post;
    3434       
    35         if($this->get_blocks($post->ID)) add_meta_box('multiple-content-blocks-box',__('Multiple content blocks','mcb'),array($this,'meta_box'),$post->post_type,'normal','high');
     35        $type = get_post_type_object($post->post_type);
     36        if($type->public && $this->get_blocks($post->ID)) add_meta_box('multiple-content-blocks-box',__('Multiple content blocks','mcb'),array($this,'meta_box'),$post->post_type,'normal','high');
    3637    }
    3738   
     
    6263     */
    6364    function save_blocks($post_id) {
    64         if(!wp_is_post_revision($post_id) && !wp_is_post_autosave($post_id) && (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest')) :
    65        
     65        if(!wp_is_post_revision($post_id) && !wp_is_post_autosave($post_id) && ((!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || @$_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest'))) :
    6666            $blocks = $this->get_blocks($post_id);
    6767            if(is_wp_error($blocks)) $blocks = $this->get_blocks($post_id,false);
  • multiple-content-blocks/trunk/assets/inc/functions.template-tags.php

    r631702 r684285  
    6767function mcb_refresh_blocks() {
    6868    global $post;
    69     delete_post_meta($post->ID,'mcb-blocks');
     69    if(isset($post)) delete_post_meta($post->ID,'mcb-blocks');
    7070}
    7171add_action('wp_head','mcb_refresh_blocks');
  • multiple-content-blocks/trunk/multiple-content-blocks.php

    r631702 r684285  
    44Plugin URI: https://github.com/trendwerk/multiple-content-blocks/
    55Description: Allow for more content blocks in WordPress than just the one.
    6 Version: 3.0.1
     6Version: 3.0.2
    77Author: Ontwerpstudio Trendwerk
    88Author URI: https://github.com/trendwerk/
  • multiple-content-blocks/trunk/readme.txt

    r631702 r684285  
    44Tags: multiple,content,blocks,multiplecontent,page,pageblocks,columns,custom
    55Requires at least: 3.0
    6 Tested up to: 3.4.2
    7 Stable tag: 3.0.1
     6Tested up to: 3.5.1
     7Stable tag: 3.0.2
    88
    99Allow for more content blocks in WordPress than just the one.
Note: See TracChangeset for help on using the changeset viewer.