WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] how to disable core updates (7 posts)

  1. amartinez
    Member
    Posted 3 years ago #

    This is only my own "dirty" solution... :)

    Edit wp-admin/includes/update.php, at line #32 change this:

    function get_core_updates( $options = array() ) {

    for this:

    function get_core_updates( $options = array() ) {
    	return array();

    Regards!

  2. Don't do that.

    You'll lose your changes whenever you update WordPress.

    Use this: http://wordpress.org/extend/plugins/disable-wordpress-core-update/

    Or write a function for functions.php instead.

  3. amartinez
    Member
    Posted 3 years ago #

    Sure, this is only a "fast patch" :)

    The goal is just NOT to update in any way and make the changes NOW AND FAST (we hope to update the customer's web & design some day...)

    Also, I have read that the disable-wordpress plugin has problems of precedence, It's true?

    About "functions.php", these file can be used to change admin behaviors? perhaps you meant to say "wp-admin/includes/admin.php"?

    cheers!

  4. No I meant functions.php. You can put plugin code in your functions.php to add/remove/edit the admin menus. It can do this too.

    You should NEVER ever ever change core files. It's just ... Don't. Don't suggest it, don't apply it. It's fine to test around, but never tell someone to do that. This way lies madness. You will be pissed when you update WordPress and lose your changes. You do this to a customer? They will lose faith in you.

    Also, I have read that the disable-wordpress plugin has problems of precedence, It's true?

    First I've heard of it.

    http://wordpress.org/extend/plugins/disable-wordpress-plugin-updates/
    http://wordpress.org/extend/plugins/disable-wordpress-core-update/
    http://wordpress.org/extend/plugins/hide-update-reminder/

    Heck, even an admin css change to hide the html would be better than editing core.

    Don't Edit Core

  5. amartinez
    Member
    Posted 3 years ago #

    Trust! :) I just looked for a plugin, but I read that did not work...

    Cite: "I have found the "Disable Core Update" does not actually work in preventing all activity. The reason is because the default priority for the add_action is too low." (but I do not investigate further...)

    The BEST way is not to edit core, to prevent updates. But in this case the update itself is the protected issue. When I want, I upgrade wp and them I do not want this patch any more

    I'm sure some (or all) of these 3 plugins you cited works perfect, and they are the best option.

    But don't worry. The faith of my clients is strong, but their technical capabilities are zero... All they see... touch it!. All they touch... break it! And then blame the webmaster "if it was not allowed to touch SO WHY PUT THAT THERE?" :) I happened to some customers and some plugins are not fully compatible with 3.0

  6. I agree, which is why I think you're being reckless and foolish to consider this approach FOR a client.

    Picture the future. They finally get someone moderately techy to support WP and let you go. The tech sees WP 4.1 (it's the future) and upgrades. Boom. Now EVERYONE sees upgrades. What the hell? You just screwed someone over. Bad form.

    The proper way is to be nicely degradable. Forward thinking.

    Also your citation is worthless without a link :) I can't see how old it was, or anything (like if the dev came by and pointed out it works now...)

  7. amartinez
    Member
    Posted 3 years ago #

    (buf) when client update means new web, new prog

    but well... it's not better to show the solution that discuss it? :)

    ***CORRECTING***

    This is only my own "clean" solution:

    edit wp-content/themes/your_theme_name/functions.php

    at end of file add:

    //// oculta la actualizacion del core
    add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
    function quita_menu() {
    	global $submenu;
    	unset($submenu['index.php'][10]);
    }
    add_action('admin_menu', 'quita_menu');

    if you want, you can hide some dashboard widgets about wordpress that can be confusing to some customers

    //// quita unos cuantos paneles del dashboard
    function quita_dashboard_widgets() {
        // Globalize the metaboxes array, this holds all the widgets for wp-admin
        global $wp_meta_boxes;
        unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);
        unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);
        unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);
        unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);
    }
    add_action('wp_dashboard_setup', 'quita_dashboard_widgets' );

    I hope it helps!

Topic Closed

This topic has been closed to new replies.

About this Topic