Skip to content

Commit

Permalink
2.0.0.47
Browse files Browse the repository at this point in the history
  • Loading branch information
stiofan committed Mar 5, 2019
1 parent a2af718 commit 41392dc
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 7,349 deletions.
2,576 changes: 1 addition & 2,575 deletions assets/css/admin.css

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion assets/css/admin.css.map

Large diffs are not rendered by default.

4,752 changes: 2 additions & 4,750 deletions assets/css/block_editor.css

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion assets/css/block_editor.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/style.css.map

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
@@ -1,7 +1,8 @@
v2.0.0.47
Edit post permalink button missing so permalink can't be edited - FIXED
Edit post permalink button missing so not able to edit single permalink - FIXED
Radio button and text overlap on add listing page - FIXED
Twitter feed custom field no longer working - FIXED
Latest compatibility settings caused issue with some builders - FIXED

v2.0.0.46
Some custom fields should store is_default = 0 during v1 to v2 conversion - FIXED
Expand Down
4 changes: 2 additions & 2 deletions geodirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Plugin Name: GeoDirectory
* Plugin URI: https://wpgeodirectory.com/
* Description: GeoDirectory plugin for WordPress.
* Version: 2.0.0.46
* Version: 2.0.0.47
* Author: AyeCode Ltd
* Author URI: https://wpgeodirectory.com
* Text Domain: geodirectory
Expand Down Expand Up @@ -60,7 +60,7 @@ final class GeoDirectory {
*
* @var string
*/
public $version = '2.0.0.46';
public $version = '2.0.0.47';

/**
* GeoDirectory instance.
Expand Down
91 changes: 83 additions & 8 deletions includes/class-geodir-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,93 @@ public static function dynamically_add_post_meta( $metadata, $object_id, $meta_k

// An array or meta keys we don't want to be used by the template pages
// @todo switch back to an inclusive array, exclusive can add to many queries
$restricted_meta_keys = array(
'',
// $restricted_meta_keys = array(
// '',
// );
//
// if ( $meta_key && $meta_key[0]== "_" && geodir_is_page( 'single' )) {
// if ( $object_id && $metadata == '' && ! in_array( $meta_key, $restricted_meta_keys ) && $object_id == get_queried_object_id() ) {
// $metadata = geodir_get_post_meta_raw( geodir_details_page_id(), $meta_key );
// }
// }elseif($meta_key && $meta_key[0]== "_" && geodir_is_page( 'archive' ) ){
// if ( $object_id && $metadata == '' && ! in_array( $meta_key, $restricted_meta_keys ) && $object_id == get_queried_object_id() ) {
// $metadata = geodir_get_post_meta_raw( geodir_archive_page_id(), $meta_key );
// }
// }

// new way

// Standard WP fields
$wp_keys = array(
'_wp_page_template',
// '_thumbnail_id',
);

if ( $meta_key && $meta_key[0]== "_" && geodir_is_page( 'single' )) {
if ( $object_id && $metadata == '' && ! in_array( $meta_key, $restricted_meta_keys ) && $object_id == get_queried_object_id() ) {
$metadata = geodir_get_post_meta_raw( geodir_details_page_id(), $meta_key );
// Generic keys
$gen_keys = array(
'primer_layout', // primer theme layout
);

// FusionBuilder (Avada theme), we need to add these on the fly
if(class_exists( 'FusionBuilder' )){

if(substr( $meta_key, 0, 5 ) === "pyre_" || substr( $meta_key, 0, 4 ) === "sbg_"){
$gen_keys[] = $meta_key;
}
}



// Beaver builder :: it does not seem to need any changes

if(
$meta_key
&& ($meta_key[0]== "_" || in_array($meta_key,$gen_keys))
&& $object_id
&& $object_id == get_queried_object_id()
&& (geodir_is_page( 'single' ) || geodir_is_page( 'archive' ))
){
$template_page_id = geodir_is_page( 'single' ) ? geodir_details_page_id() : geodir_archive_page_id();

// WP
if(in_array($meta_key,$wp_keys)){
$metadata = geodir_get_post_meta_raw( $template_page_id, $meta_key );
}
}elseif($meta_key && $meta_key[0]== "_" && geodir_is_page( 'archive' ) ){
if ( $object_id && $metadata == '' && ! in_array( $meta_key, $restricted_meta_keys ) && $object_id == get_queried_object_id() ) {
$metadata = geodir_get_post_meta_raw( geodir_archive_page_id(), $meta_key );

// generic keys
if(in_array($meta_key,$gen_keys)){
$metadata = geodir_get_post_meta_raw( $template_page_id, $meta_key );
}

// Elementor
if(function_exists( '_is_elementor_installed' ) && geodir_get_post_meta_raw( $template_page_id, '_elementor_edit_mode')=='builder'){
if(substr( $meta_key, 0, 11 ) === "_elementor_"){
$metadata = geodir_get_post_meta_raw( $template_page_id, $meta_key );
}
}

// DIVI (elegant themes)
if(function_exists('et_pb_is_pagebuilder_used') && et_pb_is_pagebuilder_used($template_page_id)){
if(substr( $meta_key, 0, 4 ) === "_et_"){
$metadata = geodir_get_post_meta_raw( $template_page_id, $meta_key );
}
}

// Beaver Builder
if(class_exists( 'FLBuilderLoader' ) && geodir_get_post_meta_raw( $template_page_id, '_fl_builder_enabled') ){
if(substr( $meta_key, 0, 4 ) === "_fl_"){
$metadata = geodir_get_post_meta_raw( $template_page_id, $meta_key );
}
}

// WPBakery page builder
// if(class_exists( 'FLBuilderLoader' ) && geodir_get_post_meta_raw( $template_page_id, '_fl_builder_enabled') ){
// if(substr( $meta_key, 0, 4 ) === "_vc_"){
// $metadata = geodir_get_post_meta_raw( $template_page_id, $meta_key );
// }
// }


}

return $metadata;
Expand Down
1 change: 1 addition & 0 deletions includes/widgets/class-geodir-widget-post-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ public function output($args = array(), $widget_args = array(),$content = ''){
*/
public function output_images($options){
global $post,$gd_slider_outputs,$gd_post;
if(!isset($post->ID)){return '';}
ob_start();

// options
Expand Down
2 changes: 1 addition & 1 deletion includes/widgets/class-geodir-widget-single-tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct() {
*/
public function output($args = array(), $widget_args = array(),$content = ''){
global $preview, $post,$gd_post;

if(!isset($post->ID)){return '';}
// options
$defaults = array(
'show_as_list' => '0', // 0 = all
Expand Down
Binary file modified languages/geodirectory-en_US.mo
Binary file not shown.
19 changes: 12 additions & 7 deletions languages/geodirectory-en_US.po
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: GeoDirectory 2.0.0.46\n"
"Project-Id-Version: GeoDirectory 2.0.0.47\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-04 15:42+0000\n"
"PO-Revision-Date: 2019-03-04 15:42+0000\n"
"POT-Creation-Date: 2019-03-05 19:09+0000\n"
"PO-Revision-Date: 2019-03-05 19:09+0000\n"
"Last-Translator: \n"
"Language-Team: AyeCode Ltd <[email protected]>\n"
"Language: en_US\n"
Expand Down Expand Up @@ -8277,21 +8277,21 @@ msgid ""
"href=\"%s\">Edit page</a>"
msgstr ""

#: includes/class-geodir-compatibility.php:376
#: includes/class-geodir-compatibility.php:456
msgid "Yoast SEO detected"
msgstr ""

#: includes/class-geodir-compatibility.php:378
#: includes/class-geodir-compatibility.php:458
msgid ""
"The Yoast SEO plugin has been detected and will take over the GeoDirectory "
"Settings unless disabled below."
msgstr ""

#: includes/class-geodir-compatibility.php:383
#: includes/class-geodir-compatibility.php:463
msgid "Disable Yoast"
msgstr ""

#: includes/class-geodir-compatibility.php:384
#: includes/class-geodir-compatibility.php:464
msgid "Disable overwrite by Yoast SEO titles & metas on GD pages?"
msgstr ""

Expand Down Expand Up @@ -9800,6 +9800,11 @@ msgstr ""
msgid "Close"
msgstr ""

#: includes/custom-fields/output-filter-functions.php:40
#, php-format
msgid "Tweets by %s"
msgstr ""

#: includes/custom-fields/output-functions.php:720
msgid "Some demo text."
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tags: directory plugin, business directory, listings, classifieds, real estate
Requires at least: 4.5
Requires PHP: 5.3
Tested up to: 5.1
Stable tag: 2.0.0.46
Stable tag: 2.0.0.47


Create huge location-based business directories with this fully-featured directory plugin. In a few clicks you could be the next Yelp or Tripadvisor.
Expand Down

0 comments on commit 41392dc

Please sign in to comment.