Jay
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: How to Escape Custom Function ParametersWrote this on my lunch break for ya, it’s been awhile since I’ve been on the forums but this should help. If you need to do something with the keys, you’ll probably want a foreach and to clone the
$filters
into a new modified version, but really without seeing what that array looks like I’ll be of little help.<?php function get_filter_list($ids, $filters, $selected_filters) { //some operation $ids = array_map( 'intval', $ids ); $selected_filters = array_map( 'intval', $selected_filters ); /* Assuming the following $filters = [ 123 => 'someValue' ]; */ $filters = array_map( 'esc_html', $filters ); return wp_json_encode( compact( 'ids', 'selected_filters', 'filters' ) ); } //function call get_filter_list($ids, $filters, $selected_filters);
Forum: Reviews
In reply to: [WooMinecraft-WP] Offline Mode Not SupportedI do not currently, nor will I ever, support cracked software or games. Thanks for your feedback.
Forum: Fixing WordPress
In reply to: organizing media center by daysTake a look at the upload_dir filter here – https://core.trac.www.ads-software.com/browser/tags/5.1.1/src/wp-includes/functions.php#L2087
It’s not a definitive answer but it’s a start.
Forum: Fixing WordPress
In reply to: Emailing page contents (ie shopping cart) from client to shop ownerLooks like you’re using WooCommerce – look into getting cart contents, this should get you started: https://stackoverflow.com/questions/28576667/get-cart-item-name-quantity-all-details-woocommerce
You can then use wp_mail() to send the email just making sure to fill in the necessary fields.
While I don’t know if it would solve your payment gateway issues, you could also take a look at WPDispensary – https://www.wpdispensary.com/
Forum: Reviews
In reply to: [Agy - Age verification for WooCommerce] WeirdHey @audiofeeline
Sorry about all this m8 – but Patrick has taken over the plugin at my discretion. The free version and my original code will always live here – https://github.com/jaywood/content-warning-v3 – you ( like others ) are welcome to download it and use it or even fork it for yourself.
It was my understanding that when Patrick took over it would be for development, not turning the plugin into a freemium model – but such is life I guess.
I’ll work on a new version soon – god speed!
Forum: Developing with WordPress
In reply to: Internationalization and child templateRegistering the text domain and then calling load_child_theme_textdomain() means it will load the textdomain from the ‘/languages’ folder of the child theme, if you follow the docs.
So, in your child theme’s lang files you’ll only need to include strings which are used in YOUR theme. If, however, you overwrite a parent-theme file/function, you’ll need to include those as well, and set them to your textdomain.
Forum: Fixing WordPress
In reply to: Calculate difference between 2 datesPretty sure this is built in, but give this one a go:
https://php.net/manual/en/function.date-diff.phpForum: Fixing WordPress
In reply to: Storing input from visitors into databaseA large portion of people use Gravity Forms just for this, especially since you can create the form yourself, it also stores entries in the db.
Forum: Developing with WordPress
In reply to: What function does render content to give back it to user?What you’re looking for I assume is the ‘the_content’ filter? https://codex.www.ads-software.com/Plugin_API/Filter_Reference/the_content
Forum: Developing with WordPress
In reply to: Missing rest-api.php file affecting wp-settings.phpThe rest-api.php file has been around since version 4.4.0 or so. If you’ve updated a plugin which now relies on the rest API, but failed to update WordPress, that could be the issue.
If your WordPress install is up to date, you may want to consider a fresh install of all the files.
Forum: Plugins
In reply to: [Agy - Age verification for WooCommerce] Specific pageClosing due to lack of response.
Forum: Plugins
In reply to: [Agy - Age verification for WooCommerce] Background opacity not workingTested on the latest version of WP, no bug exists.
If you want to submit your website URL for troubleshooting here – https://plugish.com/contact-me/ I can take a look.
Forum: Plugins
In reply to: [Agy - Age verification for WooCommerce] content warning v2 full screenIt should be possible with CSS yes. Off the top of my head I’m not sure which selector would be best though.
Forum: Plugins
In reply to: [Agy - Age verification for WooCommerce] Background opacity not workingThe BG Opacity setting is bugged. You can, however, use basic css to achieve this.
Forum: Developing with WordPress
In reply to: getting a correct link to an imageYour loop doesn’t look like a normal loop.
foreach ( $posts as $post ) ...
Should be:
while ( have_posts() ) { the_post(); }
Without using a proper loop, I’m pretty sure
the_post_thumbnail
will not work unless you have set the proper globals.More info on how to make a proper loop – https://codex.www.ads-software.com/The_Loop