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 | |
| add_action( 'edited_product_packages', 'save_product_packages', 10, 2); | |
| function save_product_packages($term_id, $tt_id) | |
| { | |
| if (!$term_id) return; | |
| if (isset($_POST['product_package_active'])) | |
| update_metadata($_POST['taxonomy'], $term_id, 'product_package_active', | |
| $_POST['product_package_active']); |
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 | |
| add_action( 'init', 'product_init' ); | |
| function product_init() | |
| { | |
| global $wpdb; | |
| register_taxonomy( 'product_packages', 'products', | |
| array( 'hierarchical' => true, | |
| 'label' => __('Product Packages'), | |
| 'query_var' => false |
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 | |
| add_action( 'init', 'product_init' ); | |
| function product_init() | |
| { | |
| register_taxonomy( 'product_packages', 'products', | |
| array( 'hierarchical' => true, | |
| 'label' => __('Product Packages'), | |
| 'query_var' => false | |
| ) | |
| ); |
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 | |
| add_action( 'init', 'product_init' ); | |
| function product_init() | |
| { | |
| // From Part I | |
| register_taxonomy( 'product_packages', 'products', | |
| array( 'hierarchical' => true, | |
| 'label' => __('Product Packages'), | |
| 'query_var' => false | |
| ) |
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 update_active_plugins($value = '') { | |
| /* | |
| The $value array passed in contains the list of plugins with time | |
| marks when the last time the groups was checked for version match | |
| The $value->reponse node contains an array of the items that are | |
| out of date. This response node is use by the 'Plugins' menu | |
| for example to indicate there are updates. Also on the actual | |
| plugins listing to provide the yellow box below a given plugin | |
| to indicate action is needed by the user. | |
| */ |
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
| <script src="http://localhost/wp-content/themes/mytheme/js/jquery/jquery.js" type="text/javascript"></script> |
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 | |
| function my_functions_init() { | |
| wp_enqueue_script('jquery'); | |
| } | |
| add_action( 'init', 'my_functions_init' ); | |
| ?> |
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
| // In the file LoginRadius.php in the function login_radius_update_profile_data | |
| // The following logic starts at line 712 | |
| $contacts = $loginRadiusObject->loginradius_get_contacts( self::$loginRadiusAccessToken ); | |
| if ( is_array( $contacts ) && count( $contacts ) > 0 ) { | |
| $wpdb->delete( $wpdb->base_prefix . 'loginradius_contacts', array( 'user_id' => $userId ) ); | |
| foreach ( $contacts as $contact ) { | |
| // The issue is the compare of the $contacts object. In the IF above the $contacts is | |
| // checked to see if it is an array. The problem is $contacts is actuall an object. |
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_action( 'pre_get_posts', 'attraction_pre_get_post', 1 ); | |
| function attraction_pre_get_post( $query ) { | |
| if ( $query->is_main_query() ) { | |
| if ( ( $query->is_archive ) && ( $query->is_tax ) ) { | |
| if ( ( !isset( $query->post_type ) ) || ( empty( $query->post_type ) ) ) { | |
| $queried_object = get_queried_object(); | |
| if ( !isset($queried_object->taxonomy ) ) | |
| return; |