jaydd
Forum Replies Created
-
Forum: Plugins
In reply to: [CMB2] text_time field content not deletable after clicking intoI see in cmb2.js line929 that this behavior seems to be intended.
But anyways, here is a jquery workaround for anyone having the same problem:jQuery(".cmb2-timepicker").blur(function() { console.log('out'); if(jQuery(this)[0].innerHTML.trim().length === 0){ jQuery(this).val(''); } });
- This reply was modified 3 years, 4 months ago by jaydd.
Forum: Plugins
In reply to: [CMB2] text_time field content not deletable after clicking intohm,oke thanks! good to know that it′s not only for me. I ll see what i can do then with some js i guess. The problem with the temporary solution above is that it′s not only being set to 00:00, but to whatever is already set in the field
Forum: Plugins
In reply to: [CMB2] text_time field content not deletable after clicking intoit is held for review it seems, but here it is, hopefully it allows it:
add_action('cmb2_admin_init', 'eschstandort_register_repeatable_group_field_metabox'); /** * Hook in and add a metabox to demonstrate repeatable grouped fields */ function eschstandort_register_repeatable_group_field_metabox() { /** * Repeatable Field Groups */ $cmb_group = new_cmb2_box(array( 'id' => 'eschstandort_group_metabox', 'title' => esc_html__('Unterrichten des Standorts', 'cmb2'), 'object_types' => array('eschstandort'), )); // $group_field_id is the field id string, so in this case: 'eschstandort_group_demo' $group_field_id = $cmb_group->add_field(array( 'id' => 'eschstandort_group_standort', 'type' => 'group', 'description' => esc_html__('Geben Sie hier die Unterrichten dieses Standort ein', 'cmb2'), 'options' => array( 'group_title' => esc_html__('Unterricht {#}', 'cmb2'), // {#} gets replaced by row number 'add_button' => esc_html__('Unterricht hinzufügen', 'cmb2'), 'remove_button' => esc_html__('Unterricht l?schen', 'cmb2'), 'sortable' => true, // 'closed' => true, // true to have the groups closed by default // 'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'cmb2' ), // Performs confirmation before removing group. ), )); /** * Group fields works the same, except ids only need * to be unique to the group. Prefix is not needed. * * The parent field's id needs to be passed as the first argument. */ /* array( 'standard' => esc_html__('Option One', 'cmb2'), 'custom' => esc_html__('Option Two', 'cmb2'), 'none' => esc_html__('Option Three', 'cmb2'), ) */ $unterrichten = get_posts([ 'post_type' => 'eschunterricht', 'post_status' => 'publish', 'numberposts' => -1 // 'order' => 'ASC' ]); $unterricht_list = []; foreach ($unterrichten as $unterricht) { //$unterricht->ID $name = get_post_meta($unterricht->ID, 'eschunterricht_name', true); // strip out all whitespace $zname_clean = preg_replace('/\s*/', '', $name); // convert the string to all lowercase $zname_clean = strtolower($zname_clean); $unterricht_list[$unterricht->ID] = esc_html__($name, 'cmb2'); } $cmb_group->add_group_field($group_field_id, array( 'name' => esc_html__('Unterricht ausw?hlen', 'cmb2'), 'desc' => esc_html__('Welche Unterricht m?chten Sie zu diesen Standort hinzufügen?', 'cmb2'), 'id' => 'eschstandort_unterricht_select', 'type' => 'select', 'show_option_none' => true, 'options' => $unterricht_list, )); $cmb_group->add_group_field($group_field_id, array( 'name' => __('Anfangstag', 'cmb2'), 'desc' => __('Das Unterricht wird an oder nach diesen Tag Anfangen, je nach welche Tagen Sie unten eingeben. Z.b.: Sie tragen hier Sonntag ein, aber unten Sie stellen ein dass diesen Unterricht nur am Dienstag und Donnerstag stattfindet, dann werden die Unterrichten am ersten Dienstag nach diesen Sonntag anfangen.', 'cmb2'), 'id' => 'eschstandort_unterricht_start_textdate', 'type' => 'text_date', 'attributes' => array( // CMB2 checks for datepicker override data here: 'data-datepicker' => json_encode(array( // dayNames: https://api.jqueryui.com/datepicker/#option-dayNames 'dayNames' => array('Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag '), // monthNamesShort: https://api.jqueryui.com/datepicker/#option-monthNamesShort 'monthNamesShort' => explode(',', 'Jan,Feb,Marz,Apr,Mai,Juni,July,Aug,Sept,Okt,Nov,Dez'), // yearRange: https://api.jqueryui.com/datepicker/#option-yearRange // and https://stackoverflow.com/a/13865256/1883421 'yearRange' => '-100:+0', // Get 1990 through 10 years from now. // 'yearRange' => '1990:'. ( date( 'Y' ) + 10 ), )), ), )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Montag', 'id' => 'esch_montag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Dienstag', 'id' => 'esch_dienstag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Mittwoch', 'id' => 'esch_mittwoch', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Donnerstag', 'id' => 'esch_donnerstag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Freitag', 'id' => 'esch_freitag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Samstag', 'id' => 'esch_samstag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Sonntag', 'id' => 'esch_sonntag', 'type' => 'text_time', 'time_format' => 'H:i', )); }
Forum: Plugins
In reply to: [CMB2] text_time field content not deletable after clicking intoand the composer.lock:
{ "_readme": [ "This file locks the dependencies of your project to a known state", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], "content-hash": "1a0e9a91cfd3a7b09525acd000235489", "packages": [ { "name": "cmb2/cmb2", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/CMB2/CMB2.git", "reference": "cacbc8cedbfdf8ffe0e840858e6860f9333c33f2" }, "dist": { "type": "zip", "url": "https://api.github.com/repos/CMB2/CMB2/zipball/cacbc8cedbfdf8ffe0e840858e6860f9333c33f2", "reference": "cacbc8cedbfdf8ffe0e840858e6860f9333c33f2", "shasum": "" }, "require": { "php": ">5.2.4" }, "require-dev": { "apigen/apigen": "4.1.2", "awesomemotive/am-cli-tools": ">=1.3.1", "nette/utils": "2.5.3", "phpunit/phpunit": "6.5.13" }, "suggest": { "composer/installers": "~1.0" }, "type": "wordpress-plugin", "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], "authors": [ { "name": "Justin Sternberg", "email": "[email protected]", "homepage": "https://dsgnwrks.pro", "role": "Developer" }, { "name": "WebDevStudios", "email": "[email protected]", "homepage": "https://github.com/WebDevStudios", "role": "Developer" } ], "description": "CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.", "homepage": "https://github.com/CMB2/CMB2", "keywords": [ "metabox", "plugin", "wordpress" ], "time": "2021-03-04T02:18:53+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": { "cmb2/cmb2": 20 }, "prefer-stable": false, "prefer-lowest": false, "platform": [], "platform-dev": [], "plugin-api-version": "1.1.0" }
Forum: Plugins
In reply to: [CMB2] text_time field content not deletable after clicking intoyep, it is in a repeatable group like this:
add_action('cmb2_admin_init', 'eschstandort_register_repeatable_group_field_metabox'); /** * Hook in and add a metabox to demonstrate repeatable grouped fields */ function eschstandort_register_repeatable_group_field_metabox() { /** * Repeatable Field Groups */ $cmb_group = new_cmb2_box(array( 'id' => 'eschstandort_group_metabox', 'title' => esc_html__('Unterrichten des Standorts', 'cmb2'), 'object_types' => array('eschstandort'), )); // $group_field_id is the field id string, so in this case: 'eschstandort_group_demo' $group_field_id = $cmb_group->add_field(array( 'id' => 'eschstandort_group_standort', 'type' => 'group', 'description' => esc_html__('Geben Sie hier die Unterrichten dieses Standort ein', 'cmb2'), 'options' => array( 'group_title' => esc_html__('Unterricht {#}', 'cmb2'), // {#} gets replaced by row number 'add_button' => esc_html__('Unterricht hinzufügen', 'cmb2'), 'remove_button' => esc_html__('Unterricht l?schen', 'cmb2'), 'sortable' => true, // 'closed' => true, // true to have the groups closed by default // 'remove_confirm' => esc_html__( 'Are you sure you want to remove?', 'cmb2' ), // Performs confirmation before removing group. ), )); /** * Group fields works the same, except ids only need * to be unique to the group. Prefix is not needed. * * The parent field's id needs to be passed as the first argument. */ /* array( 'standard' => esc_html__('Option One', 'cmb2'), 'custom' => esc_html__('Option Two', 'cmb2'), 'none' => esc_html__('Option Three', 'cmb2'), ) */ $unterrichten = get_posts([ 'post_type' => 'eschunterricht', 'post_status' => 'publish', 'numberposts' => -1 // 'order' => 'ASC' ]); $unterricht_list = []; foreach ($unterrichten as $unterricht) { //$unterricht->ID $name = get_post_meta($unterricht->ID, 'eschunterricht_name', true); // strip out all whitespace $zname_clean = preg_replace('/\s*/', '', $name); // convert the string to all lowercase $zname_clean = strtolower($zname_clean); $unterricht_list[$unterricht->ID] = esc_html__($name, 'cmb2'); } $cmb_group->add_group_field($group_field_id, array( 'name' => esc_html__('Unterricht ausw?hlen', 'cmb2'), 'desc' => esc_html__('Welche Unterricht m?chten Sie zu diesen Standort hinzufügen?', 'cmb2'), 'id' => 'eschstandort_unterricht_select', 'type' => 'select', 'show_option_none' => true, 'options' => $unterricht_list, )); $cmb_group->add_group_field($group_field_id, array( 'name' => __('Anfangstag', 'cmb2'), 'desc' => __('Das Unterricht wird an oder nach diesen Tag Anfangen, je nach welche Tagen Sie unten eingeben. Z.b.: Sie tragen hier Sonntag ein, aber unten Sie stellen ein dass diesen Unterricht nur am Dienstag und Donnerstag stattfindet, dann werden die Unterrichten am ersten Dienstag nach diesen Sonntag anfangen.', 'cmb2'), 'id' => 'eschstandort_unterricht_start_textdate', 'type' => 'text_date', 'attributes' => array( // CMB2 checks for datepicker override data here: 'data-datepicker' => json_encode(array( // dayNames: https://api.jqueryui.com/datepicker/#option-dayNames 'dayNames' => array('Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag '), // monthNamesShort: https://api.jqueryui.com/datepicker/#option-monthNamesShort 'monthNamesShort' => explode(',', 'Jan,Feb,Marz,Apr,Mai,Juni,July,Aug,Sept,Okt,Nov,Dez'), // yearRange: https://api.jqueryui.com/datepicker/#option-yearRange // and https://stackoverflow.com/a/13865256/1883421 'yearRange' => '-100:+0', // Get 1990 through 10 years from now. // 'yearRange' => '1990:'. ( date( 'Y' ) + 10 ), )), ), )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Montag', 'id' => 'esch_montag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Dienstag', 'id' => 'esch_dienstag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Mittwoch', 'id' => 'esch_mittwoch', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Donnerstag', 'id' => 'esch_donnerstag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Freitag', 'id' => 'esch_freitag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Samstag', 'id' => 'esch_samstag', 'type' => 'text_time', 'time_format' => 'H:i', )); $cmb_group->add_group_field($group_field_id, array( 'name' => 'Sonntag', 'id' => 'esch_sonntag', 'type' => 'text_time', 'time_format' => 'H:i', )); }
- This reply was modified 3 years, 4 months ago by jaydd.
Forum: Plugins
In reply to: [WooCommerce] Add action after csv importWith the plugin you can import products from a csv/excel table. Is there a way to run a function right after an import is finished? I was thinking of an action hook, but couldnt find any fitting. Either that or any other way to run a function after an import?
Forum: Plugins
In reply to: [WooCommerce] Missing translations from po. fileUmm. Could be my theme, but then for some reason its not being imported, tho its also 100% translated:/ But these strings are really woocommerce looking: was added to cart” show details(on shop page at each product). I found Show details(not solved tho) in my Enfold theme(, but i did not find “was added to cart anywhere(it comes up when i click add to cart at a product).
Forum: Plugins
In reply to: [WooCommerce] Product ordering problemI am pretty sure woocommerce does the product grid-there are layout elements ands other and then there is plugin additions. It does not work on the main shop page either.
Forum: Plugins
In reply to: [WooCommerce] Product ordering problemI make a page, then i put a “product grid” element into the page. In the options i put either “use default(defined at-woocommerce-settings-catalog)” or “let user pick…..(default defined at woocommerce-settings-catalog)”
Thanks! If i make an admin account for you, that would make it easyer?
Noone of the automatic functions that i made to be set are set- when a normal user register. If i then set it at a single users setting(after he registered and activated his account)then its being shown and it works also. So the settings i make at plugins settings seems to do nothing( auto set on register box ticked).
It seems none of the automatic functions work for me. Any news?:)
(or is there a more forcing way by adding code to set expire date to 1 year automatically?-that would also be good)
thanks,
danielHello Ben! Thanks for the fast reply!
I set the plugin to automatic expire date on register, but as i see it doesnt work. It sets the user to be never expireing(no matter what i set) therefore it does not show a date. I can manually change it in users profile and then it starts showing correctly. Its not a multisite.
DanielForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Separate colums vertically?Hello!
https://rohamjelvenyek.com/adatbazis/this is the one, also its not closed with lines on the bottom/right side of the table for some reason
Forum: Fixing WordPress
In reply to: Facebook shares date/author etc as part of blogyes, clearing facebook cache made it work:) thanks alot!