Plugin Directory

Changeset 1075246


Ignore:
Timestamp:
01/25/2015 01:37:19 PM (11 years ago)
Author:
alfaguru
Message:

New version compatible with WP 4.1

Location:
side-content/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • side-content/trunk/readme.txt

    r257569 r1075246  
    44Tags: widget, sidebar, page
    55Requires at least: 2.5
    6 Tested up to: 3.0.0
     6Tested up to: 4.1.0
    77Stable tag: trunk
    88
     
    2828Release 0.8 adds no new functionality but makes the plugin compatible with WP 2.7.
    2929Release 0.9 adds no new functionality but makes the plugin compatible with WP 2.8.1.
     30Release 1.0 adds no new functionality but makes the plugin compatible with WP 4.1.0.
    3031
    3132== Installation ==
  • side-content/trunk/side-content.php

    r216737 r1075246  
    3232    add_action('admin_menu', array($this, 'register_admin_menu'));
    3333    add_action('plugins_loaded', array($this, 'register_widgets'));
    34     if($this->do_posts()) {
    35       add_action('edit_form_advanced', array($this, 'show_editor'));
    36     }
    37     add_action('edit_page_form', array($this, 'show_editor'));
     34    add_action('add_meta_boxes', array($this, 'add_meta_boxes'));
     35
    3836    add_action('edit_post', array($this, 'save_widgets_value'));
    3937    add_action('publish_post', array($this, 'save_widgets_value'));
     
    5755    }
    5856    return $whitelist;
     57  }
     58
     59  function add_meta_boxes() {
     60    add_meta_box('side-content', __ ('Side Content', 'side-content'),  array($this, 'show_editor'), 'page', 'normal', 'high');
     61    if($this->do_posts()) {
     62        add_meta_box('side-content', __ ('Side Content', 'side-content'),  array($this, 'show_editor'), 'post', 'normal', 'high');
     63    }
    5964  }
    6065
     
    132137    }
    133138    ?>
    134     <div id="side_content_editor_wrapper" class="postbox closed">
    135     <h3>Side Content Widgets</h3>
    136     <div class="inside">
     139
    137140    <div id="side_content_editor">
    138141    <table>
     
    156159    </table>
    157160    </div>
    158     </div>
    159     </div>
     161
    160162<?php
    161163  }
Note: See TracChangeset for help on using the changeset viewer.