Skip to content

Commit

Permalink
Merge pull request #1 from AyeCode/master
Browse files Browse the repository at this point in the history
pull
  • Loading branch information
kprajapatii committed Nov 4, 2019
2 parents 170f5d2 + 2649e7e commit 271f1dc
Show file tree
Hide file tree
Showing 27 changed files with 6,368 additions and 1,196 deletions.
Binary file modified .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion assets/js/geodirectory.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion assets/js/map.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
* Map widget/shortcode doesn't show filtered listings on non GD pages - FIXED
* Post badge add support for post modified date - ADDED
* ffmp theme shows incorrect titles on GD pages - FIXED
* Ninja contact form not sends email to listing owner - FIXED
* Ninja contact form sometimes not finding the post id and email fails - FIXED
* Better integration with Fusion builder, all items now also fusion items - ADDED

= 2.0.0.67 =
* Fail to save feature image for new listing when post revision is enabled - FIXED
Expand Down
6 changes: 3 additions & 3 deletions geodirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
* Plugin Name: GeoDirectory
* Plugin URI: https://wpgeodirectory.com/
* Description: GeoDirectory plugin for WordPress.
* Version: 2.0.0.67
* Version: 2.0.0.68
* Author: AyeCode Ltd
* Author URI: https://wpgeodirectory.com
* Text Domain: geodirectory
* Domain Path: /languages
* Requires at least: 4.5
* Tested up to: 5.2
* Tested up to: 5.3
*/


Expand All @@ -35,7 +35,7 @@ final class GeoDirectory {
*
* @var string
*/
public $version = '2.0.0.67';
public $version = '2.0.0.68';

/**
* GeoDirectory instance.
Expand Down
5 changes: 3 additions & 2 deletions includes/admin/settings/class-geodir-settings-cpt-cf.php
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,8 @@ private static function sanatize_custom_field($input){
$field->field_type = isset( $input['field_type'] ) ? sanitize_text_field( $input['field_type'] ) : null;
$field->field_type_key = isset( $input['field_type_key'] ) ? sanitize_text_field( $input['field_type_key'] ) : $field->field_type;
$field->htmlvar_name = isset( $input['htmlvar_name'] ) ? str_replace(array('-',' ','"',"'"), array('_','','',''), sanitize_title_with_dashes( $input['htmlvar_name'] ) ) : null;
$field->frontend_desc = isset( $input['frontend_desc'] ) ? stripslashes( wp_kses_post( $input['frontend_desc'] ) ) : '';
$field->frontend_desc = isset( $input['frontend_desc'] ) ? stripslashes( wp_kses_post( esc_attr( $input['frontend_desc'] ) ) ) : '';

$field->clabels = isset( $input['clabels'] ) ? sanitize_text_field( $input['clabels'] ) : null;
// default_value
$default_value = isset( $input['default_value'] ) ? $input['default_value'] : '';
Expand All @@ -1563,7 +1564,7 @@ private static function sanatize_custom_field($input){
}
}
$field->default_value = $default_value;
$field->placeholder_value = isset( $input['placeholder_value'] ) ? sanitize_text_field( $input['placeholder_value'] ) : '';
$field->placeholder_value = isset( $input['placeholder_value'] ) ? sanitize_text_field( esc_attr( $input['placeholder_value'] ) ) : '';
$field->sort_order = isset( $input['sort_order'] ) ? intval( $input['sort_order'] ) : self::default_sort_order();
$field->is_active = isset( $input['is_active'] ) ? absint( $input['is_active'] ) : 0;
$field->is_default = isset( $input['is_default'] ) ? absint( $input['is_default'] ) : 0;
Expand Down
36 changes: 36 additions & 0 deletions includes/class-geodir-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,42 @@ public static function init() {
add_filter( 'avada_setting_get_search_sidebar_2', array( __CLASS__, 'avada_sidebar_2' ), 100, 1 );
add_filter( 'avada_setting_get_search_sidebar_position', array( __CLASS__, 'avada_sidebar_position' ), 100, 1 );
add_filter( 'avada_setting_get_sidebar_sticky', array( __CLASS__, 'avada_sidebar_sticky' ), 100, 1 );

// Fusion Builder (Avada)
if ( defined( 'FUSION_BUILDER_VERSION' ) ) {
// GD Listings
add_filter( 'geodir_before_template_part',array( __CLASS__, 'avada_get_temp_globals' ), 10);
add_filter( 'geodir_after_template_part',array( __CLASS__, 'avada_set_temp_globals' ), 10);
// GD Loop
add_filter( 'geodir_before_get_template_part',array( __CLASS__, 'avada_get_temp_globals' ), 10);
add_filter( 'geodir_after_get_template_part',array( __CLASS__, 'avada_set_temp_globals' ), 10);
}
}
}

/**
* Set temp globals before looping listings template so we can reset them to proper values after looping.
*
* @param $template_name
*/
public static function avada_get_temp_globals($template_name){
if($template_name == 'content-widget-listing.php' || basename($template_name) == 'content-archive-listing.php'){
global $columns, $global_column_array, $fb_temp_columns, $fb_temp_global_column_array;
$fb_temp_columns = $columns;
$fb_temp_global_column_array = $global_column_array;
}
}

/**
* Reset globals after looping listings template so we can reset them to proper values after looping.
*
* @param $template_name
*/
public static function avada_set_temp_globals($template_name){
if($template_name == 'content-widget-listing.php' || basename($template_name) == 'content-archive-listing.php'){
global $columns, $global_column_array, $fb_temp_columns, $fb_temp_global_column_array;
$columns = $fb_temp_columns;
$global_column_array = $fb_temp_global_column_array;
}
}

Expand Down
2 changes: 1 addition & 1 deletion includes/class-geodir-defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GeoDir_Defaults {
* @return string
*/
public static function page_add_content($no_filter = false){
$content = "[gd_notifications]\n[gd_add_listing]";
$content = "[gd_notifications]\n[gd_add_listing show_login=1]";

if($no_filter){
return $content;
Expand Down
3 changes: 2 additions & 1 deletion includes/class-geodir-template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@ public static function disable_page_templates_frontend(){
|| $post->ID == geodir_get_option('page_archive_item')
|| geodir_is_cpt_template_page( $post->ID )
)){
wp_die( __( 'Sorry, this is a page template and can not be accessed from the frontend, it is used for building the layouts of GeoDirectory sections.','geodirectory' ) );
wp_redirect(home_url(), 301);
exit;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions includes/class-geodir-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@ public static function login_link( $redirect = '' ) {
$login_link = wp_login_url( $redirect );

$output = "<div class='gd-login-links'>";
$output .= '<a class="login-link" href="' . esc_url( $login_link ) . '" title="' . $login_title . '">' . $login_title . '</a>';
$output .= '<a class="login-link uwp-login-link" href="' . esc_url( $login_link ) . '" title="' . $login_title . '">' . $login_title . '</a>';

if ( get_option( 'users_can_register' ) ) {
$register_title = esc_attr__( 'Register', 'geodirectory' );
$register_link = wp_registration_url();
$output .= ' | <a class="register-link" href="' . esc_url( $register_link ) . '" title="' . $register_title . '">' . $register_title . '</a>';
$output .= ' | <a class="register-link uwp-register-link" href="' . esc_url( $register_link ) . '" title="' . $register_title . '">' . $register_title . '</a>';
}

$output .= "</div>";
Expand Down
5 changes: 5 additions & 0 deletions includes/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ function geodir_get_template_part( $slug, $name = '' ) {
$template = apply_filters( 'geodir_get_template_part', $template, $slug, $name );

if ( $template ) {

do_action( 'geodir_before_get_template_part', $template, $slug, $name);

load_template( $template, false );

do_action( 'geodir_after_get_template_part', $template, $slug, $name);
}

return '';
Expand Down
Loading

0 comments on commit 271f1dc

Please sign in to comment.