-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
executable file
·887 lines (825 loc) · 27.6 KB
/
functions.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
<?php
/**
* Functions.php file for GV Microgrants Child Theme
*
* Assumes parent is gv-project-theme.
* This code will run before the functions.php in that theme.
*/
if (isset($gv) AND is_object($gv)) :
/**
* Disable automatic plugin activation from parent theme. We need this theme to work in MU
*/
define('GV_NO_DEFAULT_PLUGINS', TRUE);
/**
* Define GV_LINGUA as false to override the TRUE definition in the projects theme
*/
if (!defined('GV_LINGUA'))
define('GV_LINGUA', FALSE);
/**
* For geo mashup plugin show excerpts instead of thumbnails
*/
add_filter('gv_geo_mashup_show_thumbnail', '__return_false');
add_filter('gv_geo_mashup_show_excerpt', '__return_true');
/**
* OPTIONAL: Geo Mashup filter to show map in postmeta sidebar
*/
add_filter('gv_geo_mashup_show_map', '__return_true');
/**
* Define excerpt length
*/
if (!defined('GV_EXCERPT_LENGTH'))
define('GV_EXCERPT_LENGTH', 999);
/**
* Define an image to show in the header.
* Project theme generic has none, so it will use site title
*/
$gv->settings['header_img'] = get_stylesheet_directory_uri() . '/RisingVoices-microgrants-amazonia-600.png';
/**
* Register custom postmeta fields with the Custom Medatata Manager plugin
*
* Convert to some other format if this ever stops working
*/
function gv_microgrants_custom_metadata_manager_admin_init() {
/**
* Exit if GV_MICROGRANTS_METADATA_DEFINED constant is true, it means the questions
* were already defined in a plugin.
*
* Expected for old sites using this theme so they can keep their questions
*/
if (defined('GV_MICROGRANTS_METADATA_DEFINED'))
return;
/**
* Exit if the plugin isn't present
*/
if(!function_exists( 'x_add_metadata_field' ) OR !function_exists( 'x_add_metadata_group' ) )
return;
/**
* Register a group for pages and posts
*/
x_add_metadata_group('gv_custom_metadata_posts', array('post'), array(
'label' => 'GV Custom Metadata',
'priority' => 'high',
));
/**
* Proposal Community
*/
x_add_metadata_field( 'proposal-community', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Describe the specific population with whom you will be working',
'field_type' => 'textarea',
));
/**
* Proposal Team
*/
x_add_metadata_field( 'proposal-team', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Who else will be on your team to help implement the project?',
'field_type' => 'textarea',
));
/**
* Proposal Convent Vision
*/
x_add_metadata_field( 'proposal-content-vision', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'What kinds of news, stories and other content will be created?',
'field_type' => 'textarea',
));
/**
* Proposal Connections
*/
x_add_metadata_field( 'proposal-connections', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Describe the connections that you or your organization have already established or plan to establish that will contribute to the success of the project.',
'field_type' => 'textarea',
));
/**
* Proposal Participants
*/
x_add_metadata_field( 'proposal-participants', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'How many participants do you think will be trained in your project?',
'field_type' => 'textarea',
));
/**
* Proposal Technical
*/
x_add_metadata_field( 'proposal-technical', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Describe which technologies, tools, and media you will focus on when training participants.',
'field_type' => 'textarea',
));
/**
* Proposal Facilities
*/
x_add_metadata_field( 'proposal-facilities', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Describe the facilities where you will hold the workshops.',
'field_type' => 'textarea',
));
/**
* Proposal Relationship
*/
x_add_metadata_field( 'proposal-relationship', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'What is your current relationship with the community with whom you plan to work? What makes you the most appropriate individual or organization to implement this project?',
'field_type' => 'textarea',
));
/**
* Proposal Challenges
*/
x_add_metadata_field( 'proposal-challenges', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'What specific challenges do you expect to face when planning and implementing your project?',
'field_type' => 'textarea',
));
/**
* Proposal Impact
*/
x_add_metadata_field( 'proposal-impact', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'How will you measure and evaluate the project’s impact, specifically: your primary participants, the wider regional community, or the global digital community?',
'field_type' => 'textarea',
));
/**
* Proposal Timeline
*/
x_add_metadata_field( 'proposal-timeline', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => ' If your project were to be selected as a Rising Voices grantee, what would be the general timeline of project activities in 2014?',
'field_type' => 'textarea',
));
/**
* Proposal Budget
*/
x_add_metadata_field( 'proposal-budget', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Detail a specific budget of up to $2,500 USD for operating costs.',
'field_type' => 'textarea',
));
/**
* Proposal Total money requested
*/
x_add_metadata_field( 'proposal-total', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Total amount you are requesting (in US dollars)',
'field_type' => 'text',
));
/**
* Proposal Other Resources
*/
x_add_metadata_field( 'proposal-otherresources', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Besides the microgrant funding, what other support can Rising Voices provide for your project to ensure its success?',
'field_type' => 'textarea',
));
/**
* Proposal City
*/
x_add_metadata_field( 'proposal-city', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'What locality or neighborhood will your project focus on?',
'field_type' => 'text',
));
/**
* Proposal Contact
*/
x_add_metadata_field( 'proposal-contact', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Contact name',
'field_type' => 'text',
));
/**
* Proposal Mailing address
*/
x_add_metadata_field( 'proposal-address', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Mailing Address',
'field_type' => 'text',
));
/**
* Proposal Telephone number
*/
x_add_metadata_field( 'proposal-number', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Telephone Number',
'field_type' => 'text',
));
/**
* Proposal Email
*/
x_add_metadata_field( 'proposal-email', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Your email address',
'field_type' => 'text',
));
/**
* Proposal Organization
*/
x_add_metadata_field( 'proposal-organization', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Organization',
'field_type' => 'text',
));
/**
* Proposal URL
*/
x_add_metadata_field( 'proposal-url', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Project website URL',
'field_type' => 'text',
));
/**
* Proposal Twitter
*/
x_add_metadata_field( 'proposal-twitter', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Twitter URL',
'field_type' => 'text',
));
/**
* Proposal Facebook
*/
x_add_metadata_field( 'proposal-facebook', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Facebook URL',
'field_type' => 'text',
));
/**
* Proposal First Time
*/
x_add_metadata_field( 'proposal-firsttime', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Is this the first time that you have applied for a Rising Voices microgrant?',
'field_type' => 'text',
));
/**
* Proposal Private
*/
x_add_metadata_field( 'proposal-private', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Don\'t publish this proposal',
'field_type' => 'checkbox',
));
/**
* Proposal Privacy Reason
*/
x_add_metadata_field( 'proposal-privacy-reason', array('post'), array(
'group' => 'gv_custom_metadata_posts',
'label' => 'Why don\'t you want us to publish your proposal?',
'field_type' => 'textarea',
));
// /**
// * Hide creation/update dates, pages only
// */
// x_add_metadata_field('gv-hide-dates', array( 'page'), array(
// 'group' => 'gv_custom_metadata_posts',
// 'label' => 'Hide dates on post (creation and last updated)',
// 'field_type' => 'checkbox',
// ));
}
add_action( 'admin_init', 'gv_microgrants_custom_metadata_manager_admin_init', 15);
/**
* Register postmeta inserts
*
* These will be auto-inserted into post content
*/
function gv_microgrants_register_postmeta_inserts() {
if (!function_exists('gv_register_postmeta_insert'))
return;
/**
* Exit if GV_MICROGRANTS_POSTMETA_INSERTS_DEFINED constant is true, it means the questions
* were already defined in a plugin.
*
* Expected for old sites using this theme so they can keep their questions
*/
if (defined('GV_MICROGRANTS_POSTMETA_INSERTS_DEFINED'))
return;
gv_register_postmeta_insert(array(
'taxonomy' => 'gv_topics',
'label' => 'Topical focus:',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'taxonomy' => 'gv_geo',
'label' => 'Country:',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-city',
'label' => 'What locality or neighborhood will your project focus on?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-community',
'label' => 'Describe the specific population with whom you will be working.',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-team',
'label' => 'Who else will be on your team to help implement the project?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-content-vision',
'label' => 'What kinds of news, stories and other content will be created?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'taxonomy' => 'gv_tools',
'label' => 'What technologies and digital tools do you plan to use in the trainings?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-tools',
'label' => 'Other tools',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-connections',
'label' => 'Describe the connections that you or your organization have already established or plan to establish that will contribute to the success of the project.',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-participants',
'label' => 'How many participants do you think will be trained in your project?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-technical',
'label' => 'Describe which technologies, tools, and media you will focus on when training participants.',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-facilities',
'label' => 'Describe the facilities where you will hold the workshops.',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-relationship',
'label' => 'What is your current relationship with the community with whom you plan to work? What makes you the most appropriate individual or organization to implement this project?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-challenges',
'label' => 'What specific challenges do you expect to face when planning and implementing your project?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-impact',
'label' => 'How will you measure and evaluate the project’s impact, specifically: your primary participants, the wider regional community, or the global digital community?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-timeline',
'label' => ' If your project were to be selected as a Rising Voices grantee, what would be the general timeline of project activities in 2014?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-budget',
'label' => 'Detail a specific budget of up to $2,500 USD for operating costs.',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-otherresources',
'label' => 'Besides the microgrant funding, what other support can Rising Voices provide for your project to ensure its success?',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-contact',
'label' => 'Contact name',
'position' => 'bottom',
));
// gv_register_postmeta_insert(array(
// 'postmeta_field_name' => 'proposal-email',
// 'label' => 'Your email address',
// 'position' => 'bottom',
// ));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-organization',
'label' => 'Organization',
'position' => 'bottom',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-url',
'label' => 'Link to Existing Project',
'position' => 'bottom',
'display' => 'url',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-twitter',
'label' => 'Twitter URL',
'position' => 'bottom',
'display' => 'url',
));
gv_register_postmeta_insert(array(
'postmeta_field_name' => 'proposal-facebook',
'label' => 'Facebook URL',
'position' => 'bottom',
'display' => 'url',
));
}
add_action('init', 'gv_microgrants_register_postmeta_inserts', 15);
/**
* Insert "Long Description" h3 above post content
*
* Used to make post body match style of fields inserted above it
* by gv_register_postmeta_field
*
* @global object $post Post object who's content is being filtered
* @param string $content Post content to filter
* @return string Filtered content
*/
function gv_microgrants_add_long_description_top_of_content($content) {
global $post;
if (is_admin() OR ('post' != $post->post_type))
return $content;
$content = "<h3>Long Description</h3>" . $content;
return $content;
}
// add_filter('the_content', 'gv_microgrants_add_long_description_top_of_content');
/**
* Register taxonomies for this site
*/
function gv_microgrants_register_taxonomies() {
/**
* Register geo taxonomy for posts
*/
register_taxonomy('gv_geo', 'gv_geo', array(
'labels' => array(
'name' => _lingua('region_categories'),
'singular_name' => _lingua('region_category'),
'search_items' => _lingua('search_region_categories'),
'all_items' => _lingua('all_region_categories'),
'parent_item' => _lingua('parent_region_category'),
'parent_item_colon' => _lingua('parent_region_category') . ":",
'edit_item' => _lingua('edit_region_category'),
'update_item' => _lingua('edit_region_category'),
'add_new_item' => _lingua('add_region_category'),
'new_item_name' => _lingua('new_region_category_name'),
'menu_name' => _lingua('region_categories'),
),
'public' => true,
'show_ui' => true,
// fixes http://core.trac.wordpress.org/ticket/14084
'update_count_callback' => '_update_post_term_count',
'show_admin_column' => true,
'hierarchical' => true,
'query_var' => 'geo',
'rewrite' => array(
'slug' => 'geo'
), ));
register_taxonomy_for_object_type('gv_geo', 'post');
/**
* Register Topics taxonomy
*/
register_taxonomy('gv_topics', 'gv_topics', array(
'labels' => array(
'name' => _lingua('topic_categories'),
'singular_name' => _lingua('topic_category'),
'search_items' => _lingua('search_topic_categories'),
'all_items' => _lingua('all_topic_categories'),
'parent_item' => _lingua('parent_topic_category'),
'parent_item_colon' => _lingua('parent_topic_category') . ":",
'edit_item' => _lingua('edit_topic_category'),
'update_item' => _lingua('edit_topic_category'),
'add_new_item' => _lingua('add_topic_category'),
'new_item_name' => _lingua('new_topic_category_name'),
'menu_name' => _lingua('topic_categories'),
),
'public' => true,
'show_ui' => true,
// fixes http://core.trac.wordpress.org/ticket/14084
'update_count_callback' => '_update_post_term_count',
'show_admin_column' => true,
'hierarchical' => true,
'query_var' => 'topic',
'rewrite' => array(
'slug' => 'topic'
),
));
register_taxonomy_for_object_type('gv_topics', 'post');
/**
* Register tool categories
*/
register_taxonomy('gv_tools', 'gv_tools', array(
'labels' => array(
'name' => _lingua('tool_categories'),
'singular_name' => _lingua('tool_category'),
'search_items' => _lingua('search_tool_categories'),
'all_items' => _lingua('all_tool_categories'),
'parent_item' => _lingua('parent_tool_category'),
'parent_item_colon' => _lingua('parent_tool_category') . ":",
'edit_item' => _lingua('edit_tool_category'),
'update_item' => _lingua('edit_tool_category'),
'add_new_item' => _lingua('add_tool_category'),
'new_item_name' => _lingua('new_tool_category_name'),
'menu_name' => _lingua('tool_categories'),
),
'public' => true,
'show_ui' => true,
// fixes http://core.trac.wordpress.org/ticket/14084
'update_count_callback' => '_update_post_term_count',
'show_admin_column' => true,
'hierarchical' => true,
'query_var' => 'tools',
'rewrite' => array(
'slug' => 'tools'
),
));
register_taxonomy_for_object_type('gv_tools', 'post');
/**
* Register "public taxonomies" for gv_taxonomies system to display automatically on posts
*/
// Unregister defaults as they aren't useful for this site
gv_unregister_public_taxonomy('category');
gv_unregister_public_taxonomy('post_tag');
/**
* "Regions" taxonomy based on parentless members of gv_geo
*/
gv_register_public_taxonomy('gv_geo', array(
'subtaxonomy_slug' => 'region',
'parent' => 'none',
'labels' => array(
'name' => _lingua('regions'),
'singular_name' => 'Region',
),
));
/**
* "Countries" taxonomy based on parentless members of gv_geo
*/
gv_register_public_taxonomy('gv_geo', array(
'subtaxonomy_slug' => 'country',
'grandparent' => 'none',
'labels' => array(
'name' => _lingua('countries'),
'singular_name' => 'country',
),
));
/**
* register our topics and tools taxonomies as public
*/
gv_register_public_taxonomy('gv_topics');
gv_register_public_taxonomy('gv_tools');
/**
* Filter gv_display_post_terms $before arg to remove middot
*
* Needed because we hide the author with CSS so there's nothing before it
*
* @see gv_taxonomies::display_post_terms() where this filter is called
* @param string $before HTML string passed to display_post_terms for us to filter
* @param aray $args Args passed to display_post_terms for context checking
* @return string Filtered before text
*/
function gv_news_filter_display_post_terms_before($before, $args) {
// Only set limit if we're on inline format
if ('inline' == $args['format'])
$before = str_replace ('·', 'Categories: ', $before);
return $before;
}
add_filter('gv_display_post_terms_before', 'gv_news_filter_display_post_terms_before', 10, 2);
/**
* Filter tag cloud widget arguments to remove limit on number to show
*
*
* @see WP_Widget_Tag_Cloud Widget class for the tag cloud widget
* @param array $args All default arguments
* @return array Modified arguments
*/
function gv_microgrants_filter_widget_tag_cloud_args($args) {
$args['number'] = 0;
return $args;
}
add_filter('widget_tag_cloud_args', 'gv_microgrants_filter_widget_tag_cloud_args');
}
add_filter('init', 'gv_microgrants_register_taxonomies');
/**
* Register strings specific to this site for Theme Translator
*/
function gv_news_register_theme_strings() {
/**
* Region categories
*/
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'region_categories',
'default_text' => 'Region Categories',
'note' => 'Labels for the custom taxonomies used by the Microgrants child theme. These are separate from the usual "topics" and "regions" of the main GV site.',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'region_category',
'default_text' => 'Region Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'search_region_categories',
'default_text' => 'Search Region Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'all_region_categories',
'default_text' => 'All Region Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'parent_region_category',
'default_text' => 'Parent Region Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'edit_region_category',
'default_text' => 'Edit Region Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'add_region_category',
'default_text' => 'Add New Region Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'new_region_category_name',
'default_text' => 'New Region Category Name',
'note' => '',
)
);
/**
* Topic categories
*/
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'topic_categories',
'default_text' => 'Topic Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'topic_category',
'default_text' => 'Topic Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'search_topic_categories',
'default_text' => 'Search Topic Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'all_topic_categories',
'default_text' => 'All Topic Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'parent_topic_category',
'default_text' => 'Parent Topic Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'edit_topic_category',
'default_text' => 'Edit Topic Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'add_topic_category',
'default_text' => 'Add New Topic Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'new_topic_category_name',
'default_text' => 'New Topic Category Name',
'note' => '',
)
);
/**
* Tool categories
*/
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'tool_categories',
'default_text' => 'Tool Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'tool_category',
'default_text' => 'Tool Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'search_tool_categories',
'default_text' => 'Search Tool Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'all_tool_categories',
'default_text' => 'All Tool Categories',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'parent_tool_category',
'default_text' => 'Parent Tool Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'edit_tool_category',
'default_text' => 'Edit Tool Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'add_tool_category',
'default_text' => 'Add New Tool Category',
'note' => '',
)
);
gv_register_theme_string(array(
'section' => 'Microgrants Taxonomy Labels',
'string_slug' => 'new_tool_category_name',
'default_text' => 'New Tool Category Name',
'note' => '',
)
);
}
add_filter('after_setup_theme', 'gv_news_register_theme_strings');
/**
* Filter the og:image (facebook/g+) default icon to be an RV logo
*
* @param string $icon Default icon
* @return string desired icon
*/
function gvadvocacy_theme_gv_og_image_default($icon) {
return gv_get_dir('theme_images') ."rv-logo-facebook-og-1200x631.png";
}
add_filter('gv_og_image_default', 'gvadvocacy_theme_gv_og_image_default');
/**
* Filter ALL CASES OF og:image (facebook/g+) icon to be an RV logo
*
* @param string $icon Default icon
* @return string desired icon
*/
function gvadvocacy_theme_gv_og_image($icon) {
return gv_get_dir('theme_images') ."rv-logo-square-600.png";
}
// add_filter('gv_og_image', 'gvadvocacy_theme_gv_og_image');
/**
* Sponsors definition to be used by gv_get_sponsors()
*/
$gv->sponsors = array(
'avina' => array(
"name" => "Avina",
"slug" => "avina",
'description' => 'Avina is a Latin American foundation that identifies opportunities to achieve systemic change relevant for sustainable development, by connecting and empowering people and institutions in shared agendas for action.',
"url" => "http://www.avina.net/eng/",
'status' => 'featured',
),
'avina-americas' => array(
"name" => "Avina Americas",
"slug" => "avina-americas",
'description' => 'Avina Americas\' mission is to impact sustainable development in Latin America and beyond by engaging U.S. actors in shared strategies for action which contribute to the common good. ',
"url" => "http://http://www.avinaamericas.org/",
'status' => 'featured',
),
'skoll' => array(
"name" => "Skoll Foundation",
"slug" => "skoll",
'description' => 'The Skoll Foundation invests in, connects, and celebrates social entrepreneurs and the innovators who help them solve the world’s most pressing problems.',
"url" => "http://www.skollfoundation.org/",
'status' => 'featured',
),
);
endif; // is_object($gv)
?>