Jeffery To
Forum Replies Created
-
Forum: Plugins
In reply to: [PWA] apple startup imageiOS splash screens are not included in the web app manifest.
Forum: Plugins
In reply to: [PWA] apple startup imageDevice values ??must be entered as pt, not px.
No, that has nothing to do with it.
Forum: Plugins
In reply to: [PWA] apple startup imageYou continue to pass 10, 3 to add_filter, I’m not surprised your code doesn’t work. I suggest you read the documentation: https://developer.www.ads-software.com/reference/functions/add_filter/
I don’t understand this.
If you look at the code sample you keep posting, you keep doing this:
add_filter( 'apple_touch_startup_image', static function ( $images ) { ... }, 10, 3 );
The
10
you are passing toadd_filter
is the priority, and the3
is the number of arguments your function is expecting. But your function accepts one argument, not three. Either change it to1
or omit it entirely (1
is the default value).- This reply was modified 2 years, 10 months ago by Jeffery To. Reason: Formatting
Forum: Plugins
In reply to: [PWA] apple startup imageI guess this is something related to iOS.
iOS splash screens work, e.g. https://medium.com/appscope/adding-custom-ios-splash-screens-to-your-progressive-web-app-41a9b18bdca3
- This reply was modified 2 years, 10 months ago by Jeffery To. Reason: blockquote
Forum: Plugins
In reply to: [PWA] apple startup imageYou continue to pass
10, 3
toadd_filter
, I’m not surprised your code doesn’t work. I suggest you read the documentation: https://developer.www.ads-software.com/reference/functions/add_filter/Forum: Plugins
In reply to: [PWA] apple startup imageBTW each splash image must have the exact width and height for the device or else it will not be displayed. You most likely cannot rely on WordPress to resize the image for you.
Forum: Plugins
In reply to: [PWA] apple startup imageThe plugin generates the correct HTML, given the correct filter function. If it doesn’t work for you, that is a separate issue.
Forum: Plugins
In reply to: [PWA] apple startup imageAlso, the filter only takes 1 argument, so your
add_filter
call only needs to beadd_filter('apple_touch_startup_image', function ($images) {...})
(you included3
as a last argument, that tellsadd_filter
you expect 3 arguments for your function).Forum: Plugins
In reply to: [PWA] apple startup imageYour function overwrites
$for_retina_portrait
and$for_retina_landscape
multiple times, and only saves the last two toimages
. Also your function is declared with thestatic
keyword which I have only seen used for static class methods; I suggest removing the keyword.I am still not certain your code is resulting in the correct HTML being generated. Please include the generated HTML.
Forum: Plugins
In reply to: [PWA] apple startup imageIn your code sample, I believe you are targeting iPhone 13 / 13 Pro with the 1170×2532 image, but the iPhone 13 display has a scale factor of 3 (
-webkit-device-pixel-ratio: 3
).Is the plugin not generating the correct HTML, or you cannot see the startup image using (what should be) the correct HTML?
Forum: Plugins
In reply to: [W3 Total Cache] Independent Publisher CSS caching / minify questionsThe parent theme has multiple stylesheets that are dynamically enqueued (depending on site configuration), so I believe having the child theme depend on all of the parent theme’s stylesheets would be problematic… For now at least I can have my child theme stylesheet be included last by passing a lower priority to
add_action()
. (This isn’t my issue with W3TC though.)So is there any way I can have the customizer stylesheet minified and cached? Is it by design that (using auto mode at least) references to admin-ajax.php are excluded, or are there technical limitations that prevent this from being possible?
Thanks again ??
Forum: Plugins
In reply to: [W3 Total Cache] Independent Publisher CSS caching / minify questionsThanks for your reply ??
-
From the name of that field (“Include external files/libraries”) and the fact that it had “https://ajax.googleapis.com” by default, I originally thought it was only for JS files. (Also, as there are separate “never minify” fields for JS and CSS, I would have expected separate fields for “include external” as well.)
Entering the entire stylesheet URL (https://example.com/wp-admin/admin-ajax.php?action=independent_publisher_customizer_css&ver=1.7) doesn’t appear to work, but entering the URL without the second query string parameter (https://example.com/wp-admin/admin-ajax.php?action=independent_publisher_customizer_css) or without the whole query string (https://example.com/wp-admin/admin-ajax.php) appears to work. (So I would guess this part of the code has issues dealing with the ampersand character.)
But, looking at the minified stylesheet, the customizer CSS isn’t included ?? (Perhaps the plugin cannot access this URL, or maybe all wp-admin URLs? Maybe that’s why this stylesheet wasn’t automatically minified in the first place.)
- I did include the customizer CSS ID as a dependency, but because a) the parent theme doesn’t have dependencies set up between different stylesheets (instead relying on enqueue order only, probably because which stylesheets are enqueued is dynamic), and b) child theme functions.php is processed before the parent theme functions.php, what ended up happening was, the customizer CSS was output first, then my child theme stylesheet, then the parent theme stylesheets. So relying on dependency resolution was not enough to ensure the correct stylesheet order.
Thanks again for the suggestion ??
Forum: Plugins
In reply to: [Polylang] get_wpseo_options_arr() deprecated since WPSEO 1.5.0Thanks!