Example #1
0
/**
 * Function to generate the top 10 popular posts page.
 *
 * @since	1.3
 * @deprecated	2.2.0
 *
 * @param	int	$daily	Overall popular
 */
function tptn_manage($daily = 0)
{
    $paged = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
    $limit = isset($_GET['limit']) ? intval($_GET['limit']) : 0;
    $daily = isset($_GET['daily']) ? intval($_GET['daily']) : $daily;
    ?>

<div class="wrap">
	<h2>
		<?php 
    if (!$daily) {
        _e('Popular Posts', 'tptn');
    } else {
        _e('Daily Popular Posts', 'tptn');
    }
    ?>
	</h2>
	<div id="poststuff">
	<div id="post-body" class="metabox-holder columns-2">
	<div id="post-body-content">
		<?php 
    echo tptn_pop_display($daily, $paged, $limit, false);
    ?>
	</div><!-- /post-body-content -->
	<div id="postbox-container-1" class="postbox-container">
	  <div id="side-sortables" class="meta-box-sortables ui-sortable">
		  <?php 
    tptn_admin_side();
    ?>
	  </div><!-- /side-sortables -->
	</div><!-- /postbox-container-1 -->
	</div><!-- /post-body -->
	<br class="clear" />
	</div><!-- /poststuff -->
</div><!-- /wrap -->

<?php 
}
Example #2
0
    /**
     * Plugin settings page
     */
    public function plugin_settings_page()
    {
        ?>
		<div class="wrap">
			<h1><?php 
        printf(_x('%s Popular Posts', 'Plugin name', 'top-10'), 'Top 10');
        ?>
</h1>

			<div id="poststuff">
				<div id="post-body" class="metabox-holder columns-2">
					<div id="post-body-content">
						<div class="meta-box-sortables ui-sortable">
							<form method="post">
								<?php 
        $this->pop_posts_obj->prepare_items();
        $this->pop_posts_obj->display();
        ?>
							</form>
						</div>
					</div>
					<div id="postbox-container-1" class="postbox-container">
						<div id="side-sortables" class="meta-box-sortables ui-sortable">
							<?php 
        tptn_admin_side();
        ?>
						</div><!-- /side-sortables -->
					</div><!-- /postbox-container-1 -->
				</div><!-- /post-body -->
				<br class="clear" />
			</div><!-- /poststuff -->
		</div>
	<?php 
    }
Example #3
0
        _e('Delete all imported tables', 'top-10');
        ?>
" class="button button-secondary" style="color:#f00" />
				</p>
				<?php 
    }
    // End if ( ! empty( $top_ten_all_mu_tables ) )
    ?>
	      </div>
	    </div>
		<?php 
    wp_nonce_field('tptn-plugin-settings');
    ?>
	  </form>
			<?php 
}
?>
	</div><!-- /post-body-content -->
	<div id="postbox-container-1" class="postbox-container">
	  <div id="side-sortables" class="meta-box-sortables ui-sortable">
			<?php 
tptn_admin_side();
?>
	  </div><!-- /side-sortables -->
	</div><!-- /postbox-container-1 -->
	</div><!-- /post-body -->
	<br class="clear" />
	</div><!-- /poststuff -->
</div><!-- /wrap -->

Example #4
0
    /**
     * Plugin settings page
     */
    public function plugin_settings_page()
    {
        $args = null;
        ?>
		<div class="wrap">
			<h1><?php 
        printf(_x('%s Popular Posts', 'Plugin name', 'top-10'), 'Top 10');
        ?>
</h1>

			<div id="poststuff">
				<div id="post-body" class="metabox-holder columns-2">
					<div id="post-body-content">
						<div class="meta-box-sortables ui-sortable">
							<form method="get">
								<input type="hidden" name="page" value="<?php 
        echo $_REQUEST['page'];
        ?>
" />
								<?php 
        // If this is a search?
        if (isset($_REQUEST['s'])) {
            $args['search'] = esc_sql($_REQUEST['s']);
        }
        // If this is a post type filter?
        if (isset($_REQUEST['post-type-filter'])) {
            $args['post-type-filter'] = esc_sql($_REQUEST['post-type-filter']);
        }
        $this->pop_posts_obj->prepare_items($args);
        $this->pop_posts_obj->search_box(__('Search Table', 'top-10'), 'top-10');
        $this->pop_posts_obj->display();
        ?>
							</form>
						</div>
					</div>
					<div id="postbox-container-1" class="postbox-container">
						<div id="side-sortables" class="meta-box-sortables ui-sortable">
							<?php 
        tptn_admin_side();
        ?>
						</div><!-- /side-sortables -->
					</div><!-- /postbox-container-1 -->
				</div><!-- /post-body -->
				<br class="clear" />
			</div><!-- /poststuff -->
		</div>
	<?php 
    }
Example #5
0
/**
 * Function to generate the top 10 daily popular posts page.
 * 
 * @access public
 * @param int $daily (default: 0) Overall popular
 * @return void
 */
function tptn_manage($daily = 0)
{
    $paged = isset($_GET['paged']) ? intval($_GET['paged']) : 0;
    $limit = isset($_GET['limit']) ? intval($_GET['limit']) : 0;
    $daily = isset($_GET['daily']) ? intval($_GET['daily']) : $daily;
    ?>

<div class="wrap">
	<div id="page-wrap">
	<div id="inside">
		<div id="header">
		<h2><?php 
    if (!$daily) {
        _e('Popular Posts', TPTN_LOCAL_NAME);
    } else {
        _e('Daily Popular Posts', TPTN_LOCAL_NAME);
    }
    ?>
</h2>
		</div>
	  <div id="side">
		<?php 
    tptn_admin_side();
    ?>
	  </div>

	  <div id="options-div">
		  <?php 
    echo tptn_pop_display($daily, $paged, $limit, false);
    ?>
	  </div> <!-- End options-div -->

	  </div> <!-- End inside -->
	  <div style="clear: both;"></div>
	</div> <!-- End page-wrap -->
</div> <!-- End wrap -->


<?php 
}