Exemplo n.º 1
0
    public function render()
    {
        ?>
		<div class="wrap">
			<?php 
        $this->render_header();
        ?>
			<?php 
        if (isset($_POST['live_blogging_start_migration'])) {
            check_admin_referer('live-blogging-upgrade');
            LiveBlogging_Legacy::migrate();
        } elseif (LiveBlogging_Legacy::exists()) {
            $this->render_start_migration_message();
        } else {
            $this->render_no_legacy_message();
        }
        ?>
		</div>
	<?php 
    }
Exemplo n.º 2
0
    public function render()
    {
        ?>
		<div class="wrap">
			<h2><?php 
        _e('Live Blogging Options', 'live-blogging');
        ?>
</h2>

			<?php 
        if (LiveBlogging_Legacy::exists()) {
            ?>
				<?php 
            $this->render_migration_prompt();
            ?>
			<?php 
        }
        ?>


			<form method="post" action="options.php">
				<?php 
        settings_fields('live-blogging');
        ?>
				<h3><?php 
        _e('Automatic Updating', 'live-blogging');
        ?>
</h3>
				<table class="form-table">
					<?php 
        $this->render_setting('LiveBlogging_Setting_UpdateMethod');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_Comments');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_TimedUpdatedFrequency');
        ?>
				</table>

				<h3><?php 
        _e('Posting to Twitter', 'live-blogging');
        ?>
</h3>
				<table class="form-table">
					<?php 
        if (function_exists('curl_init')) {
            ?>
						<?php 
            LiveBlogging::get_instance()->twitter->render_admin();
            ?>
					<?php 
        } else {
            ?>
						<tr>
							<td colspan="2">
								<strong><em>
									<?php 
            _e('Twitter functionality disabled due to missing PHP CURL module', 'live-blogging');
            ?>
								</em></strong>
							</td>
						</tr>
					<?php 
        }
        ?>
					<?php 
        if (LiveBlogging::get_instance()->twitter->twitter_authorised()) {
            ?>
						<?php 
            $this->render_setting('LiveBlogging_Setting_Twitter');
            ?>
						<?php 
            $this->render_setting('LiveBlogging_Setting_TwitterComments');
            ?>
					<?php 
        }
        ?>
				</table>

				<h3><?php 
        _e('Live Blog Style', 'live-blogging');
        ?>
</h3>
				<table class="form-table">
					<?php 
        $this->render_setting('LiveBlogging_Setting_UpdateStyle');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_DateStyle');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_PostStyle');
        ?>
				</table>

				<h3><?php 
        _e('Meteor Configuration', 'live-blogging');
        ?>
</h3>
				<table class="form-table">
					<?php 
        $this->render_setting('LiveBlogging_Setting_MeteorSubscriber');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_MeteorController');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_MeteorControllerPort');
        ?>
					<?php 
        $this->render_setting('LiveBlogging_Setting_MeteorNamespace');
        ?>
				</table>

				<h3><?php 
        _e('Advanced Settings', 'live-blogging');
        ?>
</h3>
				<table class="form-table">
					<?php 
        $this->render_setting('LiveBlogging_Setting_ContentHooks');
        ?>
				</table>

				<p class="submit">
					<input type="submit" class="button-primary" value="<?php 
        _e('Save Changes');
        ?>
" />
				</p>

			</form>
		</div>
		<?php 
    }