Forum Replies Created

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter AndreiD

    (@andreiro37)

    I have a custom edit profile page with a form.
    I have
    – 1 upload image field
    – 1 upload video field
    and other felds like name, age ..

    When user click Update i need to get the values of those 2 fields to update them in database in custom user meta and is not obvious how to do it.

    2 shortcodes for these 2 fields look similar, arent differentiated by an id or something. Also, if a use add_filter how i identify between those 2 upload fileds (photo and video) to update their values in database for user cystom meta?

    Thread Starter AndreiD

    (@andreiro37)

    Hi, there is any chance to fix it? In which file should i edit the php code? Thanks

    Thread Starter AndreiD

    (@andreiro37)

    Probably is added by a JS code. I have tried after wp_load hook and is the same.

    Thanks for help!

    Thread Starter AndreiD

    (@andreiro37)

    I tried but the same result. New lines are eliminated, but there is a section in the footer where the function is not applied.

    The problem seems to be that those comments are not processed by the Autoptimize or my function (as you suggested). This comments appear due a setting on a slider plugin to put its JS code in the footer and i think its hook runs after your plugin.

    All the lines are eliminated until i get this.

    <script type='text/javascript'>
    /* <![CDATA[ */
    var ATTR = {"enable":"enable","width":"80","height":"45"};
    /* ]]> */
    </script>

    There is a way/hook to scan and preg replace the entire source code after the entire code is loaded? I have set the priority in the add_filter to 999, but no luck.

    Thread Starter AndreiD

    (@andreiro37)

    I have to improve the score for a client.
    If i remove the comments, JS is broken.
    If i let the comments untouched, Google PageSpeed doesnt still says that i need to minify HTML because of spaces, new lines, \r\n from the comments.

    I have to let the comments on page’s source, but get rid of new lines. Probably i have to write my own plugin and explore regex in depth.

    Thread Starter AndreiD

    (@andreiro37)

    Ok, thanks, solved with JS before closing head.
    Async to JS from head doesnt display the content, so i let it without async attribute.

    1. For HTML minify, it will be useful to minify all comments, instead removing. If i let comments, page doesnt pass Google Speed test. If i remove comments, some JS doesnt work. So an option will be to minify the comments instead removing or letting as they are.

    2. Combining CSS breaks the layout. For example,Wordpress Fastest Cache doesnt break it, but it creates 2-3 files instead a single one.

    BTW, very useful plugin.

    Thread Starter AndreiD

    (@andreiro37)

    I have moved manually into header.php and now it works. But only if media=all, not with media=screen.

Viewing 7 replies - 16 through 22 (of 22 total)