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 | |
| /** | |
| * Disable automatic formating | |
| */ | |
| remove_filter('the_content', 'wptexturize'); | |
| remove_filter('the_excerpt', 'wptexturize'); | |
| ?> |
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 | |
| /** | |
| * Disable Google Analytics for logged in users | |
| */ | |
| function ga() { | |
| if ( !is_user_logged_in() ) { // not for logged in users | |
| ?> | |
| <script type="text/javascript"> | |
| var _gaq = _gaq || []; | |
| _gaq.push(['_setAccount', 'UA-XXXXXXXX']); // insert your Google Analytics id here |
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://connect.facebook.net/sl_SI/all.js#xfbml=1"></script> | |
| <fb:like href="<?php echo get_permalink()?>"; layout="standard" show_faces="true" width="450" font="arial"></fb:like> |
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 | |
| /** | |
| * Strip IMG fron content | |
| */ | |
| echo preg_replace('/<img[^>]+./' , '' , get_the_content()); | |
| ?> |
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 | |
| /** | |
| * Hide admin help tab | |
| */ | |
| function hide_help() { | |
| echo '<style type="text/css"> | |
| #contextual-help-link-wrap { display: none !important; } | |
| </style>'; | |
| } | |
| add_action('admin_head', 'hide_help'); |
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 custom menus to theme | |
| * @function.php | |
| */ | |
| function my_custom_menus() { | |
| register_nav_menus( | |
| array( | |
| 'primary-menu' => __( 'Primary Menu' ), | |
| 'secondary-menu' => __( 'Secondary Menu' ) |
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/remove contact info fields in user proofile | |
| */ | |
| function new_contactmethods( $contactmethods ) { | |
| $contactmethods['twitter'] = 'Twitter'; // Add Twitter | |
| $contactmethods['facebook'] = 'Facebook'; // Add Facebook | |
| unset($contactmethods['yim']); // Remove YIM | |
| unset($contactmethods['aim']); // Remove AIM | |
| unset($contactmethods['jabber']); // Remove Jabber |
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 | |
| /** | |
| * Custom Admin styleshhet | |
| */ | |
| function customAdmin() { | |
| $url = get_settings('siteurl'); | |
| $url = $url . '/wp-content/themes/my-theme/styles/wp-admin.css'; | |
| echo '<!-- custom admin css --> | |
| <link rel="stylesheet" type="text/css" href="' . $url . '" /> | |
| <!-- /end custom adming css -->'; |
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 | |
| /** | |
| * Hide update notifications from non admin users | |
| */ | |
| if ( !current_user_can('administrator') ) { | |
| add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 ); | |
| add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) ); | |
| } | |
| ?> |
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 | |
| /** | |
| * Strip IMG from content | |
| */ | |
| echo preg_replace('/<img[^>]+./' , '' , get_the_content()); | |
| ?> |