Server IP : 192.64.118.117 / Your IP : 3.137.189.49 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/tcrgfinancesuite.com/wp-content/plugins/w3-total-cache/ |
Upload File : |
<?php namespace W3TC; /** * class Environment */ class Generic_AdminLinks { /** * Update plugin link * * @return void */ static public function link_update( $config ) { self::link_delete(); self::link_insert( $config ); } /** * Insert plugin link into Blogroll * * @return void */ static private function link_insert( $config ) { $support = $config->get_string( 'common.support' ); $matches = null; if ( $support != '' && preg_match( '~^link_category_(\d+)$~', $support, $matches ) ) { require_once ABSPATH . 'wp-admin/includes/bookmark.php'; wp_insert_link( array( 'link_url' => W3TC_LINK_URL, 'link_name' => W3TC_LINK_NAME, 'link_category' => array( (int) $matches[1] ), 'link_rel' => 'nofollow' ) ); } } /** * Deletes plugin link from Blogroll * * @return void */ static public function link_delete() { require_once ABSPATH . 'wp-admin/includes/bookmark.php'; $bookmarks = get_bookmarks(); $link_id = 0; foreach ( $bookmarks as $bookmark ) { if ( $bookmark->link_url == W3TC_LINK_URL ) { wp_delete_link( $bookmark->link_id ); } } } }