WP Manifestindependent plugin directory
manifest / integrations / wp-graphql-widgets

WPGraphQL Widgets WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

This plugin adds widgets and sidebar queries to WPGraphQL.

★ 13stars
v0.0.3latest · 5 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/benada002/wp-graphql-widgets/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

WPGraphQL Widgets (Queries)

This plugin registers for each active widget a new widget type which exposes all settings of the widget (and for some widgets a rendered field more here) and implements the WidgetInterface which exposes the following fields.

  WidgetInterface {
    active
    databaseId
    html
    id
    idBase
    title
    type
  }

It also adds sidebar queries.

Requirements

Installation

You can install and activate it just like any other WordPress plugin.

Usage

Widget Examples

  widget(id: "nav_menu-3") {
    ... on WPNavMenuWidget {
      navMenu
      active
      databaseId
      html
      id
      idBase
    }
  }
  widgets {
    edges {
      cursor
      node {
        type
        title
        idBase
        id
        html
        databaseId
        active
        sidebar {
          node {
            databaseId
            description
          }
        }
      }
    }
  }

Rendered field

For the WPNavMenuWidget, WPMediaImageWidget, WPWidgetRecentPosts, WPWidgetCategories, WPWidgetPages and WPWidgetRecentComments types there is also rendered field which is a connection to their WPGraphQL type. Here is an example which would give you the menu of a menu widget.

  widget(id: "nav_menu-3") {
    databaseId
    id
    ... on WPNavMenuWidget {
      rendered {
        node {
          menuItems {
            nodes {
              label
              path
            }
          }
        }
      }
    }
  }

Sidebar Examples

  sidebar(sidebar: SIDEBAR) {
    afterSidebar
    afterTitle
    afterWidget
    beforeSidebar
    beforeTitle
    beforeWidget
    class
    databaseId
    description
    id
    name
    widgets {
      edges {
        cursor
        node {
          databaseId
        }
      }
    }
  }
  sidebars {
    edges {
      cursor
      node {
        databaseId
        name
        id
        description
        class
        beforeWidget
        beforeSidebar
        beforeTitle
        afterWidget
        afterTitle
        afterSidebar
        widgets {
          nodes {
            databaseId
          }
        }
      }
    }
  }

Releases

3 releases.

Tag
Published
v0.0.3 latest
Aug 23, 2021 5 years ago
May 20, 2021 5 years ago
May 20, 2021 5 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

WPGraphQL Widgets 0.0.3 · audited by WP Registry

No security issues found.

Audited release
0.0.3
Findings
none
Worst severity
—
Content hash
d58b8d986233b23bc5e6e5b2…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.