Things I’ve Learned Archives

  1. Remove the Admin Bar

    For those of us who do not like the new admin bar in WordPress 3.1, here is a quick 1 line (2 with a comment) fix for removing it: // Remove the admin bar from displaying…everywhere add_filter(‘show_admin_bar’, ‘__return_false’);

  2. WordPress Autosave

    Recently I was having an issue with the WordPress autosave running on my posts in a custom post type.  I am running a lot of scripts in the “save_post” action and couldn’t find a good way to exclude autosaves from running this code. Note that I looked at the info being passed to the functions…

  3. TIL: Adding Admin Menu Pages

    When using functions like add_submenu_page etc, make sure that you add them at the admin_menu action. If you try to add them any place other than that you will get “Insufficient Privileges” errors when trying to go to the page. NOTE: If you are in WP 2.8 WordPress allows you to run those functions at…

  4. WordPress Media Gallery

    For the WordPress Media Gallery to work properly on a server, PHP Safe Mode must be turned off.  From what I am told when PHP Safe mode is on, PHP runs as a different user than apache and this causes folder creation/modification problems.  So for the uploader to work it must be turned off. Also…

  5. WordPress PHP Upload Information

    WordPress has a very distinct way of doing things when it comes to file uploads.  There is the restriction that PHP puts into place with file uploads (ie upload_max_filesize and post_max_size), and restrictions that WP puts in via values in the database. With the PHP values, if you need to upload large files you will…

  6. Things I’ve Learned

    Today I decided that I am going to write up a things I’ve learned section to my blog.  It probably won’t be much, and most likely no one will read it, but I need a place that I can write down these things so I can find them in the future.  Leaving it up to…