Exemplo n.º 1
0
function getAccessCode()
{
    $blockgram = new BlockgramPlugin();
    $adminURL = $blockgram->getOAuthRedirectUrl();
    //Comprobamos si es el Administrador del sitio o si es un visitante
    if (strcmp($adminURL, getReturnURI()) == 0) {
        if (isset($_GET['code'])) {
            $options = $blockgram->getBgramOptions();
            $options['app_current_code'] = $_GET['code'];
            update_option($blockgram->dbOptionKey, $options);
        }
    } else {
        update_option('BlockgramPlugin_Follower_Options', array());
        if (isset($_GET['code'])) {
            $followerOption = array('app_follower_code' => $_GET['code']);
            update_option($blockgram->dbFrontEndOptionKey, $followerOption);
        }
    }
    /*##############################################*/
    return array($adminURL, getReturnURI());
}
Exemplo n.º 2
0
    ?>
: <b><?php 
    echo $this->data['response_message'];
    ?>
</b></p></div>
	<?php 
}
?>
	
	<h2><?php 
_e('Blockgram setting pannel', 'blockgram');
?>
</h2>
	
	<?php 
$bgramObject = new BlockgramPlugin();
$bgramOptions = $bgramObject->getBgramOptions();
?>
	<form method="post">
		<div class="blockgram-form-layout">
			<div class="blockgram-form-horizontal">
				
				<?php 
if (empty($this->data['dataClientID']) && empty($this->data['dataClientSecret'])) {
    ?>


				<p><span class="label-text-input"><?php 
    _e('Client ID', 'blockgram');
    ?>
</span><input type="text" size="50" value="" name="bgram-client-id" id="bgram-client-id" /></p>