Is there a way to remove the dlm-version meta tag in the HTML head please?
I.e. <meta name="dlm-version" content="4.7.78">
When I look into the plugin’s code, I can only find the following:
// Add meta tags to head for DLM Version
add_action( 'wp_head', function () {
echo '<meta name="dlm-version" content="' . esc_attr( DLM_VERSION ) . '">';
}, 1 );
However, I can’t find a filter to remove it with the remove_action
filter.
What’s the point of printing the plugin’s version in the source code anyway?
]]>I’m working on a project that requires an event calendar and I’m testing your plugin for the development of this project and I came across the following problem. The plugin adds two speaker categories automatically in English and when translating to Portuguese and loading the page the plugin generates the speaker and organizer categories again. I understand that I can translate into a certain chosen language with the Polylang and Polylang Theme plugins, but there is no need to install two plugins just to translate four strings since the project will not have other languages so I would like to know how can I remove this action to have the name and slug in our language? I’ve tried to remove it in several ways and I couldn’t, the only way I managed so far was commenting line 39 of the file wp-event-solution/core/speaker/hooks.php //add_action( ‘init’, [$this, ‘ add_default_speaker_categories’], 99999 ); but this is not a good practice as it will be undone when the plugin is updated. So how can I do this via the theme function?
Sincerely,
Gilvanilson Santos
I’ve been trying to build on top of the single.php template with an if loop that uses
attachment.php when directed from permalink with media attached, which then uses content_none.php to display get_search_form()
.
I’ve tried to remove get_search_form()
and related <h2>
,<p>
tags from the body of an attachment.php with an if/ else statement, which only displays if loop and the "Nothing Found... It seems we can't find what you're looking for. Perhaps searching can help."
<p>
tag and search form or just the if loop and no single.php template.
The single.php template is important because it is being used to display the media attachment (audio, video, and images) above the if loop I mentioned above.
I’ve also tried to remove_action( 'wp_body_open', get_search_form() );
in an if loop, however that gives me duplicate get_search_form… which lead in search for an Exs-News wp_body_open
hook, which I am unable to find under parent theme (Exs).
Is there a exs-news body hook?
or is another way to remove content_none.php get_search_form() and related elements?
Current order:
Contact Info
Account Management
Application Passwords
RankMath
Custom Fields
Preferred order:
Contact Info
Account Management
Application Passwords
Custom Fields
RankMath
I wonder if its possible to edit the hook/action you are using to insert the meta boxes to a priority that would place it after the custom fields.
Thanks
]]>remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
it hides all variation information. How can I remove just the add to cart button and the quantity picker without removing all of the variation information that follows?
]]>but on dokan pro there are problem (not get the function on class):
remove_action( ‘dokan_product_edit_after_inventory_variants’, array( ‘WeDevs\DokanPro\Products’, ‘load_shipping_tax_content’ ), 10);
the concept is the same, why doesn’t it work on PRO?
]]>here the Plugin-one code
/* Start admin notices on */
function display_admin_notice() {
?>
<div class =”notice notice-success is-dismissible”><p>Congratulatios! it seems you have a nice success notice</p></div>
<div class = “notice notice-error”><p>What a nice error message</p> </div>
<div class = “notice notice-warning”><p>WARNING!!! site about to blow up in pieces</p></div>
<div class = “notice notice-info is-dismissible”><p>INFO – you must renew license</p></div>
<?php
}
add_action( ‘admin_notices’, ‘display_admin_notice’ );
/* Stop admin notices on */`
it works perfectly.
Now I have another plugin that hides ALL notifications
/* Start Block ALL admin notices */
add_action('admin_enqueue_scripts', 'block_dismissable_admin_notices');
add_action('login_enqueue_scripts', 'block_dismissable_admin_notices');
function block_dismissable_admin_notices() {
echo '<style>.wp-core-ui .notice{ display: none !important; }</style>';
}
/* Stop Block ALL admin notices */`
it works fine too
BUT I need to REMOVE the action from the first Plugin, NOT to hide all notifications, I mean, is there a way to get the
add_action( 'admin_notices', 'display_admin_notice'
from the first Plugin and remove_action so the Plugin hides/block ONLY the admin_notices from THAT plugin and NOT from all the WordPress core or another plugin?
I guess I should somehow hook to that
add_action( ‘admin_notices’, ‘display_admin_notice’
but I do not know how
Brief
I have a plugin with this action
add_action( ‘admin_notices’, ‘display_admin_notice’
and need to call it from ANOTHER plugin to block those admin_notices
Thanks in advance
]]>add_action( 'comment_form_before', [ $this, 'comments_link' ] );
From here (class-wcml-comments.php), Code snippet:
public function __construct( woocommerce_wpml $woocommerce_wpml, SitePress $sitepress, WPML_Post_Translation $post_translations, wpdb $wpdb ) {
$this->woocommerce_wpml = $woocommerce_wpml;
$this->sitepress = $sitepress;
$this->post_translations = $post_translations;
$this->wpdb = $wpdb;
}
public function add_hooks() {
add_action( 'comment_post', [ $this, 'add_comment_rating' ] );
add_action( 'woocommerce_review_before_comment_meta', [ $this, 'add_comment_flag' ], 9 );
add_filter( 'get_post_metadata', [ $this, 'filter_average_rating' ], 10, 4 );
add_filter( 'comments_clauses', [ $this, 'comments_clauses' ], 10, 2 );
add_action( 'comment_form_before', [ $this, 'comments_link' ] );
add_filter( 'wpml_is_comment_query_filtered', [ $this, 'is_comment_query_filtered' ], 10, 2 );
add_action( 'trashed_comment', [ $this, 'recalculate_average_rating_on_comment_hook' ], 10, 2 );
add_action( 'deleted_comment', [ $this, 'recalculate_average_rating_on_comment_hook' ], 10, 2 );
add_action( 'untrashed_comment', [ $this, 'recalculate_average_rating_on_comment_hook' ], 10, 2 );
//before WCML_Synchronize_Product_Data::sync_product_translations_visibility hook
add_action( 'woocommerce_product_set_visibility', [ $this, 'recalculate_comment_rating' ], 9 );
add_filter( 'woocommerce_top_rated_products_widget_args', [ $this, 'top_rated_products_widget_args' ] );
add_filter( 'woocommerce_rating_filter_count', [ $this, 'woocommerce_rating_filter_count' ], 10, 3 );
}
]]>