Skip to content

Commit

Permalink
Added option to allow beta addons to be installed/updated via WP Easy…
Browse files Browse the repository at this point in the history
… Updates - ADDED
  • Loading branch information
stiofan committed Jul 27, 2018
1 parent d9ea8b4 commit a3640b9
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 201 deletions.
3 changes: 2 additions & 1 deletion change_log.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
v2.0.0.17
v2.0.0.18
Image slider widget not working on listing pages - FIXED
Single image slider will now output as just an image - CHANGED
Apple devices use different kind of apostrophe which does not work for search - FIXED
Expand All @@ -10,6 +10,7 @@ Required date field validation fires too early - FIXED
Business hours short names broken if weekdays translated - FIXED
Added conversion script to be able to convert listings from v1 to v2 - ADDED
Added support for Location Manager v2 beta - ADDED
Added option to allow beta addons to be installed/updated via WP Easy Updates - ADDED

v2.0.0.16-rc
Updated from font-awesome v4 to v5 - CHANGED
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.17
* Version: 2.0.0.18
* Author: AyeCode Ltd
* Author URI: https://wpgeodirectory.com
* Text Domain: geodirectory
* Domain Path: /languages
* Requires at least: 4.5
* Tested up to: 4.9.6
* Tested up to: 4.9.9
* Update URL: https://github.com/AyeCode/geodirectory/
*/

Expand Down Expand Up @@ -60,7 +60,7 @@ final class GeoDirectory {
*
* @var string
*/
public $version = '2.0.0.17';
public $version = '2.0.0.18';

/**
* GeoDirectory instance.
Expand Down
10 changes: 10 additions & 0 deletions includes/admin/settings/class-geodir-settings-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ public function get_settings( $current_section = '' ) {
//'advanced' => true
),

array(
'name' => __( 'Enable beta addons', 'geodirectory' ),
'desc' => __( 'This will allow beta addons to be installed.', 'geodirectory' ),
'id' => 'admin_enable_beta',
'type' => 'checkbox',
'default' => '1',
//'desc_tip' => true,
//'advanced' => true
),




Expand Down
27 changes: 26 additions & 1 deletion includes/class-geodir-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,39 @@ public static function init() {
######################################################*/
add_filter('wp_print_scripts',array(__CLASS__,'beaver_builder'),100);


/*######################################################
WP Easy Updates :: Allow beta addons if set
######################################################*/
add_filter('wp_easy_updates_api_params',array(__CLASS__,'wp_easy_updates'),10, 2);


// after_setup_theme checks
add_action( 'after_setup_theme', array(__CLASS__,'for_later_checks') );

}

/**
* @param $api_params
* @param $_src
*
* @return mixed
*/
public static function wp_easy_updates($api_params,$_src){

if ( geodir_get_option('admin_enable_beta') && strpos($_src, 'wpgeodirectory.com') !== false) {
if(!empty($api_params['update_array'])){
foreach($api_params['update_array'] as $key => $val){
$api_params['update_array'][$key]['beta'] = true;
}
}

$api_params['beta'] = true;

}

return $api_params;
}

public static function beaver_builder(){
if(isset($_REQUEST['fl_builder'])){
wp_dequeue_script( 'font-awesome' );
Expand Down
Binary file modified languages/geodirectory-en_US.mo
Binary file not shown.
Loading

0 comments on commit a3640b9

Please sign in to comment.