Skip to content
This repository
Browse code

version 1.10 merge

** Details
__________________________________

> merge all commits from pro version 1.9.1 to version 1.10

> new architecture for free<>pro development

> countles bugfixes and improvements on the code

> some new features like the scrollable buddypress submenu (when too many tabs)
  • Loading branch information...
commit cc9c482e9eca79b2f62e6daa42fa2a4bf2d67281 1 parent e437adc
Konrad Sroka konradsroka authored

Showing 59 changed files with 12,450 additions and 5,612 deletions. Show diff stats Hide diff stats

  1. +23 6 _inc/ajax.php
  2. +26 0 _inc/css/admin.css
  3. +148 2 _inc/global.js
  4. BIN  _inc/images/get-pro.jpg
  5. +1 1  activity/post-form.php
  6. +103 82 admin/cheezcap.php
  7. +436 400 admin/config.php
  8. +14 13 admin/get-pro.php
  9. +37 31 admin/library.php
  10. +190 0 admin/page-meta-box.php
  11. +119 0 admin/post-meta-box.php
  12. +3 315 admin/post-metabox.php
  13. +6 7 attachment.php
  14. +0 2  blogs/blogs-loop.php
  15. +0 2  blogs/create.php
  16. +0 2  blogs/index.php
  17. +3 4 core/custom-community.php
  18. +14 9 core/includes/bp/buddydev-search.php
  19. +0 5 core/includes/bp/templatetags.php
  20. +289 30 core/includes/helper-functions.php
  21. +399 209 core/includes/theme-generator/style.php
  22. +115 73 core/includes/theme-generator/theme-generator.php
  23. +2 3 core/includes/tkf/wp/detect.php
  24. +50 248 core/includes/wp/shortcodes.php
  25. +14 14 core/includes/wp/widgets.php
  26. +1 2  core/loader.php
  27. +0 5 footer.php
  28. +72 90 functions.php
  29. +40 0 groups/groups-loop-grid.php
  30. +37 0 groups/groups-loop-list.php
  31. +2 38 groups/groups-loop.php
  32. +19 7 groups/index.php
  33. +2 1  groups/single/group-header-sidebar.php
  34. +36 0 groups/single/members-loop-grid.php
  35. +32 0 groups/single/members-loop-list.php
  36. +52 0 groups/single/members-loop.php
  37. +13 76 groups/single/members.php
  38. BIN  images/get-pro.jpg
  39. +1 0  languages/.gitignore
  40. BIN  languages/ka_GE.mo
  41. +0 2,347 languages/ka_GE.po
  42. BIN  languages/ro.mo
  43. +2,162 0 languages/ro.po
  44. BIN  languages/ru_RU.mo
  45. +3,305 1,463 languages/ru_RU.po
  46. +4,527 1 languages/xx_XX.pot
  47. +10 2 members/index.php
  48. +55 0 members/members-loop-grid.php
  49. +48 0 members/members-loop-list.php
  50. +1 48 members/members-loop.php
  51. +9 1 members/single/friends.php
  52. +11 0 members/single/groups.php
  53. +0 7 members/single/messages.php
  54. +0 38 members/single/settings.php
  55. +4 13 members/single/settings/capabilities.php
  56. +2 2 readme.txt
  57. +6 9 search-loop.php
  58. +9 2 search.php
  59. +2 2 style.css
29 _inc/ajax.php
@@ -39,7 +39,7 @@ function bp_dtheme_ajax_querystring( $query_string, $object ) {
39 39
40 40 if ( !empty( $_BP_COOKIE['bp-' . $object . '-scope'] ) ) {
41 41 if ( 'personal' == $_BP_COOKIE['bp-' . $object . '-scope'] ) {
42   - $user_id = ( $bp->displayed_user->id ) ? $bp->displayed_user->id : $bp->loggedin_user->id;
  42 + $user_id = ( isset($bp->displayed_user->id) && $bp->displayed_user->id ) ? $bp->displayed_user->id : (isset($bp->loggedin_user->id))? $bp->loggedin_user->id : '';
43 43 $qs[] = 'user_id=' . $user_id;
44 44 }
45 45 if ( 'all' != $_BP_COOKIE['bp-' . $object . '-scope'] && empty( $bp->displayed_user->id ) && !$bp->is_single_item )
@@ -83,18 +83,37 @@ function bp_dtheme_ajax_querystring( $query_string, $object ) {
83 83
84 84 /* This function will simply load the template loop for the current object. On an AJAX request */
85 85 function bp_dtheme_object_template_loader() {
86   - $object = esc_attr( $_POST['object'] );
87   - locate_template( array( "$object/$object-loop.php" ), true );
  86 + $object = esc_attr( $_REQUEST['object'] );
  87 + //custom template loop for single group->members page
  88 + if($object=='members' && $_REQUEST['scope'] == 'groups'){
  89 + locate_template( array( "groups/single/members-loop.php" ), true );
  90 + }
  91 + else{//load standart loop
  92 + locate_template( array( "$object/$object-loop.php" ), true );
  93 + }
  94 + exit;
88 95 }
89 96 add_action( 'wp_ajax_members_filter', 'bp_dtheme_object_template_loader' );
90 97 add_action( 'wp_ajax_groups_filter', 'bp_dtheme_object_template_loader' );
91 98 add_action( 'wp_ajax_blogs_filter', 'bp_dtheme_object_template_loader' );
92 99 add_action( 'wp_ajax_forums_filter', 'bp_dtheme_object_template_loader' );
  100 +
93 101 add_action( 'wp_ajax_nopriv_members_filter', 'bp_dtheme_object_template_loader' );
94 102 add_action( 'wp_ajax_nopriv_groups_filter', 'bp_dtheme_object_template_loader' );
95 103 add_action( 'wp_ajax_nopriv_blogs_filter', 'bp_dtheme_object_template_loader' );
96 104 add_action( 'wp_ajax_nopriv_forums_filter', 'bp_dtheme_object_template_loader' );
97 105
  106 +//actions for ajax change displaymode(grid or list)
  107 +add_action( 'wp_ajax_members_displaymode', 'bp_dtheme_object_template_loader' );
  108 +add_action( 'wp_ajax_groups_displaymode', 'bp_dtheme_object_template_loader' );
  109 +add_action( 'wp_ajax_blogs_displaymode', 'bp_dtheme_object_template_loader' );
  110 +add_action( 'wp_ajax_forums_displaymode', 'bp_dtheme_object_template_loader' );
  111 +//noprivilegios actions for ajax change displaymode(grid or list)
  112 +add_action( 'wp_ajax_nopriv_members_displaymode', 'bp_dtheme_object_template_loader' );
  113 +add_action( 'wp_ajax_nopriv_groups_displaymode', 'bp_dtheme_object_template_loader' );
  114 +add_action( 'wp_ajax_nopriv_blogs_displaymode', 'bp_dtheme_object_template_loader' );
  115 +add_action( 'wp_ajax_nopriv_forums_displaymode', 'bp_dtheme_object_template_loader' );
  116 +
98 117 // This function will load the activity loop template when activity is requested via AJAX
99 118 function bp_dtheme_activity_template_loader() {
100 119 global $bp;
@@ -134,10 +153,10 @@ function bp_dtheme_activity_template_loader() {
134 153 }
135 154 add_action( 'wp_ajax_activity_widget_filter', 'bp_dtheme_activity_template_loader' );
136 155 add_action( 'wp_ajax_activity_get_older_updates', 'bp_dtheme_activity_template_loader' );
  156 +
137 157 add_action( 'wp_ajax_nopriv_activity_widget_filter', 'bp_dtheme_activity_template_loader' );
138 158 add_action( 'wp_ajax_nopriv_activity_get_older_updates', 'bp_dtheme_activity_template_loader' );
139 159
140   -
141 160 /* AJAX update posting */
142 161 function bp_dtheme_post_update() {
143 162 global $bp;
@@ -357,7 +376,6 @@ function bp_dtheme_get_single_activity_content() {
357 376 }
358 377 add_action( 'wp_ajax_get_single_activity_content', 'bp_dtheme_get_single_activity_content' );
359 378 add_action( 'wp_ajax_nopriv_get_single_activity_content', 'bp_dtheme_get_single_activity_content' );
360   -
361 379 /* AJAX invite a friend to a group functionality */
362 380 function bp_dtheme_ajax_invite_user() {
363 381 global $bp;
@@ -670,4 +688,3 @@ function bp_dtheme_ajax_messages_autocomplete_results() {
670 688 }
671 689 add_action( 'wp_ajax_messages_autocomplete_results', 'bp_dtheme_ajax_messages_autocomplete_results' );
672 690
673   -?>
26 _inc/css/admin.css
... ... @@ -0,0 +1,26 @@
  1 +/*
  2 +Styles for admin part
  3 +*/
  4 +
  5 +#config-tabs .text_option_teaxarea {
  6 + width:100%;
  7 + height:100%;
  8 + overflow: hidden;
  9 +}
  10 +#config-tabs option-inputs .cc_image_preview{
  11 + max-width: 100px
  12 +}
  13 +.wrap p.additional_info{
  14 + margin-bottom:20px;
  15 + color:#000;
  16 +}
  17 +.wrap p.additional_info .themekraft-link{
  18 + color:#abc214;
  19 +}
  20 +.wrap .full-version-link{
  21 + color:#ff9900;
  22 +}
  23 +form .export-button{
  24 + margin-left:20px;
  25 +}
  26 +
150 _inc/global.js
@@ -163,6 +163,7 @@ jq(document).ready( function() {
163 163 return false;
164 164 });
165 165
  166 +
166 167 /* Stream event delegation */
167 168 jq('div.activity').click( function(event) {
168 169 var target = jq(event.target);
@@ -522,7 +523,7 @@ jq(document).ready( function() {
522 523
523 524 var target = jq(event.target).parent();
524 525
525   - if ( 'LI' == event.target.parentNode.nodeName && !target.hasClass('last') ) {
  526 + if ( 'LI' == event.target.parentNode.nodeName && !target.hasClass('last') && !target.hasClass('no-ajax')) {
526 527 var css_id = target.attr('id').split( '-' );
527 528 var object = css_id[0];
528 529
@@ -563,6 +564,34 @@ jq(document).ready( function() {
563 564 return false;
564 565 });
565 566
  567 + /* Displaymode (list or grid) */
  568 + jq('li.displaymode select').change( function() {
  569 + if ( jq('div.item-list-tabs li.selected').length )
  570 + var el = jq('div.item-list-tabs li.selected');
  571 + else
  572 + var el = jq(this);
  573 +
  574 + var page_number = 1;
  575 + var css_id = el.attr('id').split('-');
  576 + var object = css_id[0];
  577 + var scope = css_id[1];
  578 + var displaymode = jq(this).val();
  579 + var search_terms = false;
  580 +
  581 + if ( jq('div.dir-search input').length )
  582 + search_terms = jq('div.dir-search input').val();
  583 +
  584 + if ( 'friends' == object )
  585 + object = 'members';
  586 +
  587 + if ( jq('div.pagination span.current').length )
  588 + var page_number = Number( jq('div.pagination span.current').html() );
  589 +
  590 + bp_displaymode_request( object, displaymode, scope, 'div.' + object, search_terms, page_number, jq.cookie('bp-' + object + '-extras') );
  591 +
  592 + return false;
  593 + });
  594 +
566 595 /* All pagination links run through this function */
567 596 jq('div#content').click( function(event) {
568 597 var target = jq(event.target);
@@ -1054,6 +1083,68 @@ jq(document).ready( function() {
1054 1083 jq.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
1055 1084 });
1056 1085 });
  1086 +
  1087 +
  1088 + /* Scroll a lot of menu items in BuddyPress sub nav menu ------start*/
  1089 +
  1090 +
  1091 +
  1092 + var selector_nav_wrap = '.item-list-tabs[role="navigation"]:not("#subnav"), .item-list-tabs#object-nav';
  1093 +
  1094 + jq(selector_nav_wrap).prepend('<button class="prev">&lt;</button><button class="next">&gt;</button>').find('ul').wrap('<div>');
  1095 +
  1096 + // Enable or leave the keys
  1097 + jq(selector_nav_wrap).each(function(){
  1098 + if(jq('li:last',this).width()+jq('li:last',this).offset().left-jq('li:first',this).offset().left>jq('div',this).width()){
  1099 + // enable the buttons
  1100 + jq('button',this).css('display','inline');
  1101 + jq('button.prev',this).css('display','none');
  1102 + }
  1103 + });
  1104 +
  1105 +
  1106 + jq(selector_nav_wrap).on('click', '.next', function(){
  1107 + //Remove the exist selector
  1108 + //Set the width to the widest of either
  1109 + var $div =jq('div',this.parentNode)
  1110 + ,maxoffset = jq('li:last',$div).width()+jq('li:last',$div).offset().left - jq('li:first',$div).offset().left - $div.width()
  1111 + ,offset = Math.abs(parseInt( jq('ul',$div).css('marginLeft') ))
  1112 + ,diff = $div.width();
  1113 +
  1114 + if( offset >= maxoffset )
  1115 + return;
  1116 + else if ( offset + diff >= maxoffset ){
  1117 + diff = maxoffset - offset + 20;
  1118 + // Hide this
  1119 + jq(this).css('display','none');
  1120 + }
  1121 + // enable the other
  1122 + jq('.prev', this.parentNode).css('display','block');
  1123 +
  1124 + jq("ul", jq(this).parent() ).animate({
  1125 + marginLeft: "-=" + diff
  1126 + },400, 'swing');
  1127 + });
  1128 +
  1129 + jq(selector_nav_wrap).on('click', '.prev', function(){
  1130 +
  1131 + var offset = Math.abs(parseInt( jq('ul',this.parentNode).css('marginLeft') ));
  1132 + var diff = jq('div',this.parentNode).width();
  1133 + if( offset <= 0 )
  1134 + return;
  1135 + else if ( offset - diff <= 0 ){
  1136 + jq(this).css('display','none');
  1137 + diff = offset;
  1138 + }
  1139 + jq('.next', this.parentNode).css('display','block');
  1140 +
  1141 + jq("ul",jq(this).parent()).animate({
  1142 + marginLeft: '+='+diff
  1143 + },400, 'swing');
  1144 + });
  1145 + /* Scroll a lot of menu items in BuddyPress sub nav menu ------end*/
  1146 +
  1147 +
1057 1148 });
1058 1149
1059 1150 /* Setup activity scope and filter based on the current cookie settings. */
@@ -1076,8 +1167,13 @@ function bp_init_activity() {
1076 1167 /* Setup object scope and filter based on the current cookie settings for the object. */
1077 1168 function bp_init_objects(objects) {
1078 1169 jq(objects).each( function(i) {
1079   - if ( null != jq.cookie('bp-' + objects[i] + '-filter') && jq('li#' + objects[i] + '-order-select select').length )
  1170 + if ( null != jq.cookie('bp-' + objects[i] + '-filter') && jq('li#' + objects[i] + '-order-select select').length ){
1080 1171 jq('li#' + objects[i] + '-order-select select option[value="' + jq.cookie('bp-' + objects[i] + '-filter') + '"]').prop( 'selected', true );
  1172 + }
  1173 + //setup displaymode select position
  1174 + if ( null != jq.cookie('bp-' + objects[i] + '-displaymode') && jq('li#' + objects[i] + '-displaymode-select select').length ){
  1175 + jq('li#' + objects[i] + '-displaymode-select select option[value="' + jq.cookie('bp-' + objects[i] + '-displaymode') + '"]').prop( 'selected', true );
  1176 + }
1081 1177
1082 1178 if ( null != jq.cookie('bp-' + objects[i] + '-scope') && jq('div.' + objects[i]).length ) {
1083 1179 jq('div.item-list-tabs li').each( function() {
@@ -1138,6 +1234,56 @@ function bp_filter_request( object, filter, scope, target, search_terms, page, e
1138 1234 });
1139 1235 }
1140 1236
  1237 +/* Displaymode the current content list or grid (groups/members/group members/member frends) */
  1238 +function bp_displaymode_request( object, displaymode, scope, target, search_terms, page, extras ) {
  1239 + if ( 'activity' == object )
  1240 + return false;
  1241 +
  1242 + if ( jq.query.get('s') && !search_terms )
  1243 + search_terms = jq.query.get('s');
  1244 +
  1245 + if ( null == scope )
  1246 + scope = 'all';
  1247 +
  1248 + /* Save the settings we want to remain persistent to a cookie */
  1249 + jq.cookie( 'bp-' + object + '-scope', scope, {path: '/'} );
  1250 + jq.cookie( 'bp-' + object + '-displaymode', displaymode, {path: '/'} );
  1251 + jq.cookie( 'bp-' + object + '-extras', extras, {path: '/'} );
  1252 +
  1253 + /* Set the correct selected nav and displymode */
  1254 + jq('div.item-list-tabs li').each( function() {
  1255 + jq(this).removeClass('selected');
  1256 + });
  1257 + jq('div.item-list-tabs li#' + object + '-' + scope + ', div.item-list-tabs#object-nav li.current').addClass('selected');
  1258 + jq('div.item-list-tabs li.selected').addClass('loading');
  1259 + jq('div.item-list-tabs select option[value="' + displaymode + '"]').prop( 'selected', true );
  1260 +
  1261 + if ( 'friends' == object )
  1262 + object = 'members';
  1263 +
  1264 + if ( bp_ajax_request )
  1265 + bp_ajax_request.abort();
  1266 +
  1267 + bp_ajax_request = jq.post( ajaxurl, {
  1268 + action: object + '_displaymode',
  1269 + 'cookie': encodeURIComponent(document.cookie),
  1270 + 'object': object,
  1271 + 'displaymode': displaymode,
  1272 + 'search_terms': search_terms,
  1273 + 'scope': scope,
  1274 + 'page': page,
  1275 + 'extras': extras
  1276 + },
  1277 + function(response)
  1278 + {
  1279 + jq(target).fadeOut( 100, function() {
  1280 + jq(this).html(response);
  1281 + jq(this).fadeIn(100);
  1282 + });
  1283 + jq('div.item-list-tabs li.selected').removeClass('loading');
  1284 + });
  1285 +}
  1286 +
1141 1287 /* Activity Loop Requesting */
1142 1288 function bp_activity_request(scope, filter) {
1143 1289 /* Save the type and filter to a session cookie */
BIN  _inc/images/get-pro.jpg
2  activity/post-form.php
@@ -30,7 +30,7 @@
30 30 <textarea style="height: 20px;" name="whats-new" id="whats-new" cols="50" rows="10"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_attr( $_GET['r'] ); ?> <?php endif; ?></textarea>
31 31 </div>
32 32
33   - <div id="whats-new-options" style="height: 0px; overflow: hidden;">
  33 + <div id="whats-new-options" style="height: 0px;">
34 34 <div id="whats-new-submit">
35 35 <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'cc' ); ?>" />
36 36 </div>
185 admin/cheezcap.php
@@ -16,29 +16,31 @@
16 16
17 17 add_action( 'admin_init', 'custom_community_theme_options_init' );
18 18 function custom_community_theme_options_init(){
19   - register_setting( 'custom_community_options', 'custom_community_theme_options', 'custom_community_theme_options_validate' );
  19 + register_setting( 'custom_community_options', 'custom_community_theme_options', 'custom_community_theme_options_validate' );
20 20 }
21 21
22 22 add_action( 'admin_init', 'cc_update_old_version' );
23 23 function cc_update_old_version(){
24   - if(get_option('cc_version') <= 1.8){
25   - $options = wp_load_alloptions();
26   - foreach((array) $options as $key => $value) :
27   - $key = esc_attr($key);
28   - if(substr($key, 0, 4)=='cap_') {
29   - $cap = get_option('custom_community_theme_options');
30   - $cap[$key] = $value;
31   - update_option( 'custom_community_theme_options', $cap );
32   -
33   - delete_option($key);
34   - }
35   - endforeach;
36   - update_option( 'cc_version', 1.9 );
37   - } else if (!get_option('cc_version')){
38   - cap_defaults_init();
39   - update_option( 'cc_version', 1.9 );
40   - }
  24 + if(get_option('cc_version') <= 1.8){
  25 + $options = wp_load_alloptions();
  26 + foreach((array) $options as $kay => $value) :
  27 + $kay = esc_attr($kay);
  28 + if(substr($kay, 0, 4)=='cap_') {
  29 +
  30 + $cap = get_option('custom_community_theme_options');
  31 + $cap[$kay] = $value;
  32 + update_option( 'custom_community_theme_options', $cap );
  33 +
  34 + delete_option($kay);
  35 + }
  36 + endforeach;
  37 + update_option( 'cc_version', 1.9 );
  38 + } else if (!get_option('cc_version')){
  39 + cap_defaults_init();
  40 + update_option( 'cc_version', 1.9 );
  41 + }
41 42 }
  43 +cc_get_pro_version();
42 44
43 45 $cap = new autoconfig();
44 46
@@ -48,77 +50,96 @@ function cc_update_old_version(){
48 50 }
49 51
50 52 function cap_add_admin() {
51   - global $themename, $req_cap_to_edit;
  53 + global $themename, $req_cap_to_edit;
52 54
53   - if ( ! current_user_can ( $req_cap_to_edit ) )
54   - return;
  55 + if ( ! current_user_can ( $req_cap_to_edit ) )
  56 + return;
55 57
56   - if ( isset( $_GET['page'] ) && $_GET['page'] == 'theme_settings' ) {
57   - $options = cap_get_options();
58   - $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
59   - $method = false;
60   - $done = false;
61   - $data = new ImportData();
62   - switch ( $action ) {
63   - case 'Reset':
64   - delete_option('custom_community_theme_options');
65   - cap_defaults_init();
66   - $method = false;
67   - break;
68   - case 'Export':
69   - $method = 'Export';
70   - $done = 'cap_serialize_export';
71   - break;
72   - case 'Import':
73   - $method = 'Import';
74   - if(empty($_FILES['file']['tmp_name']))
75   - return ;
76   -
77   - $data = unserialize( implode ('', file ($_FILES['file']['tmp_name'])));
78   - break;
79   - }
  58 + if ( isset( $_GET['page'] ) && $_GET['page'] == 'theme_settings' ) {
  59 + $options = cap_get_options();
  60 + $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
  61 + $method = false;
  62 + $done = false;
  63 + $data = new ImportData();
  64 + switch ( $action ) {
  65 + case 'Reset':
  66 + delete_option('custom_community_theme_options');
  67 + cap_defaults_init();
  68 + $method = false;
  69 + break;
  70 + case 'Export':
  71 + $method = 'Export';
  72 + $done = 'cap_serialize_export';
  73 + break;
  74 + case 'Import':
  75 + $method = 'Import';
  76 + if(empty($_FILES['file']['tmp_name']))
  77 + return ;
  78 +
  79 + $data = unserialize( implode ('', file ($_FILES['file']['tmp_name'])));
  80 + break;
  81 + }
80 82
81   - if ( $method ) {
82   - foreach ( $options as $group ) {
83   - foreach ( $group->options as $option ) {
84   - call_user_func( array( $option, $method ), $data );
85   - }
86   - }
87   - if ( $done )
88   - call_user_func( $done, $data );
89   - }
90   - }
  83 + if ( $method ) {
  84 + foreach ( $options as $group ) {
  85 + foreach ( $group->options as $option ) {
  86 + call_user_func( array( $option, $method ), $data );
  87 + }
  88 + }
  89 + if ( $done )
  90 + call_user_func( $done, $data );
  91 + }
  92 + }
91 93
92   - $pgName = "$themename Settings";
93   - $hook = add_theme_page( $pgName, $pgName, isset( $req_cap_to_edit ) ? $req_cap_to_edit : 'edit_theme_options', 'theme_settings', 'top_level_settings' );
94   - add_action( "admin_print_scripts-$hook", 'cap_admin_js_libs' );
95   - add_action( "admin_footer-$hook", 'cap_admin_js_footer' );
96   - add_action( "admin_print_styles-$hook", 'cap_admin_css' );
  94 + $pgName = "$themename Settings";
  95 + $hook = add_theme_page( $pgName, $pgName, isset( $req_cap_to_edit ) ? $req_cap_to_edit : 'edit_theme_options', 'theme_settings', 'top_level_settings' );
  96 + add_action( "admin_print_scripts-$hook", 'cap_admin_js_libs' );
  97 + add_action( "admin_footer-$hook", 'cap_admin_js_footer' );
  98 + add_action( "admin_print_styles-$hook", 'cap_admin_css' );
97 99 }
98 100
  101 +/**
  102 + * Create default options for the theme and save into the wp_options table
  103 + */
99 104 function cap_defaults_init(){
100   - $cap_options = cap_get_options();
101   -
102   - $cap_options_default = Array();
103   -
  105 + $cap_options = cap_get_options();
  106 +
  107 + $cap_options_default = Array();
  108 +
104 109 // print_var($cap_options,1);
105 110
106   - foreach( $cap_options as $cap_option ) {
107   - $cap_option_arr = (Array) $cap_option;
108   - foreach ($cap_option_arr['options'] AS $option){
109   - switch(get_class($option)){
110   - case 'BooleanOption':
111   - $cap_options_default[$option->id] = $option->options[$option->std];
112   - break;
113   - case 'DropdownOption':
114   - $cap_options_default[$option->id] = $option->options[0];
115   - break;
116   - default:
117   - $cap_options_default[$option->id] = $option->std;
118   - break;
119   - }
120   - }
121   - }
122   -
123   - update_option( 'custom_community_theme_options', $cap_options_default );
  111 + foreach( $cap_options as $cap_option ) {
  112 + $cap_option_arr = (Array) $cap_option;
  113 + foreach ($cap_option_arr['options'] AS $option){
  114 + switch(get_class($option)){
  115 + case 'DropdownOption':
  116 + $cap_options_default[$option->id] = $option->options[0];
  117 + break;
  118 + case 'BooleanOption':
  119 + default:
  120 + $cap_options_default[$option->id] = $option->std;
  121 + break;
  122 + }
  123 + }
  124 + }
  125 + update_option( 'custom_community_theme_options', $cap_options_default );
  126 +}
  127 +
  128 +/**
  129 + * Check in admin area that we have options in wp_options table.
  130 + * If not - create with default values (almost all are set)
  131 + */
  132 +add_action('admin_print_scripts', 'cc_activation_function');
  133 +function cc_activation_function() {
  134 + global $pagenow;
  135 + //this is hack for inserting default options when theme activated
  136 + if ( is_admin() && $pagenow == 'themes.php' && isset($_GET['activated']) && $_GET['activated'] == 'true') {
  137 + $option = get_option('custom_community_theme_options');
  138 + if(empty($option)){
  139 + cap_defaults_init();
  140 + }
  141 + if(!defined('is_pro')){
  142 + add_action ('admin_notices', 'cc_add_rate_us_notice');
  143 + }
  144 + }
124 145 }
836 admin/config.php
@@ -14,7 +14,7 @@
14 14 function cap_get_options() {
15 15 $pages = get_pages();
16 16 $option = Array();
17   - $option[0] = "All pages";
  17 + $option[0] = __("All pages",'cc');
18 18 $i = 1;
19 19 foreach ($pages as $pagg) {
20 20 $option[$i] = $pagg->post_title;
@@ -26,7 +26,7 @@ function cap_get_options() {
26 26 $categories = get_categories($args);
27 27 $option = Array();
28 28 $option[0] = Array (
29   - 'name' => 'All categories',
  29 + 'name' => __('All categories','cc'),
30 30 'slug' => 'all-categories'
31 31 );
32 32 $i = 1;
@@ -39,399 +39,421 @@ function cap_get_options() {
39 39 $option_categories = $option;
40 40
41 41 return array(
42   - new Group ("General", "general",
  42 + new Group (__("General",'cc'), "general",
43 43 array(
44 44 new DropdownOption(
45   - "Colour scheme",
46   - "Select the colour scheme of your website.",
  45 + __("Colour scheme",'cc'),
  46 + __("Select the colour scheme of your website.",'cc'),
47 47 "style_css",
48   - array( 'white', 'grey', 'dark', 'more colour schemes in the pro version' )),
  48 + apply_filters('cc_get_color_scheme', array( __('white','cc'), __('grey','cc'), __('dark','cc')))),
49 49 new TextOption(
50   - "Website width",
51   - "Just type in the number, either in px or %. Default is 1000. <br>
52   - Tip: If you use the full-width slider, don't make your site bigger than 1006px, or use the normal slider with preview.",
  50 + __("Website width",'cc'),
  51 + __("Just type in the number, either in px or %. Default is 1000. <br>
  52 + Tip: If you use the full-width slider, don't make your site bigger than 1006px, or use the normal slider with preview.",'cc'),
53 53 "website_width",
54 54 "",
55 55 "",
56 56 "start",
57   - "Website width"),
  57 + __("Website width",'cc')),
58 58 new DropdownOption(
59   - "Fluid or static width?",
60   - "Do you want your layout fluid(%) or static(px)? <br>
  59 + __("Fluid or static width?",'cc'),
  60 + __("Do you want your layout fluid(%) or static(px)? <br>
61 61 Notes: when you use the slideshow, better don't use fluid width. <br>
62   - And if you use the slideshow shadow, it only looks nice with a static width between 990 and about 1100px.",
  62 + And if you use the slideshow shadow, it only looks nice with a static width between 990 and about 1100px.",'cc'),
63 63 "website_width_unit",
64 64 array('px', '%'),
65 65 "",
66 66 'end'),
67 67 new BooleanOption(
68   - "Use standard Wordpress background settings",
69   - "Enable this option, if you like to use the standard wordpress settings page.",
  68 + __("Use standard Wordpress background settings",'cc'),
  69 + __("Enable this option, if you like to use the standard wordpress settings page.",'cc'),
70 70 "add_custom_background",
71 71 false,
72 72 'start',
73   - 'Background'),
  73 + __('Background','cc')),
74 74 new ColorOption(
75   - "Background colour",
76   - "Change your background colour",
  75 + __("Background colour",'cc'),
  76 + __("Change your background colour",'cc'),
77 77 "bg_body_color",
78 78 "",
79 79 '',
80 80 ''),
81 81 new FileOption(
82   - "Background image",
83   - "Insert your own background image. Upload or insert url.",
  82 + __("Background image",'cc'),
  83 + __("Insert your own background image. Upload or insert url.",'cc'),
84 84 "bg_body_img",
85 85 '',
86 86 false,
87 87 ''),
88 88 new BooleanOption(
89   - "Fixed background image",
90   - "Fix the position of your body background image",
  89 + __("Fixed background image",'cc'),
  90 + __("Fix the position of your body background image",'cc'),
91 91 "bg_body_img_fixed",
92 92 false,
93 93 false,
94 94 ''),
95 95 new DropdownOption(
96   - "Background position",
97   - "Position of the background image: center, left, right",
  96 + __("Background position",'cc'),
  97 + __("Position of the background image: center, left, right",'cc'),
98 98 "bg_body_img_pos",
99   - array('center', 'left', 'right'),
  99 + array(__('center','cc'), __('left','cc'), __('right','cc')),
100 100 '',
101 101 false,
102 102 ''),
103 103 new DropdownOption(
104   - "Background repeat",
105   - "Repeat background image: x=horizontally, y=vertically",
  104 + __("Background repeat",'cc'),
  105 + __("Repeat background image: x=horizontally, y=vertically",'cc'),
106 106 "bg_body_img_repeat",
107   - array('no repeat', 'x', 'y', 'x+y'),
  107 + array(__('no repeat','cc'), 'x', 'y', 'x+y'),
108 108 '',
109 109 'end',
110 110 ''),
111 111 new ColorOption(
112   - "Container colour",
113   - "Change the background colour of the content part,<br>
114   - write transparent for no color",
  112 + __("Container colour",'cc'),
  113 + __("Change the background colour of the content part,<br>
  114 + write transparent for no color",'cc'),
115 115 "bg_container_color",
116 116 "",
117 117 "start",
118   - "Container"),
  118 + __("Container",'cc')),
119 119 new DropdownOption(
120   - "Show / hide the vertical lines",
121   - "The vertical lines that divide your container are default, <br>
122   - you can disable them if you like.",
  120 + __("Show / hide the vertical lines",'cc'),
  121 + __("The vertical lines that divide your container are default, <br>
  122 + you can disable them if you like.",'cc'),
123 123 "bg_container_nolines",
124   - array('show', 'hide'),
  124 + array(__('show','cc'), __('hide','cc')),
125 125 "",
126 126 false),
127 127 new ColorOption(
128   - "Vertical lines colour",
129   - "Change the colour of the vertical lines. <br>
130   - Tip: Best is to have them in the colour of the background and other lines. ",
  128 + __("Vertical lines colour",'cc'),
  129 + __("Change the colour of the vertical lines. <br>
  130 + Tip: Best is to have them in the colour of the background and other lines. ",'cc'),
131 131 "v_line_color",
132 132 "",
133 133 '',
134 134 ''),
135 135 new FileOption(
136   - "Container background image",
137   - "Change background image for the container (currently the vertical lines <br>
138   - that separate the sidebars). Upload or insert url.",
  136 + __("Container background image",'cc'),
  137 + __("Change background image for the container (currently the vertical lines <br>
  138 + that separate the sidebars). Upload or insert url.",'cc'),
139 139 "bg_container_img",
140 140 "",
141 141 false),
142 142 new DropdownOption(
143   - "Container background repeat",
144   - "Repeat background image: x=horizontally, y=vertically",
  143 + __("Container background repeat",'cc'),
  144 + __("Repeat background image: x=horizontally, y=vertically",'cc'),
145 145 "bg_container_img_repeat",
146   - array('no repeat', 'x', 'y', 'x+y'),
  146 + array(__('no repeat','cc'), 'x', 'y', 'x+y'),
147 147 "",
148 148 false),
149 149 new DropdownOption(
150   - "Container corner radius",
151   - "Do you want your container corners to be rounded?",
  150 + __("Container corner radius",'cc'),
  151 + __("Do you want your container corners to be rounded?",'cc'),
152 152 "container_corner_radius",
153   - array('rounded', 'not rounded'),
154   - "rounded",
  153 + array(__('rounded','cc'), __('not rounded','cc')),
  154 + __("rounded",'cc'),
155 155 'end'),
156 156 new DropdownOption(
157   - "Sidebar default position",
158   - "Where do you like to have your sidebars? Define your default layout.",
  157 + __("Sidebar default position",'cc'),
  158 + __("Where do you like to have your sidebars? Define your default layout.",'cc'),
159 159 "sidebar_position",
160   - array('right', 'left and right', 'left', 'full-width'),
161   - 'right'),
  160 + array(__('right','cc'), __('left and right','cc'), __('left','cc'), __('full-width','cc')),
  161 + __('right','cc')),
162 162 new DropdownOption(
163   - "Title font style",
164   - "Change the title font style (h1 and h2)",
  163 + __("Title font style",'cc'),
  164 + __("Change the title font style (h1 and h2)",'cc'),
165 165 "title_font_style",
166 166 array('Arial, sans-serif', 'Helvetica, Arial, sans-serif', 'Century Gothic, Avant Garde, Arial, sans-serif', 'Arial Black, Arial, sans-serif', 'Impact, Arial, sans-serif', 'Times New Roman, Times', 'Garamond, Times New Roman, Times'),
167 167 "Arial, sans-serif",
168 168 "start",
169   - "Titles"),
  169 + __("Titles",'cc')),
170 170 new TextOption(
171   - "Title size",
172   - "Change the title font size (h1 and h2), default is 28px, just enter a number",
  171 + __("Title size",'cc'),
  172 + __("Change the title font size (h1 and h2), default is 28px, just enter a number",'cc'),
173 173 "title_size",
174 174 "",
175 175 "",
176 176 false),
177 177 new DropdownOption(
178   - "Titles font weight",
179   - "Do you want your titles bold or normal?",
  178 + __("Titles font weight",'cc'),
  179 + __("Do you want your titles bold or normal?",'cc'),
180 180 "title_weight",
181   - array('bold', 'normal'),
182   - "bold",
  181 + array(__('bold','cc'), __('normal','cc')),
  182 + __("bold",'cc'),
183 183 false),
184 184 new ColorOption(
185   - "Title colour",
186   - "Change title colour",
  185 + __("Title colour",'cc'),
  186 + __("Change title colour",'cc'),
187 187 "title_color",
188 188 "","end"),
189 189 new DropdownOption(
190   - "Subtitle font style",
191   - "Change the subtitle font style (h3-h6)",
  190 + __("Subtitle font style",'cc'),
  191 + __("Change the subtitle font style (h3-h6)",'cc'),
192 192 "subtitle_font_style",
193 193 array('Arial, sans-serif', 'Helvetica, Arial, sans-serif', 'Century Gothic, Avant Garde, Arial, sans-serif', 'Arial Black, Arial, sans-serif', 'Impact, Arial, sans-serif', 'Times New Roman, Times', 'Garamond, Times New Roman, Times'),
194 194 "Arial, sans-serif",
195 195 "start",
196   - "Subtitles"),
  196 + __("Subtitles",'cc')),
197 197 new DropdownOption(
198   - "Subtitles font weight",
199   - "Do you want your subtitles bold or normal?",
  198 + __("Subtitles font weight",'cc'),
  199 + __("Do you want your subtitles bold or normal?",'cc'),
200 200 "subtitle_weight",
201   - array('bold', 'normal'),
202   - "bold",
  201 + array(__('bold','cc'), __('normal','cc')),
  202 + __("bold",'cc'),
203 203 false),
204 204 new ColorOption(
205   - "Subtitle colour",
206   - "Change subtitle colour",
  205 + __("Subtitle colour",'cc'),
  206 + __("Change subtitle colour",'cc'),
207 207 "subtitle_color",
208 208 "","end"),
209 209 new DropdownOption(
210   - "Show excerpts",
211   - "Just for category and archive views: use excerpts or show full content of your posts",
  210 + __("Show excerpts",'cc'),
  211 + __("Just for category and archive views: use excerpts or show full content of your posts",'cc'),
212 212 "excerpt_on",
213   - array('content', 'excerpt'),
214   - "content",
  213 + array(__('content','cc'), __('excerpt','cc')),
  214 + __("content",'cc'),
215 215 "start",
216   - "Excerpts"),
  216 + __("Excerpts",'cc')),
217 217 new TextOption(
218   - "Excerpt length",
219   - "Change the excerpt length, default is 30 words",
  218 + __("Excerpt length",'cc'),
  219 + __("Change the excerpt length, default is 30 words",'cc'),
220 220 "excerpt_length",
221 221 "","","end"),
222 222 new DropdownOption(
223   - "Font style",
224   - "Change the font style",
  223 + __("Font style",'cc'),
  224 + __("Change the font style",'cc'),
225 225 "font_style",
226 226 array('Arial, sans-serif', 'Helvetica, Arial, sans-serif', 'Century Gothic, Avant Garde, Arial, sans-serif', 'Times New Roman, Times', 'Garamond, Times New Roman, Times'),
227 227 "Arial, sans-serif",
228 228 "start",
229   - "Fonts"),
  229 + __("Fonts",'cc')),
230 230 new TextOption(
231   - "Font size",
232   - "Change the standard font size, default is 13px, just enter a number",
  231 + __("Font size",'cc'),
  232 + __("Change the standard font size, default is 13px, just enter a number",'cc'),
233 233 "font_size",
234 234 "","",
235 235 false),
236 236 new ColorOption(
237   - "Font colour",
238   - "Change font colour",
  237 + __("Font colour",'cc'),
  238 + __("Change font colour",'cc'),
239 239 "font_color",
240 240 "",
241 241 'end'),
242 242 new ColorOption(
243   - "Link colour",
244   - "Change link colour. <br>
  243 + __("Link colour",'cc'),
  244 + __("Change link colour. <br>
245 245 Notes: You just need to change the link colour to have a nice effect on all link and button colours. <br>
246 246 The hover colour will automatically be your font colour or the default font colour. <br>
247   - Optional, you can also choose a hover colour, background colour, background hover colour or if and when to underline. ",
  247 + Optional, you can also choose a hover colour, background colour, background hover colour or if and when to underline. ",'cc'),
248 248 "link_color",
249 249 "",
250 250 "start",
251   - "Links"),
  251 + __("Links",'cc')),
252 252 new ColorOption(
253   - "Link hover colour",
254   - "Change link colour for mouse moves over.",
  253 + __("Link hover colour",'cc'),
  254 + __("Change link colour for mouse moves over.",'cc'),
255 255 "link_color_hover",
256 256 "",
257 257 false),
258 258 new DropdownOption(
259   - "BuddyPress subnavigation adapting",
260   - "Use link hover colour for the BuddyPress subnav also? <br>
  259 + __("BuddyPress subnavigation adapting",'cc'),
  260 + __("Use link hover colour for the BuddyPress subnav also? <br>
261 261 By default the subnav links adapts the link colour and link hover colour. <br>
262 262 Sometimes the link hover colour can look ugly here and you don't want the subnav to adapt. <br>
263   - Then you can change the colour adapting here easily. ",
  263 + Then you can change the colour adapting here easily. ",'cc'),
264 264 "link_color_subnav_adapt",
265   - array('just the link colour', 'link colour and hover colour'),
266   - "link colour and hover colour",
  265 + array(__('just the link colour','cc'), __('link colour and hover colour','cc')),
  266 + __("link colour and hover colour",'cc'),
267 267 false),
268 268 new DropdownOption(
269   - "Link underline",
270   - "Choose if (and when) to underline links.",
  269 + __("Link underline",'cc'),
  270 + __("Choose if (and when) to underline links.",'cc'),
271 271 "link_underline",
272   - array('never', 'always', 'just for mouse over', 'just when normal'),
273   - "just for mouse over",
  272 + array(__('never','cc'), __('always','cc'), __('just for mouse over','cc'), __('just when normal','cc')),
  273 + __("just for mouse over",'cc'),
274 274 false),
275 275 new ColorOption(
276   - "Link background colour",
277   - "Change link background colour.",
  276 + __("Link background colour",'cc'),
  277 + __("Change link background colour.",'cc'),
278 278 "link_bg_color",
279 279 "",
280 280 false),
281 281 new ColorOption(
282   - "Link background hover colour",
283   - "Change link background colour for mouse moves over. <br>
284   - Watch out you have enough contrast to the (hover) link colour and also the font colour!",
  282 + __("Link background hover colour",'cc'),
  283 + __("Change link background colour for mouse moves over. <br>
  284 + Watch out you have enough contrast to the (hover) link colour and also the font colour!",'cc'),
285 285 "link_bg_color_hover",
286 286 "",
287 287 false),
288 288 new DropdownOption(
289   - "Titles adapting",
290   - "Do you like to use the link background colours or underline effetcs for the titles (h1-h6) also? <br>
291   - By default they adapt just the link colour and link hover colour.",
  289 + __("Titles adapting",'cc'),
  290 + __("Do you like to use the link background colours or underline effetcs for the titles (h1-h6) also? <br>
  291 + By default they adapt just the link colour and link hover colour.",'cc'),
292 292 "link_styling_title_adapt",
293   - array('just the hover effect', 'link colour and hover colour', '...the underline effects too', 'the background colours too', 'adapt all link styles' ),
  293 + array(__('just the hover effect','cc'), __('link colour and hover colour','cc'), __('...the underline effects too','cc'), __('the background colours too','cc'), __('adapt all link styles','cc') ),
294 294 "",
295 295 'end'),
296 296 new FileOption(
297   - "Favicon image",
298   - "Insert your own favicon image. Upload or insert url.",
  297 + __("Favicon image",'cc'),
  298 + __("Insert your own favicon image. Upload or insert url.",'cc'),
299 299 "favicon"),
300 300 // Default homepage
301 301 new DropdownOption(
302   - "Show / hide avatars",
303   - "Show or hide the avatars in the post listing. <br>
  302 + __("Show / hide avatars",'cc'),
  303 + __("Show or hide the avatars in the post listing. <br>
304 304 This option is for the standard WordPress Homepage showing your latest articles. <br>
305   - To select a page as your homepage, go to Settings -> Reading.",
  305 + To select a page as your homepage, go to Settings -> Reading.",'cc'),
306 306 "default_homepage_hide_avatar",
307   - array('show', 'hide'),
308   - "show",
  307 + array(__('show','cc'), __('hide','cc')),
  308 + __("show",'cc'),
309 309 "start",
310   - "Default homepage"),
  310 + __("Default homepage",'cc')),
311 311 new DropdownOption(
312   - "Last 3 Posts on home",
313   - "Display last 3 posts. <br> ",
  312 + __("Last 3 Posts on home",'cc'),
  313 + __("Display last 3 posts. <br> ",'cc'),
314 314 "default_homepage_last_posts",
315   - array('show', 'hide'),
316   - "show",
  315 + array(__('show','cc'), __('hide','cc')),
  316 + __("show",'cc'),
317 317 false),
318 318 new DropdownOption(
319   - "Post listing style",
320   - "Select a style how to display the latest posts. <br>
321   - You can also list your posts in magazine style, showing the featured images, check out our our <a href='http://themekraft.com/faq/list-your-latest-posts/'>FAQ here</a>.",
  319 + __("Post listing style",'cc'),
  320 + __("Select a style how to display the latest posts. <br>
  321 + You can also list your posts in magazine style, showing the featured images, check out our our <a href='http://themekraft.com/faq/list-your-latest-posts/'>FAQ here</a>.",'cc'),
322 322 "default_homepage_style",
323   - array('bubbles', 'default'),
324   - "bubbles",
  323 + array(__('bubbles','cc'), __('default','cc')),
  324 + __("bubbles",'cc'),
325 325 false),
326 326 new DropdownOption(
327   - "Show / hide date, category and author",
328   - "Show or hide the date, category and author in the post listing.",
  327 + __("Show / hide date, category and author",'cc'),
  328 + __("Show or hide the date, category and author in the post listing.",'cc'),
329 329 "default_homepage_hide_date",
330   - array('show', 'hide'),
331   - "show",
  330 + array(__('show','cc'), __('hide','cc')),
  331 + __("show",'cc'),
  332 + 'end'),
  333 + // Posts lists (categories, tags, archives)
  334 + new DropdownOption(
  335 + __("Show / hide avatars",'cc'),
  336 + __("Show or hide the avatars in the post listing. <br>
  337 + This option is for categories, tags and archives pages, showing your articles.",'cc'),
  338 + "posts_lists_hide_avatar",
  339 + array(__('show','cc'), __('hide','cc')),
  340 + __("show",'cc'),
  341 + "start",
  342 + __("Posts archive pages (categories, tags, dates)",'cc')),
  343 + new DropdownOption(
  344 + __("Post listing style",'cc'),
  345 + __("Select a style how to display the latest posts. <br>
  346 + You can also list your posts in magazine style, showing the featured images, check out our our <a href='http://themekraft.com/faq/list-your-latest-posts/'>FAQ here</a>.",'cc'),
  347 + "posts_lists_style",
  348 + array(__('bubbles','cc'), __('default','cc')),
  349 + __("bubbles",'cc'),
  350 + false),
  351 + new DropdownOption(
  352 + __("Show / hide date, category and author",'cc'),
  353 + __("Show or hide the date, category and author in the post listing.",'cc'),
  354 + "posts_lists_hide_date",
  355 + array(__('show','cc'), __('hide','cc')),
  356 + __("show",'cc'),
332 357 'end'),
333 358 // Login
334 359 new FileOption(
335   - "Login page logo",
336   - "Insert your own image for the login page. Upload or insert url.",
  360 + __("Login page logo",'cc'),
  361 + __("Insert your own image for the login page. Upload or insert url.",'cc'),
337 362 "bg_loginpage_img",
338 363 "",
339 364 "start",
340   - "Login"),
  365 + __("Login",'cc')),
341 366 new TextOption(
342   - "Login logo height",
343   - "Define the login logo height, the width should be 326px max",
  367 + __("Login logo height",'cc'),
  368 + __("Define the login logo height, the width should be 326px max",'cc'),
344 369 "login_logo_height",
345 370 "",
346 371 "",
347 372 false),
348   - new FileOption(
349   - "Login page background image",
350   - "Insert your own image for the login page background. Upload or insert url.",
351   - "bg_loginpage_body_img",
352   - "","",false),
353 373 new ColorOption(
354   - "Login page background colour",
355   - "Change login page background colour",
  374 + __("Login page background colour",'cc'),
  375 + __("Change login page background colour",'cc'),
356 376 "bg_loginpage_body_color",
357 377 "",
358 378 false),
359 379 new ColorOption(
360   - "Login page backtoblog fade colour 1",
361   - "Change login page backtoblog colour fade 1",
  380 + __("Login page backtoblog fade colour 1",'cc'),
  381 + __("Change login page backtoblog colour fade 1",'cc'),
362 382 "bg_loginpage_backtoblog_fade_1",
363 383 "",
364 384 false),
  385 +
365 386 new ColorOption(
366   - "Login page backtoblog fade colour 2",
367   - "Change login page backtoblog colour fade 2",
  387 + __("Login page backtoblog fade colour 2",'cc'),
  388 + __("Change login page backtoblog colour fade 2",'cc'),
368 389 "bg_loginpage_backtoblog_fade_2",
369 390 "",
370 391 "end"),
371 392 )
  393 +
372 394 ),
373   - new Group ("Header", "header",
  395 + new Group (__("Header",'cc'), "header",
374 396 array(
375 397 new BooleanOption(
376   - "Use standard Wordpress custom image header settings",
377   - "Enable this option, if you like to use the standard wordpress settings Page.",
  398 + __("Use standard Wordpress custom image header settings",'cc'),
  399 + __("Enable this option, if you like to use the standard wordpress settings Page.",'cc'),
378 400 "add_custom_image_header",
379 401 false),
380 402 new DropdownOption(
381   - "Show header text",
382   - "Show header text or not?",
  403 + __("Show header text",'cc'),
  404 + __("Show header text or not?",'cc'),
383 405 "header_text",
384   - array('off', 'on'),
385   - 'off'),
  406 + array(__('off','cc'), __('on','cc')),
  407 + __('off','cc')),
386 408 new ColorOption(
387   - "Header text colour",
388   - "Change header font colour",
  409 + __("Header text colour",'cc'),
  410 + __("Change header font colour",'cc'),
389 411 "header_text_color",
390 412 ""),
391 413 new FileOption(
392   - "Logo",
393   - "Insert your own Logo. Upload or insert url.",
  414 + __("Logo",'cc'),
  415 + __("Insert your own Logo. Upload or insert url.",'cc'),
394 416 "logo"),
395 417 new TextOption(
396   - "Header height",
397   - "Your header height in px (and navigation position (y) at the same time), just enter a number. <br>
  418 + __("Header height",'cc'),
  419 + __("Your header height in px (and navigation position (y) at the same time), just enter a number. <br>
398 420 This is not your header image height, you can specify your header image separately in the fields below. <br>
399   - Try 25px or 63px less than your header-image-height to fit perfectly...",
  421 + Try 25px or 63px less than your header-image-height to fit perfectly...",'cc'),
400 422 "header_height",
401 423 ""),
402 424 new DropdownOption(
403   - "Header width",
404   - "Do you like the header in full width or as wide as your site?",
  425 + __("Header width",'cc'),
  426 + __("Do you like the header in full width or as wide as your site?",'cc'),
405 427 "header_width",
406   - array('default', 'full-width'),
407   - 'default'),
  428 + array(__('default','cc'), __('full-width','cc')),
  429 + __('default','cc')),
408 430 new FileOption(
409   - "Header image",
410   - "Insert your own header image. Upload or insert url. <br>
  431 + __("Header image",'cc'),
  432 + __("Insert your own header image. Upload or insert url. <br>
411 433 Default width is 1000px, the height (and full width option) can be adjusted above. <br>
412   - For no image write 'none'.",
  434 + For no image write 'none'.",'cc'),
413 435 "header_img",
414 436 '',
415 437 'start',
416   - 'Header image'),
  438 + __('Header image','cc')),
417 439 new DropdownOption(
418   - "Header image repeat",
419   - "Repeat header image: x=horizontally, y=vertically",
  440 + __("Header image repeat",'cc'),
  441 + __("Repeat header image: x=horizontally, y=vertically",'cc'),
420 442 "header_img_repeat",
421   - array('no repeat', 'x', 'y', 'x+y'),
422   - "no repeat",
  443 + array(__('no repeat','cc'), 'x', 'y', 'x+y'),
  444 + __("no repeat",'cc'),
423 445 false
424 446 ),
425 447 new DropdownOption(
426   - "Header image x-position",
427   - "If header image is smaller, you can choose to align left, center or right",
  448 + __("Header image x-position",'cc'),
  449 + __("If header image is smaller, you can choose to align left, center or right",'cc'),
428 450 "header_img_x",
429   - array('left', 'center', 'right'),
430   - "left",
  451 + array(__('left','cc'), __('center','cc'), __('right','cc')),
  452 + __("left",'cc'),
431 453 false),
432 454 new TextOption(
433   - "Header image y-position",
434   - "Distance from header image to top (in px), just enter a number",
  455 + __("Header image y-position",'cc'),
  456 + __("Distance from header image to top (in px), just enter a number",'cc'),
435 457 "header_img_y",
436 458 "",
437 459 "",
@@ -439,435 +461,449 @@ function cap_get_options() {
439