Giter Club home page Giter Club logo

functions.php's Introduction

functions.php

Reusable WordPress functions to be installed in your theme's functions.php. In order...

  • Remove width and height attributes from <img>s uploaded in the Media Uploader. This does not work retroactively on already uploaded images.
  • Remove devicepx which is added by Jetpack which adds back width and height attributes on <img>s inline. Only use this if you're using Jetpack.
  • Add custom CSS for non-admin users to WP Admin, useful for hiding stuff you don't want clients to see.
  • Add a box to the WP Admin Dashboard page, useful for displaying any information your clients might need to see. I generally use this to link to "how to WordPress" guides and tech support information.
  • Set sensible default options for the Media Uploader when a user embeds attachments. Use the full-size image URL, no alignment, and won't wrap it in a link.
  • Hide the WordPress logo on the WP Admin login page. (I'd like to add more code to minimize the amount of WordPress branding elements on each page at some point.)

In the future

  • I would like to prevent a user-created image caption from having a height attribute but couldn't find a function to do it. I currently override it in CSS: .wp-caption { max-width: auto; height: auto; }

functions.php's People

Contributors

edadams avatar ara303 avatar

Stargazers

Julio César Velásquez Mejía avatar Nam Nguyen avatar

Watchers

 avatar

Forkers

mtayyabhanif

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.