This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$plugin_path = 'custom-plugin'; | |
activate_plugin( $plugin_path ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wordpress_path = "/path/to/my/wordpress/install"; | |
// may not be needed if inside WP and hooking into actions | |
// activate_plugin() is in plugin.php | |
require_once( $wordpress_path . "/wp-load.php" ); | |
require_once( $wordpress_path . "/wp-admin/includes/plugin.php"); | |
$plugins = array("cforms", "w3-total-cache", "wordpress-seo"); | |
foreach ($plugins as $plugin){ | |
$plugin_path = $wordpress_path."wp-content/plugins/{$plugin}.php"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[acf-render name="acfr_demo_image"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[acf-render name="acfr_demo_text"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function activateWaitlistSubscriber() { | |
$productCategories = LiveGlam_ProductCategory::getAll(); | |
if(!empty($productCategories)) { | |
foreach( $productCategories as $cat ) { | |
$wsa = new LiveGlam_WaitlistSubscriberActivate( $cat->key ); | |
$subAvailCount = $wsa->subscriptionsAvailableTest(); | |
if( $subAvailCount >= 1 ) { | |
$subscriberToActivate = $wsa->getWaitlistSubscriberFrontOfLine(); | |
if( $subscriberToActivate ) { | |
$wsa->activate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Calculate the ShippableCap that represents current maximum shippable units | |
* ShippableCap varies during OrderPeriod | |
* Takes into account potential gain/loss of shippable subscribers | |
* Returns ShippableCap that is compared to current OrderLimit | |
*/ | |
public function calcShippableCap( $orderLimit, $shippableCount ) { | |
$dailyLossRate = 0.0065; | |
$daysRemaining = $this->daysRemainingOrderPeriod(); | |
$periodLossRate = $daysRemaining * $dailyLossRate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function subscriptionsAvailableTest() { | |
$settings = new LiveGlam_WaitlistSettings; | |
$io = new LiveGlam_InventoryOrder; | |
// get settings and convert to ratio for calculations | |
$replacement = $settings->getReplacementPercentage() / 100; | |
$buffer = $settings->getActivationBuffer() / 100; | |
// get orderLimit for period | |
$orderLimit = $io->getNextOrderLimitByCategory( $this->productCategory ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== ACF Option Pages === | |
Contributors: goldhat | |
Donate link: https://goldhat.ca/donate/ | |
Tags: acf, option pages, options | |
Requires at least: 4.0 | |
Tested up to: 4.5 | |
Stable tag: 1.1 | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get template. | |
* | |
* Search for the template and include the file. | |
* | |
* @since 1.0.0 | |
* | |
* @see wcpt_locate_template() | |
* | |
* @param string $template_name Template to load. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array(1) { | |
[0]=> | |
object(WpProQuiz_Model_AnswerTypes)#567 (7) { | |
["_answer":protected]=> | |
string(20) "charter | |
ford | |
right" | |
["_html":protected]=> | |
bool(false) | |
["_points":protected]=> |