Viewing 8 replies - 1 through 8 (of 8 total)
  • Also like to know. ??
    These automatic generator plugins and wp was to be hidden by default, and would improve a lot in terms of security.
    It is easy for a hacker / bot indentificar one vulnerable site just reading this information in the source code.

    Why is this marked as resolved? Where is the solution?

    Thread Starter razirazo

    (@razirazo)

    I don’t know. I don’t mark it as resolved.

    Still waiting for answer.
    I don’t like my visitor to know the exact working of my site.

    It is easy ??
    just go into plugins files
    masterslider => public => includes => class-msp-frontend-assets.php
    line 35
    comment this line

    add_action( ‘wp_head’ , array( $this, ‘meta_generator’ ) );

    like this
    // add_action( ‘wp_head’ , array( $this, ‘meta_generator’ ) );

    hope it helps ??

    Plugin Author averta

    (@averta)

    Hi,
    First of all apologies me for delay in response.

    Editing source codes not recommended, because you will miss it after any update.

    Put the below code in your functions.php in your theme folder:

    /**
     * Allows to remove method for a hook by class name
     */
    if( ! function_exists( 'remove_filter_from_class' ) ){
    
    	function remove_filter_from_class( $hook_name = '', $class_name ='', $method_name = '', $priority = 0 ) {
    		global $wp_filter;
    
    		// Take only filters on right hook name and priority
    		if ( !isset($wp_filter[$hook_name][$priority]) || !is_array($wp_filter[$hook_name][$priority]) )
    			return false;
    
    		// Loop on filters registered
    		foreach( (array) $wp_filter[$hook_name][$priority] as $unique_id => $filter_array ) {
    			// Test if filter is an array ! (always for class/method)
    			if ( isset($filter_array['function']) && is_array($filter_array['function']) ) {
    				// Test if object is a class, class and method is equal to param !
    				if ( is_object($filter_array['function'][0]) && get_class($filter_array['function'][0]) && get_class($filter_array['function'][0]) == $class_name && $filter_array['function'][1] == $method_name ) {
    					unset($wp_filter[$hook_name][$priority][$unique_id]);
    				}
    			}
    
    		}
    
    		return false;
    	}
    }
    
    remove_filter_from_class( 'wp_head', 'MSP_Frontend_Assets', 'meta_generator', 10 );

    Regards
    Averta

    Thanks Averta.

    thanks a lot @averta , finally there is someone able to answer this ??

    +1 for @averta solution, thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Removing 'generator' meta tag’ is closed to new replies.