Download the PHP package benjaminmedia/wp-cxense without Composer

On this page you can find all versions of the php package benjaminmedia/wp-cxense. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-cxense

Bonnier Publications - WordPress cXense plugin

This plugin enables your WordPress site to integrate with cXense. It adds the meta tags and scripts needed by cXense in order to scan your site. It also calls cXense whenever you make changes to your content. Finally it adds the possibility to save a cXense recommendation widget per content type and provides hooks to call them in your view/theme.

Requirements

Installation/Configuration

Install through composer:

Download lastest release from: https://github.com/BenjaminMedia/wp-cxense/releases And unzip and place in your /wp-content/plugins directory.

Settings

Once you have installed and activated the plugin then make sure that you have a set of api credentials for the cXense API. Once you have your credentials you may go to the settings page labeled cXense. Here you must enter your , , and finally your .

Remember the plugin will not work until you check the switch in the settings page

Widgets

The plugin will generate a settings field for each post type you have available on your WordPress Installation. Here you must enter the cXense recommendation widget ID that you would like represented on your content type.

For debug purpose you can enable or disable the query cache. It is recommended to be enabled in production.

SortBy Widget ID will be only used for widgets sortby options in wp-base.

Rendering widgets

In order to render the widgets available for your post you should make sure that you have filled out the field in the plugin settings page.

When rendering the widgets the plugin provides you with two options:

  1. Let cXense render the HTML of the widgets
  2. Get the data and for the widget and build the HMTL yourself

Once you have picked the method you want to use you should go to the theme file that represents the single view of your post_type from this file you may call the following methods to get the widget data:

Let cXense render the HTML of the widgets

The sample output of this function could look like:


Get the data and for the widget and build the HMTL yourself

The sample output of this function could look like:

Documents

Searching documents

If the key 'query' is missing from the search array then a DocumentSearchMissingSearch exception is thrown.

Search

Searching documents will return an object of the following format:

The 'matches' key contains an array of objects that have the 'fields' value accessible directly through the magic method __get(). This means that you can call any field from the 'fields' with the direct pointer:

A complete document result looks like:

Widget documents

If the key 'widget_id' is missing from the input array then a WidgetMissingId exception is thrown.

Example how to fetch cxense data

Recently viewed by user 'TAX_RECENT'

This type of taxonomy requires user browser cookie. In order to fetch it from the browser console you can use


All versions of wp-cxense with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
bordoni/phpass Version ^0.3
bonnier/willow-mu-plugins Version ^2.0
illuminate/support Version ^8.83
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package benjaminmedia/wp-cxense contains the following files

Loading the files please wait ....