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
$sub = new MeprSubscription(); | |
$sub->user_id = $user_ID; | |
$sub->product_id = 123; | |
$sub->price = 12.99; | |
$sub->total = 12.99; | |
$sub->period = 1; | |
$sub->period_type = 'months'; | |
$sub->status = MeprSubscription::$active_str; | |
$sub_id = $sub->store(); |
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
add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2); | |
function special_nav_class ($classes, $item) { | |
if (in_array('current-menu-item', $classes) ){ | |
$classes[] = 'active '; | |
} | |
return $classes; | |
} |
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
function my_form_shortcode() { | |
ob_start(); | |
get_template_part('my_form_template'); | |
return ob_get_clean(); | |
} | |
add_shortcode( 'my_form_shortcode', 'my_form_shortcode' ); |
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
<?php $counter = ""; | |
foreach ( $columns_values as $columns_value ) { | |
$counter +=1; | |
// all my var stuff here | |
?> | |
<?php if($counter == 1) { ?> | |
<div class="columns-wrapper odd"> |
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
<?php | |
//page id | |
$page_id = "5"; //example | |
if (has_post_thumbnail($page_id) ): | |
$image = wp_get_attachment_image_src( get_post_thumbnail_id($page_id), 'single-post-thumbnail' ); | |
endif; | |
$image_URI = $image[0]; | |
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
<?php | |
// Download utility | |
ini_set("memory_limit", "-1"); | |
set_time_limit(0); | |
function shailan_get_file( $url, $target ){ | |
echo "<h3>Downloading file..</h3><br />"; | |
if( FALSE !== file_put_contents( $target . "/" . basename($url), file_get_contents( $url ) ) ){ | |
return $target . "/" . basename($url); | |
} |
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
// SPDX-License-Identifier: Unlicensed | |
/* | |
Welcome to AAG | |
The Official Token for the AagTokens Community! | |
OlderNewer