GithubHelp home page GithubHelp logo

wp-force-featured-image's Introduction

Force Featured Image

Banner Ever wanted to force a user to publish a post with a featured image of a certain dimension? Search no more.

Contributors: x-team, jonathanbardo, westonruter
Tags: tinyMCE, admin, image, featured-image, featured
Requires at least: 3.5
Tested up to: 3.7.1
Stable tag: trunk (master)
License: GPLv2 or later

Description

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.

Installation

  1. Upload force-featured-image to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. This plugin lets you specify which post-type requires to force a featured image to. It will also let you specify minimum dimensions for the image. Let's say, for example, you want to force a user to set an image on the default post type with the following dimensions (400px * 400px). Put this code in the function.php of your theme :
	function theme_force_featured_image( $options ){
		$options['post'] = array(
			'width'  => 400,
			'height' => 400,
		);

		return $options;
	}
	add_filter( 'force_featured_image_post_type', 'theme_force_featured_image' );

Screenshots

The plugin shows the user a warning when he doesn't respect the image dimension

The plugin shows the user a warning when he doesn't respect the image dimension

Changelog

0.2.0

  • Add the ability to force a featured image with dimensions

0.1.0

First Release

wp-force-featured-image's People

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.