Skip to content

Commit

Permalink
Merge pull request #1049 from INN/remove-picturefill
Browse files Browse the repository at this point in the history
remove picturefill until we actually decide to use it, tidy up a bit
  • Loading branch information
rnagle committed Jan 7, 2016
2 parents d3fc13e + 2596dcf commit 12d862f
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 504 deletions.
24 changes: 14 additions & 10 deletions inc/images.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @param object the post content
* @return object post content with image links stripped out
* @since 1.0
* @since 0.1
*/
function largo_attachment_image_link_remove_filter( $content ) {
$content =
Expand All @@ -19,24 +19,28 @@ function largo_attachment_image_link_remove_filter( $content ) {
}
add_filter( 'the_content', 'largo_attachment_image_link_remove_filter' );

/**
* Load the picturefill.wp plugin
*/
//require_once(get_template_directory() . '/inc/picturefill/picturefill-wp.php');

if ( ! function_exists( 'largo_home_icon' ) ) {
function largo_home_icon( $class='', $size = '60x60' ) {
/**
* Get the home icon for the sticky nav
*
* @param (string) $class any additional classes you would like to add to icon when returned
* @param (string) $size the size of the logo to return
* @return (string) $result markup for the sticky nav home icon (logo if available, otherwise just an icon)
*
* @since 0.4
*/
function largo_home_icon( $class = '', $size = '60x60' ) {
global $wpdb;

$logo = of_get_option( 'sticky_header_logo' );
$default = '<i class="icon-home ' . esc_attr( $class ) . '"></i>';

if ( ! empty( $logo ) ) {
$attachment_id = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE guid = %s", $logo) );
if (!empty($attachment_id))
$attachment_id = $wpdb->get_var( $wpdb->prepare( 'SELECT ID FROM {$wpdb->posts} WHERE guid = %s', $logo ) );
if ( !empty( $attachment_id ) )
echo wp_get_attachment_image( $attachment_id, $size );
else {
if (preg_match('/^http(s)?\:\/\//', $logo))
if ( preg_match( '/^http(s)?\:\/\//', $logo ) )
echo '<img src="' . $logo . '" class="attachment-home-logo" alt="logo">';
else
echo $default;
Expand Down
152 changes: 0 additions & 152 deletions inc/picturefill/inc/class-model-picturefill-wp.php

This file was deleted.

54 changes: 0 additions & 54 deletions inc/picturefill/inc/class-picturefill-wp.php

This file was deleted.

90 changes: 0 additions & 90 deletions inc/picturefill/inc/class-view-picturefill-wp.php

This file was deleted.

1 change: 0 additions & 1 deletion inc/picturefill/inc/templates/fallback-source-template.php

This file was deleted.

1 change: 0 additions & 1 deletion inc/picturefill/inc/templates/noscript-template.php

This file was deleted.

5 changes: 0 additions & 5 deletions inc/picturefill/inc/templates/picture-template.php

This file was deleted.

1 change: 0 additions & 1 deletion inc/picturefill/inc/templates/source-template.php

This file was deleted.

Loading

0 comments on commit 12d862f

Please sign in to comment.