이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Context Manager

설명

Context Manager makes your site behave differently depending on the current user’s context. Using the simple point-and-click admin pages, there are four different ways your site can react:

  1. Include and exclude CSS and JavaScript files
  2. Changing the behaviour of menu items
  3. Hiding widgets in sidebars
  4. Adding extra classes to the <body> tag.

The plugin supersedes Menu Rules

Example usage

A website has e-commerce shopping functionality driven by a custom post type called ‘products’. There’s an archive page called ‘shop’ that lists products and is linked to in the main navigation menu.

A user visits ‘shop’ and the menu item becomes ‘active’, but when they click through to an individual product, the menu item loses its state. The user becomes lost.

  1. Install the Context Manager plugin
  2. Add a new context rule
  3. Give it a meaningful name in the title field. This is just for administration purposes
  4. In the conditions field enter is_singular( 'product' )
  5. Choose Emulate current page as a child but do not create a menu item. as the menu rule
  6. Find your products page in the menu dropdown

On the product page, there are irrelevant widgets that distract the user from making a purchase.

  • Hide irrelevant widgets under the widgets reaction

The whole shop section requires its own colour scheme, but there’s no common class that ties all the pages together.

  • Enter shop-section class name in the body class reaction. Or alternatively, register another stylesheet using wp_register_style() in you theme’s functions.php.
  • Create

Remember to click publish when you’re ready to save.

Have a look at screenshots to see the above setup in action.

Support

If you’re stuck, ask me for help on Twitter.

스크린샷

  • An example setup for a products section in a online shop
  • CSS and JavaScript reactions

설치

  1. Download and unzip the folder from the WordPress plugins repository
  2. Upload the context-manager folder into to the /wp-content/plugins/ directory
  3. Activate the plugin through the ‘Plugins’ menu in WordPress
  4. Open the ‘Appearance’ menu item and click the ‘Context Rules’ link

후기

이 플러그인에 대한 평가가 없습니다.

기여자 & 개발자

“Context Manager”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

자국어로 “Context Manager”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

1.2.0

  • [Bugfix]: disabled assets reaction which triggered errors in 3.6. No feasible workaround found yet
  • [Bugfix]: added conditional checks into widgets reaction

1.1.5

  • [Bugfix]: menu_reaction property not being set in child page and inactive parent menu reactions

1.1.4

  • [Bugfix]: Some environments were triggering a fatal error related to html() due to an action being added to a hook too late

1.1.3

  • [Bugfix]: Asset reaction generating a global site error if not logged in

1.1.2

  • [Bugfix]: Major issue that generated an error when adding or editing a context rule

1.1.1

  • [Bugfix]: Errors in widget reaction when site has orphaned widgets

1.1

  • [Added]: Assets reaction
  • [Bugfix]: get_rules() using incorrect meta_query parameter
  • [Bugfix]: PHP 5.4 fatal errors

1.0.2

  • [Bugfix]: Body class and widget reactions caused an error when no rules were set up

1.0.1

  • [Bugfix]: Invalid foreach warning when no rules were added in get_rules()