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
| defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.plist | |
| defaults delete ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist | |
| sudo defaults delete /Library/Preferences/com.teamviewer.teamviewer9.plist | |
| rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.plist | |
| rm -f ~/Library/Preferences/com.teamviewer.teamviewer9.Machine.plist | |
| sudo rm -f /Library/Preferences/com.teamviewer.teamviewer9.plist |
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 | |
| //usage: | |
| //url_title($title); | |
| if ( ! function_exists('url_title')) | |
| { | |
| /** | |
| * Create URL Title | |
| * |
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 | |
| /** maxmind geoip integration in php */ | |
| function get_real_ip() { | |
| $ipaddress = ''; | |
| if(empty($_REQUEST['ip']) && @$_REQUEST['ip']==""){ | |
| if (@$_SERVER['HTTP_CLIENT_IP']) | |
| $ipaddress = @$_SERVER['HTTP_CLIENT_IP']; | |
| else if(@$_SERVER['HTTP_X_FORWARDED_FOR']) | |
| $ipaddress = @$_SERVER['HTTP_X_FORWARDED_FOR']; | |
| else if(@$_SERVER['HTTP_X_FORWARDED']) |
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( 'user_register', 'myplugin_registration_save', 10, 1 ); | |
| function myplugin_registration_save( $user_id ) { | |
| $current_admin_user = wp_get_current_user(); | |
| if ( isset( $_POST['first_name'] ) ){ | |
| $user = new WP_User( $user_id ); | |
| $user_roles = $user->roles; | |
| $user_role = array_shift($user_roles); | |
| if($user_role!="administrator"){ | |
| update_user_meta($user_id, 'asso_admin', $current_admin_user->ID); | |
| }else{ |
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 | |
| // Magento: Getting categroy from product | |
| $categoryIds = $_product->getCategoryIds(); | |
| if(count($categoryIds) ){ | |
| $firstCategoryId = $categoryIds[0]; | |
| $_category = Mage::getModel('catalog/category')->load($firstCategoryId); | |
| echo $_category->getData('categorysecondimage'); | |
| } |
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
| //Bread crumbs created | |
| function wordpress_breadcrumbs() { | |
| $delimiter = '|'; | |
| $currentBefore = '<span class="current">'; | |
| $currentAfter = '</span>'; | |
| if ( !is_home() && !is_front_page() || is_paged() ) { | |
| echo '<div id="crumbs">'; | |
| global $post; | |
| if ( is_page() && !$post->post_parent ) { | |
| echo $currentBefore; |
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 | |
| //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]; | |
NewerOlder