HIGHLY RECOMMENDED WEB HOSTING PROVIDER

PHP Auto Linker – Advanced Keyword Linking

PHP Auto Linker – Advanced Keyword Linking

LIVE PREVIEW

PHP Auto Linker – Advanced Keyword Linking

LIVE PREVIEW

Automatic Links - 1

PHP Auto Linker is a PHP class that lets you routinely apply hyperlinks on a HTML doc.

This class is already in use in different merchandise from our portfolio. In explicit, it’s adopted to use the automated hyperlinks in WordPress plugins with 1000’s of customers, like Interlinks Manager.

This class makes use of PHP common expressions to generate the hyperlinks from an inventory of key phrases and URLs supplied by the person.

It’s price noting that this class provides you whole management over the algorithm used to use the hyperlinks. Specifically, you possibly can configure a excessive variety of choices each on the class stage and on the computerized hyperlink stage to:

  • Limit the utmost variety of computerized hyperlinks to a particular quantity
  • Select between a case delicate or a case insensitive search of the key phrase
  • Add the Nofollow attribute on the hyperlink aspect
  • Set a customized title attribute on the hyperlink aspect
  • Open the hyperlinks in the identical tab or a brand new tab
  • Find solely the occurrences of the key phrase preceded or adopted by a particular string
  • Configure particular phrase boundaries primarily based on the actual context or language
  • Prioritize particular person key phrases over the others

We have additionally included different superior options for probably the most demanding customers. For instance, you possibly can:

  • Prevent the appliance of the automated hyperlink on particular HTML components
  • Improve the distribution of the automated hyperlinks with the “Random Prioritization” function
  • Prevent the appliance of the automated hyperlinks that concentrate on the present URL
  • Limit the utmost variety of computerized hyperlinks primarily based on the size of the supplied string
  • Limit the utmost variety of computerized hyperlinks that concentrate on the identical URL

How to make use of the category

The easiest utilization instance of the category:

require_once( 'inc/class-daext-computerized-hyperlinks.php' );
$automatic_links = new DaextAutomaticLinks();

echo $automatic_links->add_autolinks( '<p>Buy my e-book.</p>',
    [
        [
            'keyword' => "book",
            'url'     => "https://example.com/" 
        ]
    ]
);

The above instance will output:

<p>Buy my <a href="https://example.com/">book</a>.</p>

This different script makes use of superior choices to:

  • Open the generate hyperlinks on a brand new tab
  • Limit the variety of computerized hyperlinks to 2
  • Protect particular tags
require_once( 'inc/class-daext-computerized-hyperlinks.php' );
$automatic_links = new DaextAutomaticLinks();

$automatic_links->set_options(
    [
        'open_new_tab'         => true,
        'general_limit_amount' => 2,
        'protected_tags'       => [
            'h1',
            'h2',
            'h3',
            'h4',
            'h5',
            'h6',
            'strong',
            'pre',
            'code'
        ]
    ]
);

$article = '<h2>iPhone 14 vary</h2>';
$article .= '<p>The iPhone 14 is an apparent choose on our record.</p>';

echo $automatic_links->add_autolinks( $article,
    [
        [
            'keyword' => "iPhone 14",
            'url'     => "https://example.com/iphone-14/" 
        ]
    ]
);

The above instance will output:

<h2>iPhone 14 vary</h2><p>The <a goal="_blank" href="https://example.com/iphone-14/">iPhone 14</a> is an apparent choose on our record.</p>

Note that extra examples can be found within the class demo and the plugin guide.

Updates

15.03.2022 - v1.05
  - Improved documentation
14.03.2022 - v1.03
  - First launch

Do you care about your web site’s search engine optimization?

Improve your inner hyperlinks construction and get extra visits in your WordPress web site with the Interlinks Manager plugin.

Interlinks Manager plugin for WordPress

LIVE PREVIEWBUY FOR $39