FeedWordPressSyndicationPage::display PHP Method

display() public method

public display ( )
    function display()
    {
        global $wpdb;
        global $fwp_post;
        if (FeedWordPress::needs_upgrade()) {
            fwp_upgrade_page();
            return;
        }
        $cont = true;
        $dispatcher = array("feedfinder" => 'fwp_feedfinder_page', FWP_SYNDICATE_NEW => 'fwp_feedfinder_page', "switchfeed" => 'fwp_switchfeed_page', FWP_UNSUB_CHECKED => 'multidelete_page', FWP_DELETE_CHECKED => 'multidelete_page', 'Unsubscribe' => 'multidelete_page', FWP_RESUB_CHECKED => 'multiundelete_page');
        $act = MyPHP::request('action');
        if (isset($dispatcher[$act])) {
            $method = $dispatcher[$act];
            if (method_exists($this, $method)) {
                $cont = $this->{$method}();
            } else {
                $cont = call_user_func($method);
            }
        } elseif (isset($fwp_post['multiadd']) and $fwp_post['multiadd'] == FWP_SYNDICATE_NEW) {
            $cont = $this->accept_multiadd($fwp_post);
        }
        if ($cont) {
            $links = $this->sources('Y');
            $potential_updates = (!$this->show_inactive() and count($this->sources('Y')) > 0);
            $this->open_sheet('Syndicated Sites');
            ?>
			<div id="post-body">
			<?php 
            if ($potential_updates or count($this->updates_requested()) > 0) {
                add_meta_box('feedwordpress_update_box', __('Update feeds now'), 'fwp_syndication_manage_page_update_box', $this->meta_box_context(), $this->meta_box_context());
            }
            add_meta_box('feedwordpress_feeds_box', __('Syndicated sources'), array($this, 'syndicated_sources_box'), $this->meta_box_context(), $this->meta_box_context());
            do_action('feedwordpress_admin_page_syndication_meta_boxes', $this);
            ?>
			<div class="metabox-holder">		
			<?php 
            fwp_do_meta_boxes($this->meta_box_context(), $this->meta_box_context(), $this);
            ?>
			</div> <!-- class="metabox-holder" -->
			</div> <!-- id="post-body" -->
		
			<?php 
            $this->close_sheet(NULL);
            ?>
		
			<div style="display: none">
			<div id="tags-input"></div> <!-- avoid JS error from WP 2.5 bug -->
			</div>
		<?php 
        }
    }

Usage Example

示例#1
0
<?php

require_once dirname(__FILE__) . '/feedwordpresssyndicationpage.class.php';
$syndicationPage = new FeedWordPressSyndicationPage(__FILE__);
$syndicationPage->display();