@@ -715,8 +715,9 @@ discard block |
||
| 715 | 715 | |
| 716 | 716 | if (isset($post->post_default_category) && $post->post_default_category == $cat_id) {
|
| 717 | 717 | if ($term_icon_url = geodir_get_tax_meta($cat_id, 'ct_cat_icon', false, $post_type)) {
|
| 718 | - if (isset($term_icon_url['src']) && $term_icon_url['src'] != '') |
|
| 719 | - $term_icon = $term_icon_url['src']; |
|
| 718 | + if (isset($term_icon_url['src']) && $term_icon_url['src'] != '') { |
|
| 719 | + $term_icon = $term_icon_url['src']; |
|
| 720 | + } |
|
| 720 | 721 | break; |
| 721 | 722 | } |
| 722 | 723 | } |
@@ -1265,8 +1266,9 @@ discard block |
||
| 1265 | 1266 | echo '<span class="geodir-category">' . $taxonomies[$post_taxonomy] . '</span>'; |
| 1266 | 1267 | } |
| 1267 | 1268 | |
| 1268 | - if (isset($taxonomies[$post_type . '_tags'])) |
|
| 1269 | - echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>'; |
|
| 1269 | + if (isset($taxonomies[$post_type . '_tags'])) { |
|
| 1270 | + echo '<span class="geodir-tags">' . $taxonomies[$post_type . '_tags'] . '</span>'; |
|
| 1271 | + } |
|
| 1270 | 1272 | |
| 1271 | 1273 | ?> |
| 1272 | 1274 | </p><?php |
@@ -1634,23 +1636,21 @@ discard block |
||
| 1634 | 1636 | if(geodir_is_page('pt')){
|
| 1635 | 1637 | $gd_page = 'pt'; |
| 1636 | 1638 | $title = (get_option('geodir_page_title_pt')) ? get_option('geodir_page_title_pt') : $title;
|
| 1637 | - } |
|
| 1638 | - elseif(geodir_is_page('listing')){
|
|
| 1639 | + } elseif(geodir_is_page('listing')){
|
|
| 1639 | 1640 | $gd_page = 'listing'; |
| 1640 | 1641 | global $wp_query; |
| 1641 | 1642 | $current_term = $wp_query->get_queried_object(); |
| 1642 | 1643 | if (strpos($current_term->taxonomy,'_tags') !== false) {
|
| 1643 | 1644 | $title = (get_option('geodir_page_title_tag-listing')) ? get_option('geodir_page_title_tag-listing') : $title;
|
| 1644 | - }else{
|
|
| 1645 | + } else{
|
|
| 1645 | 1646 | $title = (get_option('geodir_page_title_cat-listing')) ? get_option('geodir_page_title_cat-listing') : $title;
|
| 1646 | 1647 | } |
| 1647 | 1648 | |
| 1648 | - } |
|
| 1649 | - elseif(geodir_is_page('author')){
|
|
| 1649 | + } elseif(geodir_is_page('author')){
|
|
| 1650 | 1650 | $gd_page = 'author'; |
| 1651 | 1651 | if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
|
| 1652 | 1652 | $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
|
| 1653 | - }else{
|
|
| 1653 | + } else{
|
|
| 1654 | 1654 | $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
|
| 1655 | 1655 | } |
| 1656 | 1656 | |
@@ -2074,8 +2074,9 @@ discard block |
||
| 2074 | 2074 | */ |
| 2075 | 2075 | function geodir_action_add_listing_page_title() |
| 2076 | 2076 | {
|
| 2077 | - if (isset($_REQUEST['listing_type']) && $_REQUEST['listing_type'] != '') |
|
| 2078 | - $listing_type = sanitize_text_field($_REQUEST['listing_type']); |
|
| 2077 | + if (isset($_REQUEST['listing_type']) && $_REQUEST['listing_type'] != '') { |
|
| 2078 | + $listing_type = sanitize_text_field($_REQUEST['listing_type']); |
|
| 2079 | + } |
|
| 2079 | 2080 | /** This action is documented in geodirectory_template_actions.php */ |
| 2080 | 2081 | $class = apply_filters('geodir_page_title_class', 'entry-title fn');
|
| 2081 | 2082 | /** This action is documented in geodirectory_template_actions.php */ |
@@ -2087,7 +2088,7 @@ discard block |
||
| 2087 | 2088 | $gd_page = 'add-listing'; |
| 2088 | 2089 | if(isset($_REQUEST['pid']) && $_REQUEST['pid'] != ''){
|
| 2089 | 2090 | $title = (get_option('geodir_page_title_edit-listing')) ? get_option('geodir_page_title_edit-listing') : $title;
|
| 2090 | - }elseif(isset($listing_type)){
|
|
| 2091 | + } elseif(isset($listing_type)){
|
|
| 2091 | 2092 | $title = (get_option('geodir_page_title_add-listing')) ? get_option('geodir_page_title_add-listing') : $title;
|
| 2092 | 2093 | } |
| 2093 | 2094 | |
@@ -2406,8 +2407,9 @@ discard block |
||
| 2406 | 2407 | $totImg = 0; |
| 2407 | 2408 | if (isset($_REQUEST['backandedit']) && empty($_REQUEST['pid'])) {
|
| 2408 | 2409 | $post = (object)$gd_session->get('listing');
|
| 2409 | - if (isset($post->post_images)) |
|
| 2410 | - $curImages = trim($post->post_images, ","); |
|
| 2410 | + if (isset($post->post_images)) { |
|
| 2411 | + $curImages = trim($post->post_images, ","); |
|
| 2412 | + } |
|
| 2411 | 2413 | |
| 2412 | 2414 | |
| 2413 | 2415 | if ($curImages != '') {
|
@@ -2435,10 +2437,13 @@ discard block |
||
| 2435 | 2437 | $totImg = count((array)$thumb_img_arr); |
| 2436 | 2438 | } |
| 2437 | 2439 | |
| 2438 | - if ($curImages != '') |
|
| 2439 | - $svalue = $curImages; // this will be initial value of the above form field. Image urls. |
|
| 2440 | - else |
|
| 2441 | - $svalue = ''; |
|
| 2440 | + if ($curImages != '') { |
|
| 2441 | + $svalue = $curImages; |
|
| 2442 | + } |
|
| 2443 | + // this will be initial value of the above form field. Image urls. |
|
| 2444 | + else { |
|
| 2445 | + $svalue = ''; |
|
| 2446 | + } |
|
| 2442 | 2447 | |
| 2443 | 2448 | $image_limit = isset($package_info->image_limit) ? $package_info->image_limit : '0'; |
| 2444 | 2449 | $show_image_input_box = ($image_limit != '0'); |
@@ -2650,8 +2655,9 @@ discard block |
||
| 2650 | 2655 | </script><?php |
| 2651 | 2656 | |
| 2652 | 2657 | global $errors; |
| 2653 | - if (isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'claim') |
|
| 2654 | - $errors->add('claim_login', LOGIN_CLAIM);
|
|
| 2658 | + if (isset($_REQUEST['msg']) && $_REQUEST['msg'] == 'claim') { |
|
| 2659 | + $errors->add('claim_login', LOGIN_CLAIM); |
|
| 2660 | + } |
|
| 2655 | 2661 | |
| 2656 | 2662 | if (!empty($errors)) {
|
| 2657 | 2663 | foreach ($errors as $errorsObj) {
|
@@ -2758,8 +2764,9 @@ discard block |
||
| 2758 | 2764 | |
| 2759 | 2765 | if (!empty($term)) {
|
| 2760 | 2766 | $current_term = get_term_by('slug', $term, $taxonomy[0]);
|
| 2761 | - if (!empty($current_term)) |
|
| 2762 | - $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'";
|
|
| 2767 | + if (!empty($current_term)) { |
|
| 2768 | + $list_title .= __(' in', 'geodirectory') . " '" . geodir_ucwords($current_term->name) . "'"; |
|
| 2769 | + } |
|
| 2763 | 2770 | } |
| 2764 | 2771 | |
| 2765 | 2772 | |
@@ -2777,7 +2784,7 @@ discard block |
||
| 2777 | 2784 | $gd_page = 'author'; |
| 2778 | 2785 | if(isset($_REQUEST['list']) && $_REQUEST['list']=='favourite'){
|
| 2779 | 2786 | $title = (get_option('geodir_page_title_favorite')) ? get_option('geodir_page_title_favorite') : $title;
|
| 2780 | - }else{
|
|
| 2787 | + } else{
|
|
| 2781 | 2788 | $title = (get_option('geodir_page_title_author')) ? get_option('geodir_page_title_author') : $title;
|
| 2782 | 2789 | } |
| 2783 | 2790 | |
@@ -203,8 +203,9 @@ discard block |
||
| 203 | 203 | ############################################################# |
| 204 | 204 | function manage_category_custom_fields($deprecated, $column_name, $term_id) |
| 205 | 205 | { |
| 206 | - if ($column_name == 'cat_ID_num') |
|
| 207 | - echo $term_id; |
|
| 206 | + if ($column_name == 'cat_ID_num') { |
|
| 207 | + echo $term_id; |
|
| 208 | + } |
|
| 208 | 209 | |
| 209 | 210 | if ($column_name == 'cat_icon') { |
| 210 | 211 | $term_icon_url = geodir_get_tax_meta($term_id, 'ct_cat_icon'); |
@@ -240,8 +241,9 @@ discard block |
||
| 240 | 241 | |
| 241 | 242 | if ($column_name == 'cat_default_img') { |
| 242 | 243 | $cat_default_img = geodir_get_tax_meta($term_id, 'ct_cat_default_img'); |
| 243 | - if ($cat_default_img != '') |
|
| 244 | - echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>'; |
|
| 244 | + if ($cat_default_img != '') { |
|
| 245 | + echo '<img src="' . $cat_default_img['src'] . '" style="max-height:60px;max-width:60px;"/>'; |
|
| 246 | + } |
|
| 245 | 247 | |
| 246 | 248 | } |
| 247 | 249 | } |
@@ -249,11 +251,12 @@ discard block |
||
| 249 | 251 | function geodir_get_default_catimage($term_id, $post_type = 'gd_place') |
| 250 | 252 | { |
| 251 | 253 | |
| 252 | - if ($cat_default_img = geodir_get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) |
|
| 253 | - return $cat_default_img; |
|
| 254 | - else |
|
| 255 | - return false; |
|
| 256 | -} |
|
| 254 | + if ($cat_default_img = geodir_get_tax_meta($term_id, 'ct_cat_default_img', '', $post_type)) { |
|
| 255 | + return $cat_default_img; |
|
| 256 | + } else { |
|
| 257 | + return false; |
|
| 258 | + } |
|
| 259 | + } |
|
| 257 | 260 | |
| 258 | 261 | //Clear custom fields |
| 259 | 262 | add_action('in_admin_footer', 'geodir_tax_meta_clear_custom_field'); |