This file contains 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 | |
/* | |
Plugin Name: Toms Escaping test | |
Plugin URI: http://tomjn.com | |
Description: Provides a tomjn_esc_test shortcode that lets you test values with escaping | |
Author: Tom J Nowell | |
Version: 1.0 | |
Author URI: http://www.tomjn.com/escaping | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html |
This file contains 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 | |
/* | |
Plugin Name: Filter by parent in admin | |
Plugin URI: http://www.electricstudio.co.uk | |
Description: Filter pages in wp-admin by their parent page | |
Version: 1.4.1 | |
Author: James Irving-Swift (updated by Jeppe Sigaard) | |
Author URI: http://www.irving-swift.com | |
License: GPL2 | |
*/ |
This file contains 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 | |
/* | |
Plugin name: Nick's Thumbnail Excerpt | |
Description: Viser thumbnails inden excerpt på arkivsider | |
*/ | |
add_filter('get_the_excerpt','nicks_thumbnail_excerpt'); | |
function nicks_thumbnail_excerpt($output){ | |
This file contains 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_filter( 'image_resize_dimensions', 'prefix_thumbnail_upscale', 10, 6 ); | |
function prefix_thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){ | |
if ( !$crop ) return null; | |
$aspect_ratio = $orig_w / $orig_h; | |
$size_ratio = max($new_w / $orig_w, $new_h / $orig_h); | |
This file contains 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 | |
/* | |
Plugin name: WorPress initial setup | |
Description: Indstiller indstillinger til standardting første gang wordpress initieres | |
*/ | |
add_action( 'init', function(){ | |
if (!get_option('prfx_setup_has_run')) { | |
// Sæt options hér, enkeltvis eller loop gennem en array |
This file contains 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 cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
This file contains 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 | |
/* | |
Plugin name: Jeppes login logo | |
Description: tilføj eget logo til loginsiden. | |
*/ | |
// Hvis ikke indstillet, tilføj custom header theme-support | |
if (!current_theme_supports('custom-header'){ | |
$args = array( |
This file contains 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 smamo_include_functions_part_if_exists($fetch, $in = false){ | |
if ($in){$fetch = $in . '/' . $fetch;} | |
$fetch = get_template_directory() . '/' . $fetch . '.php'; | |
if(file_exists($fetch)){include_once $fetch;} | |
} | |
function get_functions_part($fetch, $in = false){ | |
if(is_array($fetch)){foreach($fetch as $p){smamo_include_functions_part_if_exists($p,$in);}} |
This file contains 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_image_size('alt-featured-size',752,350,true); // eller hvilke dimensioner du nu ønsker | |
add_filter('post_thumbnail_html',function($html, $post_id, $post_thumbnail_id, $size, $attr){ | |
if ( is_single() || is_singular() || is_page() ){ | |
$html = wp_get_attachment_image( $post_thumbnail_id, 'alt-featured-size', false, $attr ); | |
} | |
return $html; |
OlderNewer