Exemplo n.º 1
0
 function savePaywallSettings(TPSiteSettings $ss, TPPaySettings $pw)
 {
     $ss->addPaywall($pw);
     $this->saveSiteSettings($ss);
     wp_cache_delete("tinypass_" . $pw->getResourceId());
     update_option("tinypass_" . $pw->getResourceId(), $pw->toArray());
 }
Exemplo n.º 2
0
 public function testMissingFields()
 {
     $ss = new TPSiteSettings(array());
     $this->assertEquals(false, $ss->isEnabled());
     $this->assertEquals(true, $ss->isSand());
     $this->assertEquals("GET_AID", $ss->getAID());
     $this->assertEquals("GET_KEY", $ss->getSecretKey());
     $ss->setSand();
     $this->assertEquals("GET_AID", $ss->getAID());
     $this->assertEquals("GET_KEY", $ss->getSecretKey());
 }
Exemplo n.º 3
0
/**
 * 
 */
function __tinypass_ppv_payment_display(TPSiteSettings $ss)
{
    ?>

	<div class="postbox">
		<h3><?php 
    _e('Add default messaging for posts ');
    ?>
 </h3>
		<div class="inside"> 

			<div class="tp-simple-table">

				<div class="label">Enter a header</div>
				<input id="tp_pd_denied_msg1" name="tinypass[pd_denied_msg1]" value="<?php 
    echo esc_attr(stripslashes($ss->getDeniedMessage1()));
    ?>
" size="80" maxlength="80">
				<br>

				<div class="label">Enter a description</div>
				<textarea id="tp_pd_denied_sub1" rows="5" cols="80" name="tinypass[pd_denied_sub1]"><?php 
    echo stripslashes($ss->getDeniedSub1());
    ?>
</textarea>
			</div>

		</div>
	</div>

<?php 
}