This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Function remove_filter_x(): Remove filter/action defined by a callback function, a static or dynamic method from a class | |
* WP version >= 4.7 | |
* @author Xavier Birnie-Scott <xavierbirniescott@yahoo.fr> | |
* @version 1.0 [2020-12-18] Short version | |
* @see https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/ | |
* @see https://murviel-info-beziers.com/supprimer-filtre-action-methode-classe-wordpress/ | |
* @param array $args: [ | |
* 'hook' hook name, mandatory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fonctionality to alter wplink plugin, | |
* Adds new checkboxes to define rel attribute in <a> tag with noopener, noreferer, sponsored, nofollow and/or external values. | |
* Enqueue with admin_enqueue_scripts on post.php and post-new.php | |
* wp_enqueue_script( 'post-wplink', "/url/to/post-wplink.js", ['wplink'], $version, true ); | |
* wlink-open event occurs when Insert/edit link modal box opens | |
* wpLink.buildHtml function replaces the function from wplink.js | |
* The string translate.mark_as_string might be define with localize_script(), contains __( 'Mark as <code>%s</code>', $textdomain ); | |
* Values that may be added to the rel attribute are defined in the rels array. | |
* We push down the search terms div of shift=140 px and expand the modal height to 600 px. You may set these values to whatever you want. |