diff options
| author | moehm | 2014-11-23 13:56:04 +0100 |
|---|---|---|
| committer | moehm | 2014-11-23 13:56:04 +0100 |
| commit | 21e75ab969099baf43ccb275fa8b7307f1389c62 (patch) | |
| tree | 3e8207265f9c6995bfd7784fffed6a4f20a5883c /wordpress | |
| parent | ae724c4943ed53c6b201b917db859b76e5fdb936 (diff) | |
| parent | e7936e6381ae55a13a32087e4a66dab2088913a3 (diff) | |
| download | dotfiles-21e75ab969099baf43ccb275fa8b7307f1389c62.tar.gz | |
Merge branch 'master' of git.iamfabulous.de:dotfiles
Diffstat (limited to 'wordpress')
| -rw-r--r-- | wordpress/functions.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wordpress/functions.php b/wordpress/functions.php index 464d9a3..ff849a2 100644 --- a/wordpress/functions.php +++ b/wordpress/functions.php @@ -9,6 +9,7 @@ function movejquerytofooter(){ wp_enqueue_script('jquery'); } } +add_action( 'init', 'movejquerytofooter'); // Disable W3TC footer comment for everyone but Admins (single site & network mode) if ( !current_user_can( 'activate_plugins' ) ) { @@ -22,3 +23,12 @@ function var_piwik() { wp_enqueue_script('piwik'); } } +add_action( 'init', 'var_piwik'); + +// Add "Read more" button to custom excerpts +function custom_excerpt($text) { + $text = preg_replace('/<\/p>$/', '', $text ); + $excerpt = $text . '<br><a class="read-more-button" href="'. esc_url( get_permalink() ).'">' . __( 'Read more', 'papercuts' ) . '</a></p>'; + return $excerpt; +} +add_filter('the_excerpt', 'custom_excerpt'); |
