Overview
  • Namespace
  • Class

Namespaces

  • MatthiasWeb
    • RealMediaLibrary
      • api
      • attachment
      • base
      • comp
        • complexquery
      • folder
      • general
      • metadata
      • order
      • rest
      • usersettings
  • None

Classes

  • CoverImage
  • Description
  • Meta

Class Meta

Create general functionality for the custom folder fields.

For an example see the function-doc of this::content_general and this::save_general

MatthiasWeb\RealMediaLibrary\base\Base
Extended by MatthiasWeb\RealMediaLibrary\metadata\Meta implements MatthiasWeb\RealMediaLibrary\api\IMetadata
Namespace: MatthiasWeb\RealMediaLibrary\metadata
Located at metadata/Meta.class.php

Methods summary

public
# content( string $content, IFolder|null $folder )

Return modified content for the meta box.

Return modified content for the meta box.

Note: If you want to use a more complex content in a meta table use something like this:

<tr>
 <th scope="row">Medium size</th>
 <td><fieldset>
     <legend class="screen-reader-text"><span>Medium size</span></legend>
     <label for="medium_size_w">Max Width</label>
     <input name="medium_size_w" type="number" step="1" min="0" id="medium_size_w" value="300" class="small-text">
     <label for="medium_size_h">Max Height</label>
     <input name="medium_size_h" type="number" step="1" min="0" id="medium_size_h" value="300" class="small-text">
 </fieldset></td>
</tr>

If you want to "group" your meta boxes you can use this code to create a empty space:

<tr class="rml-meta-margin"></tr>

Parameters

$content
the HTML formatted string for the dialog
$folder
The folder object

Returns

string Content

Implementation of

MatthiasWeb\RealMediaLibrary\api\IMetadata::content()
public
# save( array $response, WP_REST_Request $folder, IFolder|null $request )

Save the infos. Add an error to the array to show on the frontend dialog. Add an successful data to receive it in JavaScript.

Save the infos. Add an error to the array to show on the frontend dialog. Add an successful data to receive it in JavaScript.

$response["errors"][] = "Your error";
$response["data"]["myData"] = "Test";

Parameters

$response
Array of errors and successful data.
$folder
$request The server request
$request
$folder The folder object

Returns

array Response

Implementation of

MatthiasWeb\RealMediaLibrary\api\IMetadata::save()
public
# scripts( {Assets} $assets )

Enqueue scripts and styles for this meta box.

Enqueue scripts and styles for this meta box.

Parameters

$assets
The assets instance so you can enqueu library scripts

Implementation of

MatthiasWeb\RealMediaLibrary\api\IMetadata::scripts()
public
# prepare_content( $fid )
public
# add( $name, $instance )
public
# get( $name )
public
# exists( $name )
public
# folder_deleted( $fid, $oldData )
public static
# getInstance( )

Methods inherited from MatthiasWeb\RealMediaLibrary\base\Base

debug(), getCore(), getTableName()

API documentation generated by ApiGen