Title: Pratham's Replies | WordPress.org

---

# Pratham

  [  ](https://wordpress.org/support/users/pratham2003/)

 *   [Profile](https://wordpress.org/support/users/pratham2003/)
 *   [Topics Started](https://wordpress.org/support/users/pratham2003/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pratham2003/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pratham2003/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pratham2003/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pratham2003/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pratham2003/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/users/pratham2003/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/pratham2003/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/pratham2003/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/pratham2003/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Internal Link Juicer: SEO Auto Linker for WordPress] Link the longer keywords (by characters) first](https://wordpress.org/support/topic/link-the-longer-keywords-by-characters-first/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/link-the-longer-keywords-by-characters-first/#post-17101762)
 * `getRules` only works within a set of keywords for a given target but not on 
   the list of all keywords across all the targets/rules. This was coincidentally
   working earlier because of the order in which I had added the keywords across
   different targets/articles.
   I made another change in the following file to sort
   the whole ruleset array on the basis of keyword/pattern length in descending 
   order for my own personal purpose.File: `wp-content\plugins\internal-links-premium\
   core\indexstrategy\indexstrategy.php`
 *     ```wp-block-code
           /**
            * Sorts the ruleset by pattern length
            *
            * @param  object $a
            * @param  object $b
            * @return int
            */
           private function sortByPatternLength($a, $b) {
               return strlen($b->pattern) - strlen($a->pattern);
           }
       ```
   
 *     ```wp-block-code
           public function setLinkRules($link_rules)
           {
               $this->link_rules = $link_rules;
       +       usort($this->link_rules->ruleset, array($this, "sortByPatternLength"));
           }
       ```
   
 * I have not seen any side-effects so far, please let me know if your team anticipates
   any critical issues with this kind of approach.
 * If these features/controls can be built into the plugin later, it would be great.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Internal Link Juicer: SEO Auto Linker for WordPress] 4000+ keywords, indexer in infinite loop?](https://wordpress.org/support/topic/4000-keywords-indexer-in-infinite-loop/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/4000-keywords-indexer-in-infinite-loop/#post-17097023)
 * Thanks, that makes sense, I’ll look around. I have got the premium version now
   for custom links support.
    -  This reply was modified 2 years, 10 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Internal Link Juicer: SEO Auto Linker for WordPress] 4000+ keywords, indexer in infinite loop?](https://wordpress.org/support/topic/4000-keywords-indexer-in-infinite-loop/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/4000-keywords-indexer-in-infinite-loop/#post-17089876)
 * > In the free version, using the automatic mode. if you add the keywords thru
   > the import function or the post editor, the index build will automatically 
   > rebuild the index, this rebuilds only for that specific post, if you update
   > the keyword it will scan other posts for anchor match, if you update the content
   > it will find matches for keywords from the other posts, it won’t do a full 
   > index rebuild, until you change the ILJ settings or manually trigger it.
 * I want to programmatically add the keywords to a post and trigger the incremental
   indexer on that post, maybe using PHP if possible or using CLI, is that possible
   in some way? I am assuming internally the plugin might be using a `post_save`
   hook to trigger the incremental indexer for whichever post was updated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Internal Link Juicer: SEO Auto Linker for WordPress] Link the longer keywords (by characters) first](https://wordpress.org/support/topic/link-the-longer-keywords-by-characters-first/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/link-the-longer-keywords-by-characters-first/#post-17089827)
 * > I see, does these keywords 1->3 are set in one post? or are they set in different
   > posts? one post for each keyword?
 * Set in different posts.
 * > Currently, the setting [https://i.imgur.com/zkzPCGO.png](https://i.imgur.com/zkzPCGO.png)
   > only sort the keywords per post, and not globally, so when the keywords 1->
   > 3 are only set in Post A, then it should link from “Currency Exchange”, but
   > if the keywords are set on different posts, it is currently a limitation of
   > the plugin.
 * Exactly, when I initially read the setting, it was not apparent that the setting
   was not global until I tried it out against this particular case of keywords 
   in different articles.
 * > I see you have tried to change the code, however, this part is only for outputting
   > links generated from the link index table. It may seem to have fixed the issue
   > in your case, but to avoid any conflicts with the index generation process,
   > the keyword order should be resolved in the functions where we build our links.
   > Currently, the global keyword priority is a current limitation of our plugin,
   > but we have that on our pipeline for future implementations, we just can give
   > any specific dates for this yet.
 * That’s ok for us for the time being; but from your plugin’s perspective the plugin
   needs to give flexibility and meet some standards. A WP filter hook that allows
   devs to modify the array of keywords found for a specific post before they are
   used by the interlink process (e.g. allow devs to re-order it, or modify it) 
   might help.
 * This seems like a plugin that I can recommend to others for performance reasons
   🙂 … I had used SEO Smart Links in the past (years ago) and was aware of it’s
   performance limitations with a large set of keywords. I had the same thought 
   of creating an index to find which words are found in the current article that
   can be linked to greatly reduce the number of search & replace actions the plugin
   has to do for a given article on-the-fly.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Internal Link Juicer: SEO Auto Linker for WordPress] 4000+ keywords, indexer in infinite loop?](https://wordpress.org/support/topic/4000-keywords-indexer-in-infinite-loop/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/4000-keywords-indexer-in-infinite-loop/#post-17084593)
 * Oh ok, I noticed that the indexer had completed today morning on my local environment
   and replaced the tables.
 * Does the WP CLI-based indexer work in a different or more-efficient way in the
   pro version?
 * For reference, let’s say we have CPT A and CPT B.
   CPT A has no textual content(
   4.5k~). CPT B has textual content (3.5k~). We wanted to link keywords from CPT
   B to CPT A. CPT A to CPT B doesn’t happen because CPT A has no textual content/
   keywords to link back.
 * > Did you trigger it thru the dashboard rebuild button?
 * ^ Yes. While I think this might be ok for testing, but it would not be good to
   run the full indexer everytime/everyday when new content is added? Is there a
   way to programmatically add keywords and trigger indexer for specific (affected)
   posts only in the pro version?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Web Stories] Read First: Google Analytics 4 Support](https://wordpress.org/support/topic/read-first-google-analytics-4-support/)
 *  [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/read-first-google-analytics-4-support/#post-16998258)
 * It looks like the plugin has switched to [amp-story-auto-analytics](https://amp.dev/documentation/components/amp-story-auto-analytics)
   without giving the user an option. How do we add custom events?
   `print_amp_analytics_tag`
   is no longer in use in the new version due to which `web_stories_analytics_configuration`
   filter hook is no longer working.
    -  This reply was modified 2 years, 11 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
    -  This reply was modified 2 years, 11 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack Boost - Website Speed, Performance and Critical CSS] Certain pages are skipped for unknown reason from critical CSS](https://wordpress.org/support/topic/certain-pages-are-skipped-for-unknown-reason-from-critical-css/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/certain-pages-are-skipped-for-unknown-reason-from-critical-css/#post-16780311)
 * I checked a little more, found out it is affected by `successRatio` and `MAX_SUCCESS_URLS`/`
   MIN_SUCCESS_URLS` in the file `/app/lib/critical-css/source-providers/providers/
   Singular_Post_Provider.php`
 * Edit: Can a filter hook be provided to modify the success ratio?
    -  This reply was modified 3 years, 2 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Jetpack Boost - Website Speed, Performance and Critical CSS] Failed to construct ‘URL’: Invalid URL](https://wordpress.org/support/topic/failed-to-construct-url-invalid-url/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/failed-to-construct-url-invalid-url/#post-16388791)
 * I have shared the information on [https://jetpackme.wordpress.com/contact-support/](https://jetpackme.wordpress.com/contact-support/)
   and given a reference back to this topic.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Permalinks] performance issue on large database](https://wordpress.org/support/topic/performance-issue-on-large-database/)
 *  [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/performance-issue-on-large-database/#post-15355216)
 * I support this idea.
    Take away: Use a custom table when it gives performance
   benefits.
 * Don’t fall into the trap of preferring standard tables because your or one of
   the other plugin bloats up the options/postmeta table and the entire website 
   becomes slow.
 * Ref on similar issues: [https://core.trac.wordpress.org/ticket/14558](https://core.trac.wordpress.org/ticket/14558)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Lazy Load for Videos] Does it support autoplay when get into the view point?](https://wordpress.org/support/topic/does-it-support-autoplay-when-get-into-the-view-point/)
 *  [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/does-it-support-autoplay-when-get-into-the-view-point/#post-15319048)
 * Would like this feature as well. I couldn’t see this happening on a mobile phone
   as mobile phones have different autoplay requirements than a desktop. Is there
   a way for you to use JS, wait for the video embed to finish loading, and then
   programmatically play it?
 * Most likely it is about the youtube video receiving a user-initiated click event
   but that might not be technically possible with youtube embeds. 🤔
 * Ref:
    [https://developers.google.com/web/updates/2016/07/autoplay](https://developers.google.com/web/updates/2016/07/autoplay)
   [https://support.google.com/youtube/answer/6327615?hl=en](https://support.google.com/youtube/answer/6327615?hl=en)
    -  This reply was modified 4 years, 6 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Making Redirection plugin work in a custom script which uses wp-load.php](https://wordpress.org/support/topic/making-redirection-plugin-work-in-a-custom-script-which-uses-wp-load-php/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [5 years ago](https://wordpress.org/support/topic/making-redirection-plugin-work-in-a-custom-script-which-uses-wp-load-php/#post-14740284)
 * Actually, please ignore, this already works. There might have been some mistake
   while testing from our side.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Does W3TC clear object cache automatically when a scheduled post gets published?](https://wordpress.org/support/topic/does-w3tc-clear-object-cache-automatically-when-a-scheduled-post-gets-published/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [5 years ago](https://wordpress.org/support/topic/does-w3tc-clear-object-cache-automatically-when-a-scheduled-post-gets-published/#post-14708698)
 * [@vmarko](https://wordpress.org/support/users/vmarko/) Please let us know if 
   you were able to test and confirm this.
    This has been working perfectly at our
   side so far.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Does W3TC clear object cache automatically when a scheduled post gets published?](https://wordpress.org/support/topic/does-w3tc-clear-object-cache-automatically-when-a-scheduled-post-gets-published/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/does-w3tc-clear-object-cache-automatically-when-a-scheduled-post-gets-published/#post-14494243)
 * Hi Marko,
 * Can you please confirm if you tried this with Redis-based object cache or file-
   based object cache? I wanted to rule out any differences there.
 * The use case at our end is that these are flash sales with 100+ people waiting
   to buy the product. Even that 1-2 minutes of page-specific downtime where the
   URL appears broken and the product is not eligible to be in the cart is a major
   issue (suspecting due to difference in post_status stored in object cache & DB?).
 * On my side, the following code seems to be resolving this issue.
    It clears the
   W3TC object cache when a product transitions from the future to publish status.
 *     ```
       function purge_object_cache_on_future_to_publish( $new, $old, $post ) {
           if ( $post->post_type == 'product' && $new == 'publish' && $old == 'future' ) {
       		if(function_exists('w3tc_objectcache_flush')) {
       			w3tc_objectcache_flush();
       		}
       	}
       }
       add_action( 'transition_post_status', 'purge_object_cache_on_future_to_publish', 10, 3 );
       ```
   
    -  This reply was modified 5 years, 2 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
    -  This reply was modified 5 years, 2 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
    -  This reply was modified 5 years, 2 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Autoptimize] autoptimize_fitler_css_preload_and_print bug?](https://wordpress.org/support/topic/autoptimize_fitler_css_preload_and_print-bug/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/autoptimize_fitler_css_preload_and_print-bug/#post-14350430)
 * Hmm I think I’m just using this in the wrong way. edit: but please see the CSS
   links, the one being preloaded does not match the one being applied later.
 * edit 2: I think we are missing a filter that allows us to modify the output.
   
   This part of the output specifically. `<link rel='stylesheet' id='elementor-post-
   5-css' href='https://example.test/wp-content/cache/autoptimize/css/autoptimize_single_310a89fd1e8dc24a98b01a7ed7500698.
   css?ver=1616678114' media='print' onload="this.onload=null;this.setAttribute('
   data-loaded', '1');" />`
    -  This reply was modified 5 years, 3 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
    -  This reply was modified 5 years, 3 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] How to set a lower browser cache time than page cache time?](https://wordpress.org/support/topic/how-to-set-a-lower-browser-cache-time-than-page-cache-time/)
 *  Thread Starter [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/how-to-set-a-lower-browser-cache-time-than-page-cache-time/#post-14059166)
 * I was browsing through the plugin code and noticed that the Page Cache Lifetime
   setting is only enabled for PageCache File (Basic).
 * Is it discussed / documented any where why it is like this?
    At this point I 
   have switched to PageCache basic but looking for some technical understanding
   on why PageCache File Enhanced mode has no pagecache lifetime setting (why does
   it default to 3600 seconds)?

Viewing 15 replies - 1 through 15 (of 55 total)

1 [2](https://wordpress.org/support/users/pratham2003/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/pratham2003/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/pratham2003/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/pratham2003/replies/page/2/?output_format=md)