PluginProbe
Juicer.io: Effortlessly embed, curate, and aggregate social media feeds into your website / 1.3
Juicer.io: Effortlessly embed, curate, and aggregate social media feeds into your website v1.3
1.12.18 1.12.5 1.12.6 1.12.7 1.12.8 1.12.9 1.2 1.3 1.3.1 1.4 1.4.1 1.5 1.6 1.6.1 1.7 1.7.1 1.7.2 1.8 1.9 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 All 45 releases
juicer / juicer.php

juicer.php in Juicer.io: Effortlessly embed, curate, and aggregate social media feeds into your website 1.3, at juicer.php

86 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Juicer
4 * Plugin URI: http://www.juicer.io
5 * Description: Add and embed a social media feed to your site with a shortcode.
6 * Version: 1.3
7 * Author: Ryan MacInnes
8 * Author URI: http://www.goddamnyouryan.com
9 * License: GPLv2 or later
10 */
11
12 /*
13 This program is free software; you can redistribute it and/or
14 modify it under the terms of the GNU General Public License
15 as published by the Free Software Foundation; either version 2
16 of the License, or (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27
28 add_action( 'wp_enqueue_scripts', 'juicer_scripts', 0 );
29 function juicer_scripts() {
30
31 wp_enqueue_script('jquery');
32
33 wp_enqueue_script(
34 'juicerembed',
35 '//assets.juicer.io/embed-no-jquery.js',
36 array('jquery'),
37 false,
38 false
39 );
40
41 wp_enqueue_style(
42 'juicerstyle',
43 '//assets.juicer.io/embed.css'
44 );
45 }
46
47 class Juicer_Feed {
48
49 public function render( $args ) {
50
51 $defaults = array(
52 'name' => 'error',
53 'columns' => '3',
54 'per' => '100',
55 'pages' => '1000'
56 );
57
58 $args = wp_parse_args( $args, $defaults);
59
60 ?>
61 <ul class="juicer-feed" data-feed-id="<?php echo $args['name']; ?>" data-per="<?php echo $args['per'] ?>" data-pages="<?php echo $args['pages'] ?>"><h1 class='referral'><a href='http://www.juicer.io'>Powered by Juicer</a></h1></ul>
62 <?php
63 }
64 }
65
66 function juicer_feed( $args ) {
67 $feed = new Juicer_Feed();
68 $feed ->render( $args );
69 }
70
71 function juicer_shortcode( $args ) {
72 extract( shortcode_atts( array(
73 'name' => 'error',
74 'columns' => '3',
75 'per' => '100',
76 'pages' => '1000'
77 ), $args ) );
78
79 $feed = new Juicer_Feed();
80
81 $feed->render( $args );
82 }
83
84 add_shortcode( 'juicer', 'juicer_shortcode' );
85 ?>
86