diff --git a/includes/admin/class-geodir-admin-addons.php b/includes/admin/class-geodir-admin-addons.php index 56f3b70a..e308107d 100644 --- a/includes/admin/class-geodir-admin-addons.php +++ b/includes/admin/class-geodir-admin-addons.php @@ -1,7 +1,7 @@ __("Membership", "geodirectory"), ); - + return $tabs; } @@ -449,7 +449,7 @@ public static function output_button( $addon ) { } } - + // filter the button arguments $button_args = apply_filters('edd_api_button_args',$button_args); @@ -525,7 +525,7 @@ public static function get_recommend_wp_plugins(){ 'slug' => 'ayecode-connect', 'name' => 'AyeCode Connect', 'file' => 'ayecode-connect/ayecode-connect.php', - 'desc' => __( 'Allows you to install any purchased AyeCode Ltd product add-ons without a zip file. It also installs and activates licences automatically, so there is no need to copy/paste licenses.', 'geodirectory' ), + 'desc' => __( 'Support & documentation right from your dashboard, easily install any purchased add-ons without a zip file or license key.', 'geodirectory' ), ), 'ninja-forms' => array( 'url' => 'https://wordpress.org/plugins/ninja-forms/', @@ -541,22 +541,15 @@ public static function get_recommend_wp_plugins(){ 'file' => 'userswp/userswp.php', 'desc' => __('Allow frontend user login and registration as well as have slick profile pages.','geodirectory'), ), - // just testing script for below plugins -// 'ewww-image-optimizer' => array( -// 'url' => 'https://wordpress.org/plugins/ewww-image-optimizer/', -// 'slug' => 'ewww-image-optimizer', -// 'name' => 'EWWW Image Optimizer', -// 'desc' => __('testing','geodirectory'), -// ), -// 'hide-admin-bar' => array( -// 'url' => 'https://wordpress.org/plugins/hide-admin-bar/', -// 'slug' => 'hide-admin-bar', -// 'name' => 'Hide admin bar', -// 'desc' => __('testing','geodirectory'), -// ), ); - return $plugins; + + /** + * A collection of WP plugins to recommend. + * + * @var array $plugins An array containing all the plugins. + */ + return apply_filters('geodir_recommend_wp_plugins', $plugins ); } /** @@ -585,7 +578,7 @@ public static function get_recommend_wp_plugins_edd_formatted(){ public static function get_wizard_paid_addons(){ $addons = self::get_section_data( 'addons' ); - + return $addons; } } diff --git a/includes/admin/class-geodir-admin-dummy-data.php b/includes/admin/class-geodir-admin-dummy-data.php index 0e7d401d..6a2f624a 100644 --- a/includes/admin/class-geodir-admin-dummy-data.php +++ b/includes/admin/class-geodir-admin-dummy-data.php @@ -24,9 +24,9 @@ class GeoDir_Admin_Dummy_Data { public function __construct() { } - + public static function create_sort_fields(){ - + } /** @@ -342,7 +342,7 @@ public static function create_dummy_posts( $request ) { $total_count = 0; $dummy_post_index = $item_index; - + $dummy_categories = array(); $dummy_custom_fields = array(); $dummy_sort_fields = array(); @@ -409,13 +409,13 @@ public static function create_dummy_posts( $request ) { /** * Fires action before each dummy data item. - * + * * @since 2.0.0 - * + * */ do_action( 'geodir_insert_dummy_data_loop', $post_type, $data_type, $item_index ); } - + // Do the data insert if($dummy_post_index === 0){ @@ -509,6 +509,7 @@ public static function set_page_templates($post_type,$page_templates){ * @param string $post_type The post type. */ public static function dummy_data_ui() { + global $aui_bs5; wp_enqueue_script( 'jquery-ui-progressbar' ); global $wpdb, $plugin_prefix,$geodirectory; @@ -531,12 +532,18 @@ public static function dummy_data_ui() { $nonce = wp_create_nonce( 'geodir_dummy_data' ); + + $bs_select_class = $aui_bs5 ? 'form-select form-select-sm' : ' form-control form-control-sm'; + $data_tooltip = $aui_bs5 ? 'data-bs-toggle="tooltip"' : 'data-toggle="tooltip"'; + foreach ( $cpts as $post_type => $cpt ) { $data_types = self::dummy_data_types( $post_type ); $set_dt = geodir_get_option( $post_type . '_dummy_data_type' ); + $set_dt = apply_filters( 'geodir_default_dummy_data_type', $set_dt, $post_type ); + $count = 30; if(geodir_column_exist($plugin_prefix . $post_type . "_detail", "post_dummy")){ @@ -552,7 +559,7 @@ public static function dummy_data_ui() { $select_disabled = $post_counts > 0 ? 'disabled' : ''; echo ""; - echo ""; $c = 0; foreach ( $data_types as $key => $val ) { @@ -566,25 +573,29 @@ public static function dummy_data_ui() { echo ""; $select_display = $post_counts > 0 ? 'display:none;' : ''; - echo ""; $x = 1; while ( $x <= $count ) { $selected = ( $x == $count ) ? "selected='selected'" : ''; echo ""; $x ++; } - echo ""; + echo ""; + echo $aui_bs5 ? '' : ""; // Page templates styles - echo ""; - echo ""; + echo $aui_bs5 ? '' : ""; echo ""; @@ -729,6 +740,8 @@ function (data) { jQuery(obj).removeClass('gd-remove-data btn-danger').addClass('btn-primary'); jQuery(obj).val(''); jQuery(obj).prop('disabled', false); + jQuery('#' + posttype + '_data_type_count.gd-data-type-count').show(); + jQuery('#' + posttype + '_data_type_templates.gd-data-type-templates').show(); jQuery('#' + posttype + '_data_type_count').closest('.gd-data-type-count').show(); jQuery('#' + posttype + '_data_type_templates').closest('.gd-data-type-templates').show(); jQuery('#' + posttype + '_data_type_count').prop('disabled', false); @@ -752,6 +765,7 @@ function gdInstallDummyData(obj, nonce, posttype, insertedCount) { jQuery(obj).prop('disabled', true); jQuery('#' + posttype + '_data_type').prop('disabled', true); jQuery('#' + posttype + '_data_type_count').prop('disabled', true); + jQuery('#' + posttype + '_data_type_count.gd-data-type-count').hide(); jQuery('#' + posttype + '_data_type_count').closest('.gd-data-type-count').hide(); jQuery('#' + posttype + '_data_type_templates').closest('.gd-data-type-templates').hide(); @@ -1418,4 +1432,4 @@ public static function setup_menu($menu_id = '',$menu_location = ''){ } } -} \ No newline at end of file +} diff --git a/includes/admin/class-geodir-admin-setup-wizard.php b/includes/admin/class-geodir-admin-setup-wizard.php index 65c9a221..769c609a 100644 --- a/includes/admin/class-geodir-admin-setup-wizard.php +++ b/includes/admin/class-geodir-admin-setup-wizard.php @@ -537,17 +537,18 @@ public function setup_features() { $recommend_wp_plugins = GeoDir_Admin_Addons::get_recommend_wp_plugins(); $paid_types = GeoDir_Admin_Addons::get_wizard_paid_addons(); + + $installed_text = " " . __( 'Installed', 'geodirectory' ); + echo ""; + echo ""; ?> -
+

-
" . __( 'Installed', 'geodirectory' ); - echo ""; - echo ""; + // recommended foreach ( $recommend_wp_plugins as $product ) { @@ -587,10 +588,20 @@ public function setup_features() {
- + + +
+ @@ -1261,6 +1272,12 @@ public function setup_content() { 'menus' => __( "Menus", "geodirectory" ), ); + // If a block theme remove some parts that don't apply + if ( function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() ) { + unset( $wizard_content['sidebars'] ); + unset( $wizard_content['menus'] ); + } + $wizard_content = apply_filters( 'geodir_wizard_content', $wizard_content ); $page_counts = wp_count_posts( 'page' ); @@ -1687,6 +1704,7 @@ public static function content_dummy_data() { public static function content_sidebars() { global $aui_bs5; + $bs_select_class = $aui_bs5 ? 'form-select form-select-sm' : ' form-control form-control-sm'; $gd_sidebar_top = get_theme_support( 'geodirectory-sidebar-top' ); if ( isset( $gd_sidebar_top[0] ) ) { ?> @@ -1695,7 +1713,7 @@ public static function content_sidebars() {
-
-
@@ -1858,7 +1877,7 @@ public static function content_menus() { if ( ! empty( $set_menus ) ) { //echo '##1'; - echo ""; foreach ( $set_menus as $menu_location => $menu_id ) { $selected = ''; @@ -1890,7 +1909,7 @@ public static function content_menus() { //print_r($menus ); if ( ! empty( $menus ) ) { - echo ""; foreach ( $menus as $menu_slug => $menu_name ) { $selected = ''; diff --git a/readme.txt b/readme.txt index bc014805..35f895f2 100644 --- a/readme.txt +++ b/readme.txt @@ -311,6 +311,7 @@ __WARNING: GDv2 is a significant update over GDv1 and may require manual work, s * Several SQL Query optimizations reducing some query times even further - ADDED * GD > Single Next Prev not filtering by same location - FIXED * Add listing zip and region discovery improvements - ADDED +* Setup Wizard fields not showing tooltips with BS5 styles - FIXED = GeoDirectory v2.3.40 - 2024-02-15 = * Custom single post map is not loading on non GD pages - FIXED