forked from amirent/foa-site
-
Notifications
You must be signed in to change notification settings - Fork 1
/
foa-site.php
1537 lines (1371 loc) · 74.6 KB
/
foa-site.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
/*
Plugin Name: UBC FOA Website
Plugin URI:
Description: Transforms the UBC Collab Theme into a specific faculty website | Note: This plugin will only work on wp-hybrid-clf theme
Version: 2.0
Author: Amir Entezaralmahdi | Arts ISIT
Licence: GPLv2
Author URI: http://isit.arts.ubc.ca
*/
Class UBC_FOA_Theme_Options {
static $prefix;
static $faculty_main_homepage;
static $add_script;
/**
* init function.
*
* @access public
* @return void
*/
public static function init() {
if ( ! class_exists( 'UBC_Collab_Theme_Options' ) ) {
return;
}
self::$prefix = 'wp-hybrid-clf'; // function hybrid_get_prefix() is not available within the plugin
self::$faculty_main_homepage = 'http://www.arts.ubc.ca';
// include Arts specific css file
wp_register_style('arts-theme-option-style', plugins_url('foa-site') . '/css/style.css');
// include Arts specific javascript file
wp_register_script('arts-theme-option-script', plugins_url('foa-site') . '/js/script.js');
add_action( 'init', array(__CLASS__, 'register_scripts' ), 12 );
add_action( 'wp_footer', array(__CLASS__, 'print_script' ) );
add_action('ubc_collab_theme_options_ui', array(__CLASS__, 'arts_ui'));
add_action( 'admin_init',array(__CLASS__, 'admin' ) );
add_filter( 'ubc_collab_default_theme_options', array(__CLASS__, 'default_values'), 10,1 );
add_filter( 'ubc_collab_theme_options_validate', array(__CLASS__, 'validate'), 10, 2 );
add_action( 'wp_head', array( __CLASS__,'wp_head' ) );
add_action( 'wp_footer', array( __CLASS__,'wp_footer' ) );
/************ Arts specifics *************/
//Add News Ticker
add_action( 'init', array( __CLASS__,'add_news_ticker' ));
//Add event Carousel
add_action( 'init', array( __CLASS__,'add_event_carousel' ));
//Add Social Row
add_action( 'init', array( __CLASS__,'add_social_row' ));
//Add Arts Logo
add_filter('wp_nav_menu_items', array(__CLASS__,'add_arts_logo_to_menu'), 10, 2);
//Add Apply Now button to Menu if selected
add_filter('wp_nav_menu_items', array(__CLASS__,'add_apply_now_to_menu'), 10, 2);
//Add Arts frontpage layout
add_action( 'init', array(__CLASS__, 'arts_frontpage_layout' ) );
//remove slider margin
add_action( 'init', array(__CLASS__, 'remove_slider_margin'));
//Select Transparent Slider
add_action( 'init', array(__CLASS__, 'select_transparent_slider'));
}
/**
* register_scripts function.
*
* @access public
* @return void
*/
public static function register_scripts() {
self::$add_script = true;
// register the spotlight functions
if( !is_admin() ):
//wp_register_script( 'ubc-collab-arts', plugins_url('foa-site').'/js/foa-site.js', array( 'jquery' ), '0.1', true );
//wp_enqueue_style('ubc-collab-arts', plugins_url('foa-site').'/css/foa-site.css');
endif;
}
/**
* print_script function.
*
* @access public
* @static
* @return void
*/
public static function print_script() {
if ( ! self::$add_script )
return;
wp_print_scripts( 'ubc-collab-arts' );
}
/*
* This function includes the css and js for this specifc admin option
*
* @access public
* @return void
*/
public static function arts_ui(){
wp_enqueue_style('arts-theme-option-style');
wp_enqueue_script('arts-theme-option-script', array('jquery'));
}
/**
* admin function.
*
* @access public
* @return void
*/
public static function admin(){
//Add Arts Options tab in the theme options
add_settings_section(
'foa-options', // Unique identifier for the settings section
'FOA options', // Section title
'__return_false', // Section callback (we don't want anything)
'theme_options' // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
);
//Add Colour options
add_settings_field(
'arts-colours', // Unique identifier for the field for this section
'Colour Options', // Setting field label
array(__CLASS__,'arts_colour_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
//Add Colour options
add_settings_field(
'arts-logo', // Unique identifier for the field for this section
'Logo Options', // Setting field label
array(__CLASS__,'arts_logo_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
//Add Why-Unit options
add_settings_field(
'arts-apply-now', // Unique identifier for the field for this section
'Apply Now', // Setting field label
array(__CLASS__,'arts_apply_now_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
//Add Slider options
add_settings_field(
'arts-slider', // Unique identifier for the field for this section
'Slider Options', // Setting field label
array(__CLASS__,'arts_slider_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
//Add News Ticker options
add_settings_field(
'arts-news-ticker', // Unique identifier for the field for this section
'News Ticker', // Setting field label
array(__CLASS__,'arts_news_ticker_theme_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
//Add Events options
add_settings_field(
'arts-event-carousel', // Unique identifier for the field for this section
'Events Carousel', // Setting field label
array(__CLASS__,'arts_event_carousel_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
//Add Social Row options
add_settings_field(
'arts-social-row', // Unique identifier for the field for this section
'Social Row', // Setting field label
array(__CLASS__,'arts_social_row_options'), // Function that renders the settings field
'theme_options', // Menu slug, used to uniquely identify the page; see ubc_collab_theme_options_add_page()
'foa-options' // Settings section. Same as the first argument in the add_settings_section() above
);
}
/**
* arts_colour_options.
* Display colour options for Arts specific template
* @access public
* @return void
*/
public static function arts_colour_options(){ ?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> These colours are specific to each unit and represent the colour of Arts logo, and pieces of the items throughout the site.</div>
</div>
<div id="arts-unit-colour-box">
<label><b>Unit/Website Main Colour:</b></label>
<div class="arts-colour-item"><span>(A) Main colour: </span><?php UBC_Collab_Theme_Options::text( 'arts-main-colour' ); ?></div><br/>
<div class="arts-colour-item"><span>(B) Gradient colour: </span><?php UBC_Collab_Theme_Options::text( 'arts-gradient-colour' ); ?></div><br/>
<div class="arts-colour-item"><span>(C) Hover colour: </span><?php UBC_Collab_Theme_Options::text( 'arts-hover-colour' ); ?></div><br/>
<div class="arts-colour-item"><span>(D) Reverse colour: </span></div>
<ul>
<?php
foreach ( UBC_FOA_Theme_Options::arts_reverse_colour() as $option ) {
?>
<li class="layout">
<?php UBC_Collab_Theme_Options::radio( 'arts-reverse-colour', $option['value'], $option['label']); ?>
</li>
<?php } ?>
</ul>
</div> <?php
}
/**
* arts_colour_options.
* Display colour options for Arts specific template
* @access public
* @return void
*/
public static function arts_logo_options(){ ?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> This section allows you to enable/disable and select the logo image to be added to the site menu.</div>
</div>
<div id="arts-logo-box">
<label><b>Add Arts Logo to menu:</b></label>
<div><?php UBC_Collab_Theme_Options::checkbox( 'arts-enable-logo', 1, 'Enable Arts Logo' ); ?></div>
<div class="arts-logo-inputs"><?php UBC_Collab_Theme_Options::text('arts-logo-url', 'URL'); ?></div>
</div> <?php
}
/**
* arts_apply_now_options.
* Display Apply Now options for Arts specific template
* @access public
* @return void
*/
public static function arts_apply_now_options(){ ?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> An optional button to be appended to the main navigation menu that will link to the specified application page</div>
</div>
<div id="arts-apply-now-box">
<label><b>Apply Now Options:</b></label>
<div><?php UBC_Collab_Theme_Options::checkbox( 'arts-enable-apply-now', 1, 'Enable Apply-now botton' ); ?></div>
<div class="half arts-apply-inputs"><?php UBC_Collab_Theme_Options::text('arts-apply-now-text', 'Botton text'); ?></div>
<div class="half arts-apply-inputs"><?php UBC_Collab_Theme_Options::text('arts-apply-now-url', 'URL'); ?></div>
</div>
<?php
}
/**
* arts_apply_now_options.
* Display Apply Now options for Arts specific template
* @access public
* @return void
*/
public static function arts_slider_options(){ ?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> This option allows admin to insert the unit logo to the slider, as well as deciding the caption location on the slider</div>
</div>
<div id="arts-slider-logo-box">
<label><b>Slider Logo Position:</b></label>
<ul>
<?php
foreach ( UBC_FOA_Theme_Options::arts_slider_logo_position() as $option ) {
?>
<li class="layout">
<?php UBC_Collab_Theme_Options::radio( 'arts-slider-logo-position', $option['value'], $option['label']); ?>
</li>
<?php } ?>
</ul>
<div class="half arts-logo-url-inputs"><?php UBC_Collab_Theme_Options::text('arts-slider-logo-url', 'URL'); ?></div>
</div>
<?php
}
/**
* arts_apply_now_options.
* Display Apply Now options for Arts specific template
* @access public
* @return void
*/
public static function arts_news_ticker_theme_options(){ ?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> This option allows admin to enable or disable a ticker feature on the website that displays the post title as a sliding feature.</div>
</div>
<div id="arts-slider-logo-box">
<label><b>News Ticker Options</b></label>
<ul>
<?php
foreach ( UBC_FOA_Theme_Options::arts_news_ticker_options() as $option ) {
?>
<li class="layout">
<?php UBC_Collab_Theme_Options::radio( 'arts-enable-news-ticker', $option['value'], $option['label']); ?>
</li>
<?php } ?>
</ul>
</div>
<div class="half">
<label><b>Category to be displayed:</b></label><br><br>
<div><?php UBC_Collab_Theme_Options::select_categories('arts-news-ticker-category'); ?> <a href="<?php echo admin_url('edit-tags.php?taxonomy=category'); ?>">add category</a></div>
</div>
<?php
}
public static function arts_event_carousel_options(){ ?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> This option allows admin to feature posts of an event categories to be available on the site homepage</div>
</div>
<div id="arts-slider-logo-box">
<label><b>Event Carousel Options</b></label>
<div><?php UBC_Collab_Theme_Options::checkbox( 'arts-enable-event-carousel', 1, 'Enable Events Carousel Section' ); ?></div>
</div>
<div class="half">
<label><b>Category to be displayed:</b></label><br><br>
<div><?php UBC_Collab_Theme_Options::select_categories('arts-event-carousel-category'); ?> <a href="<?php echo admin_url('edit-tags.php?taxonomy=category'); ?>">add category</a></div>
</div>
<?php
}
public static function arts_social_row_options(){?>
<div class="explanation"><a href="#" class="explanation-help">Info</a>
<div> This allows admin to define 3 social media sources to be fed automatically on the website</div>
</div>
<div id="arts-social-box">
<label><b>Social Row Options</b></label>
<div><?php UBC_Collab_Theme_Options::checkbox( 'arts-enable-social-row', 1, 'Enable Social Row Section' ); ?></div>
</div><br>
<div class="third">
<label><b>Column 1:</b></label><br>
<select id="ubc-collab-theme-options-arts-social-column1-type" name="ubc-collab-theme-options[arts-social-column1-type]">
<?php
foreach ( UBC_FOA_Theme_Options::arts_social1_options() as $option ) {
UBC_Collab_Theme_Options::option( 'arts-social-column1-type', $option['value'], $option['label']); ?>
<?php } ?>
</select><br>
<div><?php UBC_Collab_Theme_Options::text('arts-social-column1-title', 'Title'); ?></div>
<div><?php UBC_Collab_Theme_Options::text('arts-social-column1-logo', 'Logo'); ?></div>
<div id='sr1-max-number-of-items'>
<label>Max number of items: </label>
<select name="ubc-collab-theme-options[arts-social-column1-num-items]">
<?php foreach ( UBC_FOA_Theme_Options::number_of_social_items() as $option ) {
UBC_Collab_Theme_Options::option( 'arts-social-column1-num-items', $option['value'], $option['label'] );
} ?>
</select>
</div>
<div id="sr1-posts" class="sr1-element"><label>Choose a category</label><br><?php UBC_Collab_Theme_Options::select_categories('arts-social-column1-post-category'); ?></div>
<div id="sr1-twitter" class="sr1-element"><?php UBC_Collab_Theme_Options::text('arts-social-column1-twitter-widget-id', 'Twitter Widget ID'); ?><br><?php UBC_Collab_Theme_Options::text('arts-social-column1-twitter-user', 'Twitter User'); ?><br><?php UBC_Collab_Theme_Options::text('arts-social-column1-twitter-url', 'Twitter Page URL'); ?></div>
<div id="sr1-flickr" class="sr1-element"><?php UBC_Collab_Theme_Options::text('arts-social-column1-flickr', 'Flickr User ID'); ?><br><span><a href="http://idgettr.com/" target="_blank">Find Flickr Id</a></span></div>
<div id="sr1-rss" class="sr1-element"><?php UBC_Collab_Theme_Options::text('arts-social-column1-rss', 'RSS URL'); ?></div>
<div id="sr1-text" class="sr1-element"><?php UBC_Collab_Theme_Options::textarea('arts-social-column1-content', 'Content'); ?></div>
</div>
<div class="third">
<label><b>Column 2:</b></label><br>
<select id="ubc-collab-theme-options-arts-social-column2-type" name="ubc-collab-theme-options[arts-social-column2-type]">
<?php
foreach ( UBC_FOA_Theme_Options::arts_social2_options() as $option ) {
UBC_Collab_Theme_Options::option( 'arts-social-column2-type', $option['value'], $option['label']); ?>
<?php } ?>
</select><br>
<div><?php UBC_Collab_Theme_Options::text('arts-social-column2-title', 'Title'); ?></div>
<div><?php UBC_Collab_Theme_Options::text('arts-social-column2-logo', 'Logo'); ?></div>
<div id='sr2-max-number-of-items'>
<label>Max number of items: </label>
<select name="ubc-collab-theme-options[arts-social-column2-num-items]">
<?php foreach ( UBC_FOA_Theme_Options::number_of_social_items() as $option ) {
UBC_Collab_Theme_Options::option( 'arts-social-column2-num-items', $option['value'], $option['label'] );
} ?>
</select>
</div>
<div id="sr2-posts" class="sr2-element"><label>Choose a category</label><br><?php UBC_Collab_Theme_Options::select_categories('arts-social-column2-post-category'); ?></div>
<div id="sr2-twitter" class="sr2-element"><?php UBC_Collab_Theme_Options::text('arts-social-column2-twitter-widget-id', 'Twitter Widget ID'); ?><br><?php UBC_Collab_Theme_Options::text('arts-social-column2-twitter-user', 'Twitter User'); ?><br><?php UBC_Collab_Theme_Options::text('arts-social-column2-twitter-url', 'Twitter Page URL'); ?></div>
<div id="sr2-flickr" class="sr2-element"><?php UBC_Collab_Theme_Options::text('arts-social-column2-flickr', 'Flickr User ID'); ?><br><span><a href="http://idgettr.com/" target="_blank">Find Flickr Id</a></span></div>
<div id="sr2-rss" class="sr2-element"><?php UBC_Collab_Theme_Options::text('arts-social-column2-rss', 'RSS URL'); ?></div>
<div id="sr2-text" class="sr2-element"><?php UBC_Collab_Theme_Options::textarea('arts-social-column2-content', 'Content'); ?></div>
</div>
<div class="third">
<label><b>Column 3:</b></label><br>
<select id="ubc-collab-theme-options-arts-social-column3-type" name="ubc-collab-theme-options[arts-social-column3-type]">
<?php
foreach ( UBC_FOA_Theme_Options::arts_social3_options() as $option ) {
UBC_Collab_Theme_Options::option( 'arts-social-column3-type', $option['value'], $option['label']); ?>
<?php } ?>
</select><br>
<div><?php UBC_Collab_Theme_Options::text('arts-social-column3-title', 'Title'); ?></div>
<div><?php UBC_Collab_Theme_Options::text('arts-social-column3-logo', 'Logo'); ?></div>
<div id='sr3-max-number-of-items'>
<label>Max number of items: </label>
<select name="ubc-collab-theme-options[arts-social-column3-num-items]">
<?php foreach ( UBC_FOA_Theme_Options::number_of_social_items() as $option ) {
UBC_Collab_Theme_Options::option( 'arts-social-column3-num-items', $option['value'], $option['label'] );
} ?>
</select>
</div>
<div id="sr3-posts" class="sr3-element"><label>Choose a category</label><br><?php UBC_Collab_Theme_Options::select_categories('arts-social-column3-post-category'); ?></div>
<div id="sr3-twitter" class="sr3-element"><?php UBC_Collab_Theme_Options::text('arts-social-column3-twitter-widget-id', 'Twitter Widget ID'); ?><br><?php UBC_Collab_Theme_Options::text('arts-social-column3-twitter-user', 'Twitter User'); ?><br><?php UBC_Collab_Theme_Options::text('arts-social-column3-twitter-url', 'Twitter Page URL'); ?></div>
<div id="sr3-flickr" class="sr3-element"><?php UBC_Collab_Theme_Options::text('arts-social-column3-flickr', 'Flickr User ID'); ?><br><span><a href="http://idgettr.com/" target="_blank">Find Flickr Id</a></span></div>
<div id="sr3-rss" class="sr3-element"><?php UBC_Collab_Theme_Options::text('arts-social-column3-rss', 'RSS URL'); ?></div>
<div id="sr3-text" class="sr3-element"><?php UBC_Collab_Theme_Options::textarea('arts-social-column3-content', 'Content'); ?></div>
</div>
<?php
}
/***********
* Default Options
*
* Returns the options array for arts.
*
* @since ubc-clf 1.0
*/
public static function default_values( $options ) {
if (!is_array($options)) {
$options = array();
}
$defaults = array(
'arts-main-colour' => '#5E869F',
'arts-gradient-colour' => '#71a1bf',
'arts-hover-colour' => '#002145',
'arts-reverse-colour' => 'white',
'arts-enable-why-unit' => true,
'arts-why-unit-text' => 'Why Unit/Department?',
'arts-why-unit-url' => '#',
'arts-enable-apply-now' => true,
'arts-apply-now-text' => 'Apply Now',
'arts-apply-now-url' => '#',
'arts-enable-logo' => false,
'arts-logo-url' => '#',
'arts-slider-logo-url' => '/',
'arts-slider-logo-position' => 'auto',
'arts-enable-news-ticker' => 'after_content',
'arts-news-ticker-category' => 0,
'arts-enable-event-carousel' => false,
'arts-event-carousel-category' => 0,
'arts-enable-social-row' => false,
/* Social Column 1*/
'arts-social-column1-type' => 'sr1-text',
'arts-social-column1-title' => '',
'arts-social-column1-logo' => '/',
'arts-social-column1-num-items' => 10,
'arts-social-column1-content' => '',
'arts-social-column1-post-category' => '',
'arts-social-column1-twitter-widget-id' => '582656531818147841',
'arts-social-column1-twitter-user' => '@UBC_Arts',
'arts-social-column1-twitter-url' => 'https://twitter.com/UBC_Arts',
'arts-social-column1-instagram' => 'UBC_Arts',
'arts-social-column1-facebook' => 'https://www.facebook.com/ubc.foa',
'arts-social-column1-flickr' => '47412247@N00',
'arts-social-column1-rss' => 'http://wire.arts.ubc.ca/feed/',
/* Social Column 2*/
'arts-social-column2-type' => 'sr2-text',
'arts-social-column2-title' => '',
'arts-social-column2-logo' => '/',
'arts-social-column2-num-items' => 10,
'arts-social-column2-content' => '',
'arts-social-column2-post-category' => '',
'arts-social-column2-twitter-widget-id' => '582656531818147841',
'arts-social-column2-twitter-user' => '@UBC_Arts',
'arts-social-column2-twitter-url' => 'https://twitter.com/UBC_Arts',
'arts-social-column2-instagram' => 'UBC_Arts',
'arts-social-column2-facebook' => 'https://www.facebook.com/ubc.foa',
'arts-social-column2-flickr' => '47412247@N00',
'arts-social-column2-rss' => 'http://wire.arts.ubc.ca/feed/',
/* Social Column 3*/
'arts-social-column3-type' => 'sr3-text',
'arts-social-column3-title' => '',
'arts-social-column3-logo' => '/',
'arts-social-column3-num-items' => 10,
'arts-social-column3-content' => '',
'arts-social-column3-post-category' => '',
'arts-social-column3-twitter-widget-id' => '582656531818147841',
'arts-social-column3-twitter-user' => '@UBC_Arts',
'arts-social-column3-twitter-url' => 'https://twitter.com/UBC_Arts',
'arts-social-column3-instagram' => 'UBC_Arts',
'arts-social-column3-facebook' => 'https://www.facebook.com/ubc.foa',
'arts-social-column3-flickr' => '47412247@N00',
'arts-social-column3-rss' => 'http://wire.arts.ubc.ca/feed/',
);
$options = array_merge( $options, $defaults );
return $options;
}
/**
* Sanitize and validate form input. Accepts an array, return a sanitized array.
*
*
* @todo set up Reset Options action
*
* @param array $input Unknown values.
* @return array Sanitized theme options ready to be stored in the database.
*
*/
public static function validate( $output, $input ) {
// Grab default values as base
$starter = UBC_FOA_Theme_Options::default_values( array() );
// Validate Unit Colour Options A, B, and C
$starter['arts-main-colour'] = UBC_Collab_Theme_Options::validate_text($input['arts-main-colour'], $starter['arts-main-colour'] );
$starter['arts-gradient-colour'] = UBC_Collab_Theme_Options::validate_text($input['arts-gradient-colour'], $starter['arts-gradient-colour'] );
$starter['arts-hover-colour'] = UBC_Collab_Theme_Options::validate_text($input['arts-hover-colour'], $starter['arts-hover-colour'] );
// Validate Unit Colour Options D
if ( isset( $input['arts-reverse-colour'] ) && array_key_exists( $input['arts-reverse-colour'], UBC_FOA_Theme_Options::arts_reverse_colour() ) ) {
$starter['arts-reverse-colour'] = $input['arts-reverse-colour'];
}
//Validate Why-unit options
$starter['arts-enable-why-unit'] = (bool)$input['arts-enable-why-unit'];
$starter['arts-why-unit-text'] = UBC_Collab_Theme_Options::validate_text($input['arts-why-unit-text'], $starter['arts-why-unit-text'] );
$starter['arts-why-unit-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-why-unit-url'], $starter['arts-why-unit-url'] );
//Validate Why-unit options
$starter['arts-enable-apply-now'] = (bool)$input['arts-enable-apply-now'];
$starter['arts-apply-now-text'] = UBC_Collab_Theme_Options::validate_text($input['arts-apply-now-text'], $starter['arts-apply-now-text'] );
$starter['arts-apply-now-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-apply-now-url'], $starter['arts-apply-now-url'] );
$starter['arts-enable-logo'] = (bool)$input['arts-enable-logo'];
$starter['arts-logo-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-logo-url'], $starter['arts-logo-url'] );
// Validate Slider Logo Direction
if ( isset( $input['arts-slider-logo-position'] ) && array_key_exists( $input['arts-slider-logo-position'], UBC_FOA_Theme_Options::arts_slider_logo_position() ) ) {
$starter['arts-slider-logo-position'] = $input['arts-slider-logo-position'];
}
$starter['arts-slider-logo-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-slider-logo-url'], $starter['arts-slider-logo-url'] );
// Validate News Ticker Options
if ( isset( $input['arts-enable-news-ticker'] ) && array_key_exists( $input['arts-enable-news-ticker'], UBC_FOA_Theme_Options::arts_news_ticker_options() ) ) {
$starter['arts-enable-news-ticker'] = $input['arts-enable-news-ticker'];
}
// what category is selected
$starter['arts-news-ticker-category'] = ( is_numeric( $input['arts-news-ticker-category'] ) ? (int)$input['arts-news-ticker-category'] : 'all' );
$starter['arts-enable-event-carousel'] = (bool)$input['arts-enable-event-carousel'];
// what Events category is selected
$starter['arts-event-carousel-category'] = ( is_numeric( $input['arts-event-carousel-category'] ) ? (int)$input['arts-event-carousel-category'] : 'all' );
$starter['arts-enable-social-row'] = (bool)$input['arts-enable-social-row'];
/* Social Media Row Validation */
// Column 1
$starter['arts-social-column1-title'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-title'], $starter['arts-social-column1-title'] );
$starter['arts-social-column1-logo'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-logo'], $starter['arts-social-column1-logo'] );
$starter['arts-social-column1-num-items'] = ( is_numeric( $input['arts-social-column1-num-items'] ) ? (int)$input['arts-social-column1-num-items'] : $starter['arts-social-column1-num-items'] );
// Validate Social Options
if ( isset( $input['arts-social-column1-type'] ) && array_key_exists( $input['arts-social-column1-type'], UBC_FOA_Theme_Options::arts_social1_options() ) ) {
$starter['arts-social-column1-type'] = $input['arts-social-column1-type'];
}
$starter['arts-social-column1-content'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-content'], $starter['arts-social-column1-content'] );
$starter['arts-social-column1-post-category'] = ( is_numeric( $input['arts-social-column1-post-category'] ) ? (int)$input['arts-social-column1-post-category'] : 'all' );
$starter['arts-social-column1-twitter-widget-id'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-twitter-widget-id'], $starter['arts-social-column1-twitter-widget-id'] );
$starter['arts-social-column1-twitter-user'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-twitter-user'], $starter['arts-social-column1-twitter-user'] );
$starter['arts-social-column1-twitter-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-twitter-url'], $starter['arts-social-column1-twitter-url'] );
$starter['arts-social-column1-instagram'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-instagram'], $starter['arts-social-column1-instagram'] );
$starter['arts-social-column1-facebook'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-facebook'], $starter['arts-social-column1-facebook'] );
$starter['arts-social-column1-flickr'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-flickr'], $starter['arts-social-column1-flickr'] );
$starter['arts-social-column1-rss'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column1-rss'], $starter['arts-social-column1-rss'] );
// Column 2
$starter['arts-social-column2-title'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-title'], $starter['arts-social-column2-title'] );
$starter['arts-social-column2-logo'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-logo'], $starter['arts-social-column2-logo'] );
$starter['arts-social-column2-num-items'] = ( is_numeric( $input['arts-social-column2-num-items'] ) ? (int)$input['arts-social-column2-num-items'] : $starter['arts-social-column2-num-items'] );
// Validate Social Options
if ( isset( $input['arts-social-column2-type'] ) && array_key_exists( $input['arts-social-column2-type'], UBC_FOA_Theme_Options::arts_social2_options() ) ) {
$starter['arts-social-column2-type'] = $input['arts-social-column2-type'];
}
$starter['arts-social-column2-content'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-content'], $starter['arts-social-column2-content'] );
$starter['arts-social-column2-post-category'] = ( is_numeric( $input['arts-social-column2-post-category'] ) ? (int)$input['arts-social-column2-post-category'] : 'all' );
$starter['arts-social-column2-twitter-widget-id'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-twitter-widget-id'], $starter['arts-social-column2-twitter-widget-id'] );
$starter['arts-social-column2-twitter-user'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-twitter-user'], $starter['arts-social-column2-twitter-user'] );
$starter['arts-social-column2-twitter-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-twitter-url'], $starter['arts-social-column2-twitter-url'] );
$starter['arts-social-column2-instagram'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-instagram'], $starter['arts-social-column2-instagram'] );
$starter['arts-social-column2-facebook'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-facebook'], $starter['arts-social-column2-facebook'] );
$starter['arts-social-column2-flickr'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-flickr'], $starter['arts-social-column2-flickr'] );
$starter['arts-social-column2-rss'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column2-rss'], $starter['arts-social-column2-rss'] );
// Column 3
$starter['arts-social-column3-title'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-title'], $starter['arts-social-column3-title'] );
$starter['arts-social-column3-logo'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-logo'], $starter['arts-social-column3-logo'] );
$starter['arts-social-column3-num-items'] = ( is_numeric( $input['arts-social-column3-num-items'] ) ? (int)$input['arts-social-column3-num-items'] : $starter['arts-social-column3-num-items'] );
// Validate Social Options
if ( isset( $input['arts-social-column3-type'] ) && array_key_exists( $input['arts-social-column3-type'], UBC_FOA_Theme_Options::arts_social3_options() ) ) {
$starter['arts-social-column3-type'] = $input['arts-social-column3-type'];
}
$starter['arts-social-column3-content'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-content'], $starter['arts-social-column3-content'] );
$starter['arts-social-column3-post-category'] = ( is_numeric( $input['arts-social-column3-post-category'] ) ? (int)$input['arts-social-column3-post-category'] : 'all' );
$starter['arts-social-column3-twitter-widget-id'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-twitter-widget-id'], $starter['arts-social-column3-twitter-widget-id'] );
$starter['arts-social-column3-twitter-user'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-twitter-user'], $starter['arts-social-column3-twitter-user'] );
$starter['arts-social-column3-twitter-url'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-twitter-url'], $starter['arts-social-column3-twitter-url'] );
$starter['arts-social-column3-instagram'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-instagram'], $starter['arts-social-column3-instagram'] );
$starter['arts-social-column3-facebook'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-facebook'], $starter['arts-social-column3-facebook'] );
$starter['arts-social-column3-flickr'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-flickr'], $starter['arts-social-column3-flickr'] );
$starter['arts-social-column3-rss'] = UBC_Collab_Theme_Options::validate_text($input['arts-social-column3-rss'], $starter['arts-social-column3-rss'] );
$output = array_merge($output, $starter);
return $output;
}
/**
* Returns and array of news-ticker options
*/
public static function arts_news_ticker_options() {
$slider_direction = array(
'disabled' => array(
'value' => 'disabled',
'label' => __( 'Disabled', 'arts-clf' )
),
'before_content' => array(
'value' => 'before_content',
'label' => __( 'Before Content', 'arts-clf' )
),
'after_content' => array(
'value' => 'after_content',
'label' => __( 'After Content', 'arts-clf' )
)
);
return $slider_direction;
}
/**
* Returns and array of options for slider logo position
*/
public static function arts_slider_logo_position() {
$slider_direction = array(
'0' => array(
'value' => '0',
'label' => __( 'Left', 'arts-clf' )
),
'auto' => array(
'value' => 'auto',
'label' => __( 'Right', 'arts-clf' )
)
);
return $slider_direction;
}
/**
* Returns and array of reverse colours
*/
public static function arts_reverse_colour() {
$reverse_colour = array(
'white' => array(
'value' => 'white',
'label' => __( 'White', 'arts-clf' )
),
'black' => array(
'value' => 'black',
'label' => __( 'Black', 'arts-clf' )
)
);
return $reverse_colour;
}
/**
* Returns and array of Social Columns for column 1
*/
public static function arts_social1_options() {
$social_columns = array(
'0' => array(
'value' => '0',
'label' => __( 'Select', 'arts-clf' )
),'sr1-posts' => array(
'value' => 'sr1-posts',
'label' => __( 'Posts', 'arts-clf' )
),
'sr1-twitter' => array(
'value' => 'sr1-twitter',
'label' => __( 'Twitter', 'arts-clf' )
),
'sr1-flickr' => array(
'value' => 'sr1-flickr',
'label' => __( 'Flickr', 'arts-clf' )
),
'sr1-rss' => array(
'value' => 'sr1-rss',
'label' => __( 'RSS', 'arts-clf' )
),
'sr1-text' => array(
'value' => 'sr1-text',
'label' => __( 'Text', 'arts-clf' )
)
);
return $social_columns;
}
/**
* Returns and array of Social Columns for column 2
*/
public static function arts_social2_options() {
$social_columns = array(
'0' => array(
'value' => '0',
'label' => __( 'Select', 'arts-clf' )
),'sr2-posts' => array(
'value' => 'sr2-posts',
'label' => __( 'Posts', 'arts-clf' )
),
'sr2-twitter' => array(
'value' => 'sr2-twitter',
'label' => __( 'Twitter', 'arts-clf' )
),
'sr2-flickr' => array(
'value' => 'sr2-flickr',
'label' => __( 'Flickr', 'arts-clf' )
),
'sr2-rss' => array(
'value' => 'sr2-rss',
'label' => __( 'RSS', 'arts-clf' )
),
'sr2-text' => array(
'value' => 'sr2-text',
'label' => __( 'Text', 'arts-clf' )
)
);
return $social_columns;
}
/**
* Returns and array of Social Columns for column 2
*/
public static function arts_social3_options() {
$social_columns = array(
'0' => array(
'value' => '0',
'label' => __( 'Select', 'arts-clf' )
),'sr3-posts' => array(
'value' => 'sr3-posts',
'label' => __( 'Posts', 'arts-clf' )
),
'sr3-twitter' => array(
'value' => 'sr3-twitter',
'label' => __( 'Twitter', 'arts-clf' )
),
'sr3-flickr' => array(
'value' => 'sr3-flickr',
'label' => __( 'Flickr', 'arts-clf' )
),
'sr3-rss' => array(
'value' => 'sr3-rss',
'label' => __( 'RSS', 'arts-clf' )
),
'sr3-text' => array(
'value' => 'sr3-text',
'label' => __( 'Text', 'arts-clf' )
)
);
return $social_columns;
}
/**
* number_of_social_items function.
* @access public
* @return array
*/
public static function number_of_social_items(){
$number_of_social_items = array();
$max_number_of_social_items = 30;
for($i=1; $i < $max_number_of_social_items; $i++){
$number_of_social_items[$i] = array(
'value' => $i,
'label' => __( $i, 'ubc-clf' )
);
}
return $number_of_social_items;
}
/**
* add_arts_logo_to_menu
* Adds the Arts logo to primary menu
* @access public
* @return menu items
*/
public static function add_arts_logo_to_menu ( $items, $args ) {
if ($args->theme_location == 'primary') {
if(UBC_Collab_Theme_Options::get('arts-enable-logo')){
$items = '<li class="menu-item-foa"><a id="artslogo" href="'.self::$faculty_main_homepage.'" title="Arts" target="_blank"><img src="'.UBC_Collab_Theme_Options::get('arts-logo-url').'"/>Faculty of Art</a></li>'.$items;
}
}
return $items;
}
/**
* add_apply_now_to_menu
* Adds the optional Apply Now button to the primary menu
* @access public
* @return menu items
*/
public static function add_apply_now_to_menu( $items, $args ){
if ($args->theme_location == 'primary') {
if(UBC_Collab_Theme_Options::get('arts-enable-apply-now')){
$items .= '<a id="applybtn" href="'.UBC_Collab_Theme_Options::get('arts-apply-now-url').'" title="Apply Now">'.UBC_Collab_Theme_Options::get('arts-apply-now-text').'</a>';
}
}
return $items;
}
/**
* add_news_ticker will add the html code to the homepage if this feature is enabled
*
*/
public static function add_news_ticker(){
if(UBC_Collab_Theme_Options::get('arts-enable-news-ticker')!= 'disabled'){
if(UBC_Collab_Theme_Options::get('arts-enable-news-ticker')== 'after_content'){
add_filter( self::$prefix.'_after_content', array(__CLASS__, 'add_news_ticker_content' ));
} else{
add_filter( self::$prefix.'_before_content', array(__CLASS__, 'add_news_ticker_content' ));
}
}
}
/**
* Generates content for the news ticker based on the selected category
*
*/
public static function add_news_ticker_content(){
$query_attr = array();
$category = UBC_Collab_Theme_Options::get('arts-news-ticker-category');
if( in_array( $category, array( 0, 'all', '0') ) ):
if( is_numeric($category) ):
$query_attr['cat'] = (int)$category;
else:
$query_attr['category_name'] = $category;
endif;
else:
$query_attr['cat'] = (int)$category;
endif;
$query_attr['posts_per_page'] = 5;
$news_ticker_query = new WP_Query( $query_attr );
$html = '<div class="row-fluid news-ticker"><div class="span6 offset3" id="news-ticker"><ul>';
while ( $news_ticker_query->have_posts() ){
$news_ticker_query->the_post();
$html .='<li>'.get_the_title().'</li>';
}
$html .= '</ul></div></div>';
if(!is_front_page()){
$html = '';
}
echo $html;
}
/**
* add_social_row calls the appropriate function to generate social media row html if this feature is enabled
*
*/
public static function add_social_row(){
if(UBC_Collab_Theme_Options::get('arts-enable-social-row')){
add_filter( self::$prefix.'_after_content', array(__CLASS__, 'add_social_row_content' ));
}
}
/**
* Generates the html content and calls the appropriate function based on selection
*/
public static function add_social_row_content(){
$html = '<div class="row-fluid entry-content social-row">
<div class="span4 sr-col1">
<h3>'.UBC_Collab_Theme_Options::get('arts-social-column1-title').'</h3>
<div class="sr-col1-content">'.UBC_FOA_Theme_Options::get_social_content(UBC_Collab_Theme_Options::get('arts-social-column1-type')).'</div>
</div><!--end span4-->
<div class="span4 sr-col2">
<h3>'.UBC_Collab_Theme_Options::get('arts-social-column2-title').'</h3>
<div class="sr-col2-content">'.UBC_FOA_Theme_Options::get_social_content(UBC_Collab_Theme_Options::get('arts-social-column2-type')).'</div>
</div><!--end span4-->
<div class="span4 sr-col3">
<h3>'.UBC_Collab_Theme_Options::get('arts-social-column3-title').'</h3>
<div class="sr-col3-content">'.UBC_FOA_Theme_Options::get_social_content(UBC_Collab_Theme_Options::get('arts-social-column3-type')).'</div>
</div><!--end span4-->
</div><!--row-fluid--><br><br>';
if(!is_front_page()){
$html = '';
}
echo $html;
}
/**
* Based on the selected content type, it will call the appropriate funtion that generates the
* appropriate content
*
* @param type $content_type
* @return type
*/
public static function get_social_content($content_type){
$content = '';
switch ($content_type) {
/* Posts */
case 'sr1-posts':
$content .= UBC_FOA_Theme_Options::get_social_posts(UBC_Collab_Theme_Options::get('arts-social-column1-post-category'), UBC_Collab_Theme_Options::get('arts-social-column1-num-items'));
break;
case 'sr2-posts':
$content .= UBC_FOA_Theme_Options::get_social_posts(UBC_Collab_Theme_Options::get('arts-social-column2-post-category'), UBC_Collab_Theme_Options::get('arts-social-column2-num-items'));
break;
case 'sr3-posts':
$content .= UBC_FOA_Theme_Options::get_social_posts(UBC_Collab_Theme_Options::get('arts-social-column3-post-category'), UBC_Collab_Theme_Options::get('arts-social-column3-num-items'));
break;
/* Twitter */
case 'sr1-twitter':
$content .= UBC_FOA_Theme_Options::get_social_twitter(UBC_Collab_Theme_Options::get('arts-social-column1-twitter-widget-id'),
UBC_Collab_Theme_Options::get('arts-social-column1-twitter-user'),
UBC_Collab_Theme_Options::get('arts-social-column1-twitter-url'));
break;
case 'sr2-twitter':
$content .= UBC_FOA_Theme_Options::get_social_twitter(UBC_Collab_Theme_Options::get('arts-social-column2-twitter-widget-id'),
UBC_Collab_Theme_Options::get('arts-social-column2-twitter-user'),
UBC_Collab_Theme_Options::get('arts-social-column2-twitter-url'));
break;
case 'sr3-twitter':
$content .= UBC_FOA_Theme_Options::get_social_twitter(UBC_Collab_Theme_Options::get('arts-social-column3-twitter-widget-id'),
UBC_Collab_Theme_Options::get('arts-social-column3-twitter-user'),
UBC_Collab_Theme_Options::get('arts-social-column3-twitter-url'));
break;
/* Facebook */
case 'sr1-facebook':
$content .= UBC_FOA_Theme_Options::get_social_facebook(UBC_Collab_Theme_Options::get('arts-social-column1-facebook'));
break;
case 'sr2-facebook':
$content .= UBC_FOA_Theme_Options::get_social_facebook(UBC_Collab_Theme_Options::get('arts-social-column2-facebook'));
break;
case 'sr3-facebook':
$content .= UBC_FOA_Theme_Options::get_social_facebook(UBC_Collab_Theme_Options::get('arts-social-column3-facebook'));
break;
/* Flickr */
case 'sr1-flickr':
$content .= UBC_FOA_Theme_Options::get_social_flickr(UBC_Collab_Theme_Options::get('arts-social-column1-flickr'), UBC_Collab_Theme_Options::get('arts-social-column1-num-items'));
break;
case 'sr2-flickr':
$content .= UBC_FOA_Theme_Options::get_social_flickr(UBC_Collab_Theme_Options::get('arts-social-column2-flickr'), UBC_Collab_Theme_Options::get('arts-social-column2-num-items'));
break;
case 'sr3-flickr':
$content .= UBC_FOA_Theme_Options::get_social_flickr(UBC_Collab_Theme_Options::get('arts-social-column3-flickr'), UBC_Collab_Theme_Options::get('arts-social-column3-num-items'));
break;
/* Instagram */
case 'sr1-instagram':
$content .= UBC_FOA_Theme_Options::get_social_instagram(UBC_Collab_Theme_Options::get('arts-social-column1-instagram'), UBC_Collab_Theme_Options::get('arts-social-column1-num-items'));
break;
case 'sr2-instagram':
$content .= UBC_FOA_Theme_Options::get_social_instagram(UBC_Collab_Theme_Options::get('arts-social-column2-instagram'), UBC_Collab_Theme_Options::get('arts-social-column2-num-items'));
break;
case 'sr3-instagram':
$content .= UBC_FOA_Theme_Options::get_social_instagram(UBC_Collab_Theme_Options::get('arts-social-column3-instagram'), UBC_Collab_Theme_Options::get('arts-social-column3-num-items'));
break;
/* RSS */
case 'sr1-rss':
$content .= UBC_FOA_Theme_Options::get_social_rss(UBC_Collab_Theme_Options::get('arts-social-column1-rss'), UBC_Collab_Theme_Options::get('arts-social-column1-num-items'));
break;
case 'sr2-rss':
$content .= UBC_FOA_Theme_Options::get_social_rss(UBC_Collab_Theme_Options::get('arts-social-column2-rss'), UBC_Collab_Theme_Options::get('arts-social-column2-num-items'));
break;
case 'sr3-rss':
$content .= UBC_FOA_Theme_Options::get_social_rss(UBC_Collab_Theme_Options::get('arts-social-column3-rss'), UBC_Collab_Theme_Options::get('arts-social-column3-num-items'));
break;
/* Text */
case 'sr1-text':
$content .= UBC_FOA_Theme_Options::get_social_text(UBC_Collab_Theme_Options::get('arts-social-column1-content'));
break;
case 'sr2-text':
$content .= UBC_FOA_Theme_Options::get_social_text(UBC_Collab_Theme_Options::get('arts-social-column2-content'));
break;
case 'sr3-text':
$content .= UBC_FOA_Theme_Options::get_social_text(UBC_Collab_Theme_Options::get('arts-social-column3-content'));