Coder Social home page Coder Social logo

linchpin / post-type-spotlight Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 0.0 2.91 MB

Allows admin chosen post types to have a featured post check box on the edit screen. Also adds appropriate classes to front end post display, and allows featured posts to be queried via a taxonomy query.

License: GNU General Public License v2.0

PHP 76.52% JavaScript 20.15% Shell 1.33% SCSS 1.99%
wordpress-plugin wordpress linchpin

post-type-spotlight's Introduction

Post Type Spotlight

Build Status

Latest Release: 3.0.3

Post Type Spotlight

Easily allows you to designate posts, pages, attachments and custom post types as featured.

Description

The plugin displays a toggle within the publish area to feature a post. The toggle only appears on admin selected post types which can be selected in the Settings -> Writing screen.

When a post is designated as featured:

  • It receives featured and featured-{$posttype} classes via the post_class filter.

  • Shows featured โญ๏ธ in the post type's admin post list screen.

  • Assigns the post a hidden taxonomy term (featured) that can easily be queried via the pts_feature_tax taxonomy.

  • Note: For the plugin to work on attachments, you must be using 3.5 or above. All other features will work on 3.1.0 and up.*

New in Version 3.0.0

  • Better compatibility with the Block Editor and the enhancements it brings.
  • Added a new Featured Posts Variation of the Query Loop
  • Added the ability to filter teh Featured Posts Query Loop to only show featured posts
  • Added the ability to filter the Featured Posts Query Loop to show all posts excluding featured posts
  • Added the ability to filter the Featured Posts Query Loop to show all posts and show featured posts first (similar to sticky)
  • Updated all dependencies
  • Added the ability to sort post lists by featured posts.

Installation

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Navigate to the Settings->Writing section and select the post types you would like to have the featured abilities.

Screenshots

  1. The settings page.
  2. Options on the edit screen
  3. Markup example when using post_class();
  4. Shows featured posts in post edit tables.

Linchpin

post-type-spotlight's People

Contributors

aaronware avatar dependabot[bot] avatar fischfood avatar maxinacube avatar renovate[bot] avatar

Watchers

 avatar  avatar  avatar  avatar

post-type-spotlight's Issues

Javascript error when still using Classic Editor

This is resulting in some plugins not working properly. Example Yoast

Cannot read properties of undefined (reading 'updateCategory')

Check to see if the post is using the Classic Editor, if so. Double check the loaded javascript

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency phpcompatibility/phpcompatibility-wp to v2.1.5
  • chore(deps): update dependency php-parallel-lint/php-parallel-lint to ^v1.4.0
  • chore(deps): update dependency squizlabs/php_codesniffer to ^3.10.0
  • chore(deps): update svenstaro/upload-release-action action to v2.9.0
  • fix(deps): update dependency @wordpress/components to v27
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

composer
composer.json
  • php >=7.0
  • composer/installers ^v2.2.0
  • phpseclib/phpseclib 3.0.34
  • linchpin/phpdocumentor-template-markdown ^1.0
  • dealerdirect/phpcodesniffer-composer-installer ^1.0.0
  • wp-coding-standards/wpcs ^2.3.0
  • squizlabs/php_codesniffer ^3.8.1
  • phpcompatibility/php-compatibility ^9.3.5
  • php-parallel-lint/php-parallel-lint ^v1.3.2
  • php-parallel-lint/php-console-highlighter ^1.0.0
  • friendsofphp/php-cs-fixer ^3.48.0
  • phpcompatibility/phpcompatibility-wp 2.1.4
  • automattic/phpcs-neutron-ruleset ^3.4
  • saggre/phpdocumentor-markdown ^0.1.4
github-actions
.github/workflows/phpcbf.yml
  • actions/checkout v4
  • shivammathur/setup-php v2
  • peter-evans/create-pull-request v5
.github/workflows/phpcs.yml
  • actions/checkout v4
  • rtCamp/action-phpcs-code-review v3.0.1
.github/workflows/phplint.yml
  • actions/checkout v4
  • shivammathur/setup-php v2
.github/workflows/release-please.yml
  • google-github-actions/release-please-action v3
  • actions/checkout v4
  • actions-ecosystem/action-get-latest-tag v1.6.0
  • actions/cache v3
  • php-actions/composer v6
  • svenstaro/upload-release-action 2.7.0
.github/workflows/wiki.yml
  • actions/checkout v4
  • php-actions/composer v6
  • Andrew-Chen-Wang/github-wiki-action v4
.github/workflows/wordpress.yml
  • actions/checkout v4
  • actions-ecosystem/action-get-latest-tag v1.6.0
  • actions/cache v3
  • php-actions/composer v6
  • 10up/action-wordpress-plugin-deploy 2.2.2
npm
blocks/package.json
  • @wordpress/block-editor ^12.17.0
  • @wordpress/blocks ^12.26.0
  • @wordpress/components ^25.15.0
  • @wordpress/compose ^6.26.0
  • @wordpress/data ^9.19.0
  • @wordpress/element ^5.26.0
  • @wordpress/i18n ^4.49.0
  • classnames 2.5.1
  • dompurify 3.0.8
  • lodash 4.17.21
  • @wordpress/scripts ^26.19.0
package.json
  • resolve-url-loader ^5.0.0
  • @wordpress/scripts ^26.19.0
  • mini-css-extract-plugin ^2.7.7
  • webpack 5.89.0
  • webpack-cli 5.1.4
  • node >= 20.11.0

  • Check this box to trigger a request for Renovate to run again on this repository

Block Editor: Error on page load

The "post-type-post-settings" plugin has encountered an error and cannot be rendered.

This error is being thrown when attempting to check if a post has the featured taxonomy checked on post types that are not included in the Post Type Spotlight Writing settings.

Screenshot 2024-01-23 at 11 52 07 AM

Console error is as follows:

Cannot read properties of undefined (reading 'includes') at Admin (index.js:23:50)

This error is occurring because the check against the current post including the taxonomy is happening before a check if the current post type should have the pts_feature_tax taxonomy.

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.