datverse
Forum Replies Created
-
Awesome!
Thanks ❤️
Hi,
The full code should be:add_filter( 'tablepress_table_render_data', function ( $table, $orig_table, $render_options ) { global $table_header; foreach ( $table['data'][0] as $col_idx => $cell_value ) { $table_header[ $col_idx ] = $cell_value; } return $table; }, 10, 3 ); add_filter( 'tablepress_cell_tag_attributes', function ( $tag_attributes, $table_id, $cell_content, $row_idx, $col_idx, $colspan_row, $rowspan_col ) { global $table_header; if ( $row_idx === 1 ) { return $tag_attributes; } $attribute_value = $table_header[ $col_idx - 1 ]; $tag_attributes += [ 'data-label' => $attribute_value ]; return $tag_attributes; }, 10, 7 );Thanks ❤️
The full code:
add_filter( 'tablepress_table_render_data', function ( $table, $orig_table, $render_options ) { global $table_header; foreach ( $table['data'][0] as $col_idx => $cell_value ) { $table_header[ $col_idx ] = $cell_value; } return $table; }, 10, 3 ); add_filter( 'tablepress_cell_tag_attributes', function ( $tag_attributes, $table_id, $cell_content, $row_idx, $col_idx, $colspan_row, $rowspan_col ) { global $table_header; if ( $row_idx === 1 ) { return $tag_attributes; } $attribute_value = $table_header[ $col_idx - 1 ]; return [ 'data-label' => $attribute_value ]; }, 10, 7 );- This reply was modified 3 years, 5 months ago by datverse.
Hi,
Got it!Thanks so much, love!
Hi, how can I get some variable array value in $table[‘data’] in ‘tablepress_cell_tag_attributes’ filter?
Thanks
Hi,
Thanks for your reply.Can you help me complete the code?
Love.
Hi, I found the hook to apply attribute to th/td
add_filter( 'tablepress_cell_tag_attributes', function ($tag_attributes, $table_id, $cell_content, $row_idx, $col_idx, $colspan_row, $rowspan_col) { $attribute_value = 'foo-value'; return [ 'data-foo' => $attribute_value ]; }, 10, 7 );But how can I get the value of the header cell(s) in header row?
Thanks
- This reply was modified 3 years, 5 months ago by datverse.
Forum: Plugins
In reply to: [Site Reviews] HoneypotAgree but I like Honeypot more than. Simple, easy and no “third api/link”
Thanks
Forum: Plugins
In reply to: [Site Reviews] HoneypotI found a plugin for do that. But it not work with your plugin. Hope mybe helping.
https://ww.wp.xz.cn/plugins/honeypot-for-wp-comment/
Thanks
Forum: Plugins
In reply to: [Site Reviews] HoneypotWow, I will waiting for this.
ThanksForum: Plugins
In reply to: [Site Reviews] HoneypotHi,
Thanks for your reply.Can I manage (add/edit) Honeypot by Hooks or something. It’s helpful if I can:
– Add more than one Honeypot to form.
– Edit ID, Name, Label Honeypot Fields.Because “spamer” be anti good more with 2 or more Honeypot Fields (With named: ID, Name, Label by “language”).
Thanks
Forum: Plugins
In reply to: [Polylang] Group Posts in Admin by TranslateHi, I found some php code change order of admin posts listing. But what I should add to orderby?
function set_custom_post_types_admin_order($wp_query) { if (is_admin()) { $post_type = $wp_query->query['post_type']; if ( $post_type == 'POST_TYPE') { $wp_query->set('orderby', 'what-is-it?'); $wp_query->set('order', 'ASC'); } } } add_filter('pre_get_posts', 'set_custom_post_types_admin_order');Forum: Plugins
In reply to: [Acclectic Media Organizer] Upload new item always to “Unassigned Items”The alert I got:
Cookie “selectedFolderCookieKey” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=None“ attribute to it. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSitemedia-organizer-main.js:453:36- This reply was modified 3 years, 7 months ago by datverse.
Forum: Plugins
In reply to: [WishSuite - Wishlist for WooCommerce] Elementor Editor not load frontend.cssHi, what your next release estimate date will fix this issue?
Thanks