Top Poster
#1 ramon fincken 401
#2 Site admin 3
#3 Ber|Art 2
#4 braddmark 1
#5 accentmedia 1
#6 Xarzu 1
#7 pEcosespedex 1
#8 khadish 1
#9 moxxx 1
#10 nistelrock 1

The time now is Tue Nov 24, 2020 9:56 am Forum Index
View unanswered posts
[WordPress] creating PHP patches for WordPress Make Core and setting it up
Author ramon fincken :: Posted: Fri Oct 30, 2020 8:40 am :: Category: CMS-ses (Joomla, WordPress, etc..)

Do you want to contribute your PHP skills to WordPress Core?

Use this manual to get started !

# For to make PHP patches Razz To make children happy

# Download
svn co wordpress_make
cd wordpress_make

# JS and CSS
npm install
npm run build
npm run dev

copy wp-config-sample.php to wp-config.php and edit accordingly (do not forget to create a new DB !)

# Install and do your coding

# PHP unit test

#WARNING: You might need to install an older version
sudo apt install phpunit
copy wp-tests-config-sample.php to wp-tests-config.php and edit accordingly (do not forget to create a *new* DB !)


# Patch and submit to trac
svn diff filename.php > filename.diff

[fix] How to add the clock seconds to ubuntu 20.04
Author ramon fincken :: Posted: Tue Aug 04, 2020 6:27 am :: Category: Ubuntu

sudo apt install dconf-editor

Then open dconf GUI

Search for "seconds" or go to /org/gnome/desktop/interface/clock-show-seconds


Related read:

[solution] htaccess rewrite to parent folder
Author ramon fincken :: Posted: Fri Dec 13, 2019 12:23 pm :: Category: PHP coding

when some idiot decides to put a whole site in a (dated) subfolder like


and you want to migrate to another host and set things strait ( meaning www/ ) you will end up with A LOT OF 404 urls

You need to create a 2018 folder and put this in your htaccess to redirect 301 all requests to the parent root folder

RewriteRule ^(.*)$ https://www.fulldomain.ext/$1 [R=301,L]

[chrome] re-add (unhide) www in address bar
Author ramon fincken :: Posted: Thu Oct 31, 2019 1:34 pm :: Category: Ubuntu


Omnibox UI Hide Steady-State URL Trivial Subdomains

to Disabled and restart to see the www. again.

[solution] composer "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Author ramon fincken :: Posted: Mon Sep 02, 2019 3:08 pm :: Category: Bash, perl, python and CLI linux

composer install

"continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

if it is NOT your PHP (when as zip); don't forget to update your composer!!
find . -type f -name '*.php' -exec php -l {} \; |grep -v "No syntax errors detected"

/usr/local/bin/composer self-update

[date] Find booking date overlap
Author ramon fincken :: Posted: Fri Jul 05, 2019 7:24 am :: Category: PHP coding
Tagged: , ,

Booking date checker: start & end = guest wish date.
Must NOT overlap with any known availability start-end periods.


start-end is exactly the same as non-availability start-end
start-end is within the range as non-availability start-end

start is within the range as non-availability start-end

end is within the range as non-availability start-end

[solution] WordPress a3 Lazy Load plugin Background image inline
Author ramon fincken :: Posted: Tue Jun 18, 2019 11:25 am :: Category: CMS-ses (Joomla, WordPress, etc..)

The WordPress a3 Lazy Load does not work for background images in HTML.

The lazy load javascript comes from

its readme shows this nice example:

steps to enable background image lazy loading for WordPress:

  • Download from into yourtheme/dist/js/
  • Use this in your theme functions.php file

    add_action( 'wp_enqueue_scripts',  'enqueue_javascripts' );

    function enqueue_javascripts() {
              $in_footer = true; // Overwrite any setting from a3 lazy loading
              wp_register_script( 'jquery-lazyloadxt-bg',
                  array( 'jquery', 'jquery-lazyloadxt', 'jquery-lazyloadxt-srcset', 'jquery-lazyloadxt-extend' ),
                  $in_footer );
              wp_enqueue_script( 'jquery-lazyloadxt-bg' );

  • Convert your background HTML element URL calls like:
    style="background-image: url(image_url.jpg)"



[wordpress][woocommerce] Get all order notes
Author ramon fincken :: Posted: Fri May 10, 2019 7:28 am :: Category: CMS-ses (Joomla, WordPress, etc..)

First remove the filter that does NOT allow to query the order_notes
remove_filter('comments_clauses', array( 'WC_Comments' ,'exclude_order_comments'), 10, 1 );

Now, get the comments
$comments = get_comments( [ 'post_id' => $wc_order->get_id(), 'comment_type' => 'order_note' ]);

@see class-wc-comments.php
    * Exclude order comments from queries and RSS.
    * This code should exclude shop_order comments from queries. Some queries (like the recent comments widget on the dashboard) are hardcoded.
    * and are not filtered, however, the code current_user_can( 'read_post', $comment->comment_post_ID ) should keep them safe since only admin and.
    * shop managers can view orders anyway.
    * The frontend view order pages get around this filter by using remove_filter('comments_clauses', array( 'WC_Comments' ,'exclude_order_comments'), 10, 1 );
    * @param  array $clauses A compacted array of comment query clauses.
    * @return array
   public static function exclude_order_comments( $clauses ) {
      $clauses['where'] .= ( $clauses['where'] ? ' AND ' : '' ) . " comment_type != 'order_note' ";
      return $clauses;

All times are GMT
Who is Online
Who is Online Our users have posted a total of 407 articles
We have 26 registered users
The newest registered user is MathewCow
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest   [ Administrator ]   [ Moderator ]
Most users ever online was 41 on Wed Sep 09, 2015 1:34 am
Registered Users: None
This data is based on users active over the past five minutes
Log in
Username:    Password:      Log me on automatically each visit    

New posts New posts    No new posts No new posts    Forum is locked Forum is locked
General forums
The world of freelance
Other projects
I love gifts

Yes goodies and presents! [3]
No but I love polls ! [1]

Related google ads