Forum Replies Created

Viewing 15 replies - 1 through 15 (of 45 total)
  • This is a way past due feature in 2021.

    Right now we either have to use a custom admin.css that often has to force styles with !important, or use a plug-in that annoyingly alerts us constantly. Yeah, there are browser plug-ins like Dark Reader, but then you have to turn it on for admin, turn it off when you view the site itself. It’s just aggravating.

    I’m honestly not sure who enjoys blinding themselves with white backgrounds to begin with. It’s why we use dark themes when coding and why OSs and apps finally started providing dark theme options.

    Thread Starter liquidRock

    (@liquidrock)

    Thanks @bcworkz

    Yeah, I figured it would be complicated to sort the column this way, but not sure how else to accomplish it. I don’t know SQL at all. I’m wondering if there’s some way to append an incremental data-attribute using a counter and sort by that, although not sure if it’s possible to apply the sort once all the tables have been populated and that attribute created. idk. I might just have to wait until I can hire someone to do this properly.

    As for the document icons, I don’t get errors from the core media folder images, I’m replacing them with custom images.

    Here is the code I’m using.

    
    add_filter( 'wp_mime_type_icon', function( $icon, $mime, $post_id )
    {
        if( 'text/plain' === $mime && $post_id > 0 )
            $icon = get_template_directory_uri() . '/library/images/icons/txt.png';
    	
        if( 'application/pdf' === $mime && $post_id > 0 )
            $icon = get_template_directory_uri() . '/library/images/icons/pdf.png';
    	
        return $icon;
    }, 10, 3 );

    `

    The above code works fine if you view the Media Library in grid mode. There are no errors and the custom images load for the documents. However, view in list mode, it throws errors, looks for the image in the core folder, and no image is loaded at all.

    Thread Starter liquidRock

    (@liquidrock)

    I managed to solve the first 3 problems by filtering wp_get_attachment_image_attributes finding the src array key and then modifying it and returning the $attr.

    Still would love to know how to sort a column the way I proposed in point 4.

    Thread Starter liquidRock

    (@liquidrock)

    For some reason I can’t edit this post, but besides modifying the src for the images mentioned above (points 1 and 2), I would also like to add a class to them.

    Thread Starter liquidRock

    (@liquidrock)

    I tried those settings for minifying CSS. It may just be my file. Not a huge deal. I can just minify it myself manually to ensure it works. The caching of CSS works just fine.

    As for the Headers, I think you misunderstood, so I’ll clarify:

    I have mod_expires directives set in Apache includes. This works fine across all domains on my server. However, your plugin overrides what I want set, AND WordPress Core seems to override the max-age for type text/html and sets the HTML file date to January 11 1984, forcing the browser to keep fetching the html even if it hasn’t changed and is cached by W3TC.

    Inspecting headers for HTML gives the following with or without W3 TC activated:

    cache-control: no-cache, must-revalidate, max-age=0
    expires: Wed, 11 Jan 1984 05:00:00 GMT

    This is forcing HTML files not to cache in the browser even with your plugin active. I thought you guys might know how to stop WordPress from doing this.

    I’m also curious if W3TC can use MY expires time for HMTL, CSS, JS and fonts or not override them as there’s no reason toβ€”i.e maybe it would be nice to have an option for users to NOT set a new expires time via checkboxes for those common file types: β€’ use existing expires for CSS. I want them set to 6 months or 1 year, because I have versioning setup with my enqueued CSS files based on file modification date so that if I update them the browser will automatically dump the cached version and download the new one as WordPress enqueue will tack on a new version and it will appear as a new file.

    CSS versioning example:
    /library/css/style.css?ver=1634718926

    The primary thing is HTML though. Seems wasteful to have users keep downloading the HTML unnecessarily if no new posts have been published and no changes to templates have been made, especially for mobile users where speed can be less than desirable.

    Hope this makes more sense. Thanks

    Thread Starter liquidRock

    (@liquidrock)

    Yep, it’s checked now.

    No problem. Thanks for being on top of this. much appreciated.

    • This reply was modified 4 years, 10 months ago by liquidRock.
    Thread Starter liquidRock

    (@liquidrock)

    Will do. Can’t access my server right now but will test it as soon as I can.

    Also, 1 note: It seems that PHP-FPM is also installed on my server. The techs said that the way it’s configured, the server chooses whether to use FPM or FCGI (whatever is faster for a given task). I tested disabling FPM in case it was conflicting with the plug-in, but it didn’t make any difference.

    Will keep you posted on the test.

    Thread Starter liquidRock

    (@liquidrock)

    Here’s the output:

    Array
    (
        [opcache.enable] => 1
        [opcache.validate_timestamps] => 1
        [opcache_reset] => 1
    )
    
    Thread Starter liquidRock

    (@liquidrock)

    Sure thing. I’ll let you know what I find. Thanks for the continued help with this.

    Thread Starter liquidRock

    (@liquidrock)

    Well, good news. ContactFormX still works πŸ™‚

    If anyone else is interested who uses WHM/Cpanel, search for “Firewall” in the sidebar and you’ll see “ConfigServer Security & Firewall”. Once there you can run a test with “Check Server Security” button for suggestions.

    For this, scroll down and click “Firewall Configuration,” which gives you a GUI for all settings. Search for “SMTP_BLOCK”.

    I used the following settings:

    SMTP_BLOCK = On
    SMTP_ALLOWLOCAL = Off
    SMTP_REDIRECT = Off

    After making these changes make sure to scroll aaaaaaall the way to the bottom and click the “Change” button, or nothing will be applied. Learned that the hard way. It’s easy to miss and the page is a mile long.

    On may be 1 and Off may be 0 if you’re using SSH or something, but I used the GUI. My normal email still works (I have it setup as IMAP with SSL) and ContactFormX worked on my WordPress installs just fine and the email came through instantly.

    • This reply was modified 4 years, 10 months ago by liquidRock.
    Thread Starter liquidRock

    (@liquidrock)

    Okay, I’ll try it. Might try with CSF SMTP_BLOCK. Was reading today and that was suggested over the WHM settings. Will try both if I have time.

    Will report back. Thanks for reply

    Thread Starter liquidRock

    (@liquidrock)

    Any update regarding this?

    This plug-in works for me, but I’m using a custom theme.

    I’d also like to know if there is an alternative since the author has not been updating it.

    Thread Starter liquidRock

    (@liquidrock)

    They said they installed mod_fcgid and changed the PHP handler to FCGI for PHP 7.4.

    They also confirmed that they rebooted all systems even before I rebooted the entire server to make sure the changes took effect.

    Also, my server is setup to use PHP 7.4 for everything. That’s the only version available regardless of the domain.

    Thread Starter liquidRock

    (@liquidrock)

    Here is the text from php.ini

    
    [Opcache]
    opcache.enable = 1
    opcache.max_accelerated_files = 10000
    opcache.validate_timestamps = 1
    opcache.memory_consumption = 128
    
Viewing 15 replies - 1 through 15 (of 45 total)