Skip to content

Commit

Permalink
Individual classes specific to each provider
Browse files Browse the repository at this point in the history
  • Loading branch information
julien731 committed Aug 25, 2014
1 parent 55374bc commit 94f5b25
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
24 changes: 24 additions & 0 deletions includes/openpeek-kaboompics-class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
class OpenPeek_Kaboompics extends OpenPeek_Kimonolabs {

protected function map_fields( $content ) {

$clean = array();

foreach ( $content as $key => $image ) {

$current = array();
$current['name'] = $image['name']['text'];
$current['source'] = $image['name']['href'];
$current['link'] = $image['img'];
$current['tags'] = explode( '#', trim( str_replace( 'TAGS:', '', $image['tags'] ) ) );

array_push( $clean, $current );

}

return $clean;

}

}
24 changes: 24 additions & 0 deletions includes/openpeek-little-visuals-class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
class OpenPeek_LittleVisuals extends OpenPeek_Kimonolabs {

protected function map_fields( $content ) {

$clean = array();

foreach ( $content as $key => $image ) {

$current = array();
$current['name'] = '';
$current['source'] = $image['image']['href'];
$current['link'] = $image['image']['src'];
$current['tags'] = explode( "\n", $image['tags'] );

array_push( $clean, $current );

}

return $clean;

}

}
23 changes: 23 additions & 0 deletions includes/openpeek-picjumbo-class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
class OpenPeek_Picjumbo extends OpenPeek_Kimonolabs {

protected function map_fields( $content ) {

$clean = array();

foreach ( $content as $key => $image ) {

$current = array();
$current['name'] = $image['name'];
$current['source'] = $image['link'];
$current['link'] = $image['img'];

array_push( $clean, $current );

}

return $clean;

}

}

0 comments on commit 94f5b25

Please sign in to comment.