Templatera is template manager for the page builder WPBakery. With this add-on, you can create, manage and set control access to your templates. I came accross two use cases when using templates with WPBakery: – as an include, meaning inserting a set of rows that repeats on several pages of your site like for example […]
read moreNEWS
S’amuser à faire des éclairs en JS en utilisant le bruit simplex (simplex noise qui sonne quand même bien mieux en anglais) . Voir l’animation
read moreWhen building with Parcel, all the files are bundled and share the same root folder: dist |- index.html |- index.5243.css |- index.5243.css.map |- index.5243.js |- index.5243.js.map Fortunately, the plugin parcel-plugin-custom-dist-structure lets you generate the structure you want for you build. Once installed, you just have to configure the plugin settings in package.json. For example: “customDistStructure”: […]
read moreI had a hard time finding how to add custom field to admin search under woocommerce > members list. The woocommerce membership plugin is in fact using the ‘posts_clauses’ filter to filter the search result. So to add custom fields, here is the code I use : function advanced_admin_custom_search($pieces, WP_Query $wp_query) { global $wpdb; […]
read moreTo update field link, we have to use an array : <?php $site = array( ‘title’ => $my_title, ‘url’ => $my_url, ‘target’ => “_blank”, ); update_field(‘site’, $site, ‘user_’ . $user_id); ?>
read moreIt is WooCommerce default behaviour to scroll to the top of the checkout or the cart form after an errored checkout submit. I had a case where the auto scroll didn’t scroll to the right position so the errors were always hidden. The auto scroll code is located in the file woocommerce.js, here what I […]
read moreI recently tried to use screen options for a wordpress backend plugin. I wanted to use a per page variable to be able to easily manage a number of users to request. I first init the screen options : add_action(‘my_plugin_slug’, array( $this, ‘screen_set_option’)); function screen_set_option() { add_screen_option(‘per_page’, array( ‘default’=>10, […]
read moreGet membership object from user id function get_membership($user_id) { return wc_memberships()->get_user_memberships_instance()->get_user_memberships( $user_id )[0] ??null; } Get member id from user id function get_member_id($user_id) { if (get_membership($user_id)) return get_membership($user_id)->get_id(); else return null; } Get subscription id from member id function get_subscription_id($member_id) { $subscription_id = get_post_meta( $member_id, ‘_subscription_id’, true ); return $subscription_id; } […]
read moreCinquante mille développeurs répartis dans le monde entier ont répondu à l’enquête de Stackoverflow, un vrai baromètre des tendances de l’état actuel de la programmation informatique, retrouvez l’étude ici : http://stackoverflow.com/research/developer-survey-2016. On y trouve beaucoup de chiffres intéressants : 69,1% des développeurs sont autodidactes, l’âge moyen est 29,6 ans (en France 29,1) le framework qui monte est React js, […]
read moreFor those who needs to use cs6 on OS X Sierra like me who had to work an old flash project written in as2, you can use Java 8 instead of Java 6 recommended by the software. I tried at first to use Flash cs6 with Java 6 and I got memory errors publishing the file, errors […]
read more