Title: Replace Asset Source
Author: Jenn Lee
Published: <strong>28 Οκτωβρίου  2021</strong>
Last modified: 2 Νοεμβρίου  2022

---

Αναζήτηση πρόσθετων

![](https://ps.w.org/replace-third-party-asset-source/assets/banner-772x250.png?
rev=2628378)

Αυτό το πρόσθετο **δεν έχει δοκιμασθεί με τις 3 τελευταίες κύριες εκδόσεις του WordPress**.
Μπορεί να μην αναπτύσσεται ή να υποστηρίζεται άλλο και να έχει προβλήματα συμβατότητας
με τις πιο πρόσφατες εκδόσεις του WordPress.

![](https://ps.w.org/replace-third-party-asset-source/assets/icon-256x256.png?rev
=2621142)

# Replace Asset Source

 Από [Jenn Lee](https://profiles.wordpress.org/leej3nn20/)

[Λήψη](https://downloads.wordpress.org/plugin/replace-third-party-asset-source.1.3.1.zip)

 * [Λεπτομέρειες](https://el.wordpress.org/plugins/replace-third-party-asset-source/#description)
 * [Κριτικές](https://el.wordpress.org/plugins/replace-third-party-asset-source/#reviews)
 *  [Εγκατάσταση](https://el.wordpress.org/plugins/replace-third-party-asset-source/#installation)
 * [Ανάπτυξη](https://el.wordpress.org/plugins/replace-third-party-asset-source/#developers)

 [Υποστήριξη](https://wordpress.org/support/plugin/replace-third-party-asset-source/)

## Περιγραφή

Replace any plugin or theme asset source with your own desired source. Main purpose
is to help WordPress users to change the slow third party scripts or styles which
using by some plugins but slow load speed in certain countries.

Usually, you could use some coding skills to find the original enqueue method from
the target plugin, then dequeue it, and enqueue your own version of asset file. 
But you need to take care and follow the same way how the original plugin enqueued
and the dependency plus version. Otherwise, you might encounter some unexpected 
issues.

With the help of this plugin, you can easily replace the asset source file without
coding skills.

This plugin is not meant to auto local host the third party asset file, but you 
could use for it too. Upload your own local version of asset file in a better and
secured folder (maybe from your theme folder), get the public accessible url, use
it on the plugin setting page. Just try it out and have fun.

#### How It Works

Once a new replacement set, this plugin will do a match on all queued asset styles
and scripts source. If found the matching source, it will replaces target source
URL with your replacement URL.

This plugin is not going to dequeue the target asset and enqueue your replacement
asset. Issue might be happened if the new enqueue not follow the original plugin
or theme like missing dependency or version incorrect etc.

If the target asset url not using the standard WordPress enqueue script method by
the developer, the replacement will not works.

#### Use Case

There is a block in Malaysia since end of September 2021, which not allowed all 
local ISP network to access **maxcdn.bootstrapcdn.com**.

If there is a plugin in your site using the asset file hosted on **maxcdn.bootstrapcdn.
com**, the visitor from Malaysia will encounter super slow loading issue.

With the help of this plugin, you can easily replace this asset file url to maybe**
cdnjs.cloudflare.com** without disturbing the functionality of the original plugin.

**Tutorial for this use case:**

[Solve maxcdn bootstrapcdn problem in Malaysia](https://itchycode.com/use-replace-asset-source-wordpress-plugin-to-solve-maxcdn-bootstrapcdn-mcmc-blocked-issue-in-malaysia/)

## Στιγμιότυπα

[⌊Setting page.⌉⌊Setting page.⌉[

Setting page.

[⌊Inspect and get the target url you wish to replace.⌉⌊Inspect and get the target
url you wish to replace.⌉[

Inspect and get the target url you wish to replace.

[⌊Setup a replacement.⌉⌊Setup a replacement.⌉[

Setup a replacement.

[⌊After replacement, inspect again to check if it's working.⌉⌊After replacement,
inspect again to check if it's working.⌉[

After replacement, inspect again to check if it’s working.

## Εγκατάσταση

From within WordPress

 1. Visit **Plugins > Add New**
 2. Search for **Replace Asset Source**
 3. Click the **Install Now** button to install the plugin
 4. Click the **Activate** button to activate the plugin
 5. The setting page will be found at **Settings > Replace Asset Source**
 6. Follow the instructions in the setting page.

Manually

 1. Upload `replace-third-party-asset-source.php` to the `/wp-content/plugins/` directory
 2. **Activate** the plugin through the ‘Plugins’ menu in WordPress
 3. The setting page will be found at **Settings > Replace Asset Source**
 4. Follow the instructions in the setting page.

## Συχνές Ερωτήσεις

### How to find the Target Asset URL in my WordPress site?

You need to inspect your website HTML elements to get the correct url. Do not put
in the parameters. (Remove all values after `?` included the question mark)

### Will this plugin slow down my site?

No, there is no additional css or js loading in frontend. In backend, just some 
tiny css and js loaded in this plugin’s setting page.

### Can the replacement of asset url taking effect on WordPress Backend(wp-admin) too?

Yes, the replacement will be taking effect in wp-admin area too.

### Why my target asset not being replaced successfully?

Double check if your cache system cleared. Sometimes it could be the target asset
directly written and harcoded in the plugin or theme without using standard WordPress
enqueue way.

### What if I encounter difficulty when using this plugin and need help?

Welcome to open a [support topic](https://wordpress.org/support/plugin/replace-third-party-asset-source/).
Or you could shoot me an email at me@jenn.support.

## Κριτικές

![](https://secure.gravatar.com/avatar/de196a95b97811aff40a69751b1b29f84de7640052ab364731b8d89cf522fa29?
s=60&d=retro&r=g)

### 󠀁[works perfect for fontawesome](https://wordpress.org/support/topic/works-perfect-for-fontawesome/)󠁿

 [lfisch](https://profiles.wordpress.org/lfisch/) 18 Μαρτίου 2024

Thanks for this plugin! Works great for fontawesome which in germany and EU is critical
for its privacy laws because external requests always are a problem. so thanks for
this easy fix

![](https://secure.gravatar.com/avatar/67fec2a9f7fdc087c0da606afd4341739fcbc35f4912a3b3a0f16439c42900f5?
s=60&d=retro&r=g)

### 󠀁[Replacing Gmaps API](https://wordpress.org/support/topic/replacing-gmaps-api/)󠁿

 [811kunj](https://profiles.wordpress.org/811kunj/) 27 Οκτωβρίου 2022 1 απάντηση

I used for google maps API not even loading on my website and it worked perfectly.
thanks.

![](https://secure.gravatar.com/avatar/e25ed069cacef09c3b47877e49244d5fd9be55093f7d4bd385d71f3e098f6174?
s=60&d=retro&r=g)

### 󠀁[Easy to use](https://wordpress.org/support/topic/easy-to-use-4468/)󠁿

 [manjuhari](https://profiles.wordpress.org/manjuhari/) 14 Σεπτεμβρίου 2022

Easy to use. Solved the issue which I was struggling for a long time.

 [ Ανάγνωση όλων των 3 κριτικών ](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/)

## Συνεισφέροντες & Προγραμματιστές

“Replace Asset Source” είναι λογισμικό ανοιχτού κώδικα. Οι παρακάτω έχουν συνεισφέρει
στη δημιουργία του.

Συντελεστές

 *   [ Jenn Lee ](https://profiles.wordpress.org/leej3nn20/)

[Μεταφράστε το “Replace Asset Source” στην γλώσσα σας.](https://translate.wordpress.org/projects/wp-plugins/replace-third-party-asset-source)

### Ενδιαφέρεστε για την ανάπτυξη;

[Περιηγηθείτε στον κώδικα](https://plugins.trac.wordpress.org/browser/replace-third-party-asset-source/),
ανατρέξτε στο [αποθετήριο SVN](https://plugins.svn.wordpress.org/replace-third-party-asset-source/)
ή εγγραφείτε στο [αρχείο καταγραφής αλλαγών ανάπτυξης](https://plugins.trac.wordpress.org/log/replace-third-party-asset-source/)
μέσω [RSS](https://plugins.trac.wordpress.org/log/replace-third-party-asset-source/?limit=100&mode=stop_on_copy&format=rss).

## Σύνοψη αλλαγών

#### 1.3.1 2022-09-14

 * Fix: Trailing comma error in lower PHP version.

#### [1.3.0] 2022-03-21

 * Enhance matching target asset logic
 * Tested and working in Oxygen Builder
 * Change: Filter `rtpas_matched_styles` replaced by `rtpas_enqueue_matched_styles`
 * Change: Filter `rtpas_matched_scripts` replaced by `rtpas_enqueue_matched_scripts`
 * New: Filter `rtpas_matched_replacement`
 * New: Filter `rtpas_loader_matched_style`
 * New: Filter `rtpas_loader_matched_script`
 * Example of filter usage will be published in [my technical sharing blog](https://el.wordpress.org/plugins/replace-third-party-asset-source/itchycode.com?output_format=md)
 * Code refactoring

#### [1.2.0] 2022-03-18

 * Enhance matching target asset logic

#### [1.1.0] 2021-11-15

 * Provide filters for developer to dynamically adjust replacement list
 * Added `rtpas_matched_styles` to filter matched styles
 * Added `rtpas_matched_scripts` to filter matched scripts
 * Fixed undefined offset error

#### [1.0.2] 2021-11-07

 * Enhance to support replacement if the target source only registered but not queue

#### [1.0.1] 2021-10-28

 * Initial release.

## Μεταστοιχεία

 *  Version **1.3.1**
 *  Τελευταία ενημέρωση: **πριν από 4 έτη**
 *  Ενεργές εγκαταστάσεις: **40+**
 *  Έκδοση WordPress: ** 5.0.1 ή νεότερη **
 *  Δοκιμασμένο μέχρι: **6.1.10**
 *  Έκδοση PHP: ** 5.6 ή νεότερη **
 *  Language
 * [English (US)](https://wordpress.org/plugins/replace-third-party-asset-source/)
 * Ετικέτες:
 * [asset](https://el.wordpress.org/plugins/tags/asset/)[script](https://el.wordpress.org/plugins/tags/script/)
   [style](https://el.wordpress.org/plugins/tags/style/)
 *  [Σύνθετη Προβολή](https://el.wordpress.org/plugins/replace-third-party-asset-source/advanced/)

## Αξιολογήσεις

 5 out of 5 stars.

 *  [  3 5-star reviews     ](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/#new-post)

[Δείτε όλες τις κριτικές](https://wordpress.org/support/plugin/replace-third-party-asset-source/reviews/)

## Συντελεστές

 *   [ Jenn Lee ](https://profiles.wordpress.org/leej3nn20/)

## Υποστήριξη

Έχετε κάτι να πείτε; Χρειάζεστε βοήθεια;

 [Φόρουμ υποστήριξης](https://wordpress.org/support/plugin/replace-third-party-asset-source/)