This file contains hidden or 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! | |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
| if(is_plugin_active('memberpress/memberpress.php')) { | |
| add_action( 'user_register', 'mp_auto_enroll' ); | |
| //add_action( 'gform_user_registered', 'mp_auto_enroll', 10, 4 ); | |
| function mp_auto_enroll($user_id, $user_config=array(), $entry='', $user_pass='') { | |
| $txn = new MeprTransaction(); | |
| $txn->user_id = $user_id; |
This file contains hidden or 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
| wpcf7_add_shortcode('postdropdown', 'createbox', true); | |
| function createbox(){ | |
| global $post; | |
| extract( shortcode_atts( array( 'post_type' => 'some_post_type',), $atts ) ); | |
| $args = array('post_type' => $post_type ); | |
| $myposts = get_posts( $args ); | |
| $output = "<select name='postType' id='postType' onchange='document.getElementById(\"postType\").value=this.value;'><option></option>"; | |
| foreach ( $myposts as $post ) : setup_postdata($post); | |
| $title = get_the_title(); | |
| $output .= "<option value='$title'> $title </option>"; |
This file contains hidden or 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
| #!/bin/bash -e | |
| clear | |
| echo "============================================" | |
| echo "WordPress Install Script" | |
| echo "============================================" | |
| echo "Database Name: " | |
| read -e dbname | |
| echo "Database User: " | |
| read -e dbuser | |
| echo "Database Password: " |
This file contains hidden or 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 | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
NewerOlder