Loading...

Shopping cart

DreamEditor is a powerful WordPress plugin designed to empower clients by granting them direct access to edit specific Advanced Custom Fields (ACF) on the frontend of their websites. With DreamEditor, clients can seamlessly make adjustments to key elements without the need to navigate through the backend, streamlining their workflow and enhancing their overall user experience. By offering this intuitive solution, DreamEditor simplifies the process of content management, putting control directly into the hands of clients and enabling them to effortlessly tailor their websites to meet their evolving needs and preferences.

 

Installation

Your welcome email should contain a link to you account where you can download the latest version of Dream Editor. Alternatively, your Order Received page contains a link called “View API Downloads” where you can download the plugin. If you didn’t receive the email, or the download link isn’t working, then please contact help.

  • Download the latest version
  • Ensure the downloaded files are still in a zip file (sometimes these get unzipped).
  • Navigate to the “Add New Plugin” page on your website and click on “Upload Plugin” button at the top of the page. 
  • Click on the “Choose file” button and select the dreameditor zip file. 
  • Once uploaded click on “activate”
  • That’s it, DreamEditor has been installed. 

Now DreamEditor is installed, you’ll need to include a fallback function in your theme. Simply open the functions.php file in your preferred text editor and copy-paste the provided code into it

if( ! function_exists('dreameditor_func') ) {
  function dreameditor_func( $callback ) {
    if( ! is_callable($callback) ) {
      return;
    }
  
    $args  = array_slice(func_get_args(), 1);
    $value = call_user_func_array($callback, $args);
    
    return $value;
    
  }
}

 

Activation

Before you can start using Dream Editor, we need to verify your installation. To do this, you need to enter a “Product order API Key” and the ”Product ID”. These can be found by visiting your account from the shop website (https://shop.twohourssleep.com/my-account).

  • From my account click on API Keys from the navigation sidebar.
  • On the API Keys page, location Dream Editor in the table and make a note of the API Key and Product ID.

If you do not see Dream Editor listed on the table, then please contact us. 

Next we need to enter the data into your site.

  • From your WordPress admin dashboard,
  • Navigate to the settings tab, find “Dream Editor Activation” from the sub menu and click the link.
  • On the “API Key Activation” add your API key to the “API Key” field and the product ID to the “Product ID” field. 
  • Click on save changes


If the credentials were verified your status will say “Activated” and there will be some additional information about your purchase. If this was unsuccessful, and your key/product ID are correct, then please contact us. 

Quick Start

In this section, we’ll guide you through the process of integrating DreamEditor into basic fields. It’s a straightforward procedure where you’ll create an array of options within our function. Then, you’ll output the DreamEditor function to the parent element attributes of the Advanced Custom Fields (ACF) fields by using the ‘echo’ command. This allows you to seamlessly incorporate DreamEditor functionality into your basic fields, enhancing their capabilities effortlessly.

Every field follows a simple array structure comprising two essential fields. The first one is “Field_name”, which should mirror the name of your ACF field. For instance, if your ACF field is named “main_title,” then your DreamEditor field should also be “main_title.” The second required field is “field_type,” which indicates the type of ACF field you intend to manage.

Text
Text area
Number
Email
URL
Link
Image
WYSIWYG
Text

The text field is a basic text input, its used to store small content strings.

<?php 
  $content_editable_args = [ 
    'field_name'      => 'main_title',
    'field_type'      => 'text',
  ]; 
  ?>

  <h1 <?php echo dreameditor_func('dreameditor_field_args',$content_editable_args); ?>><?php echo get_field('main_title') ?></h1>
Text area
Number
Email
URL
Link
Image
WYSIWYG

Advanced usage

Advanced usage operates similarly to standard usage, but with an additional option to configure in the array structure known as “field_path.” This option is particularly useful for fields that contain additional nested fields within their structure. You can see examples of these below.

To determine the path name, begin with the name of your primary field. For instance, if your primary field is named ‘main_group,’ your path would be ‘main_group.’ However, if your primary field is either a Repeater or Flexible Content, we must consider the iteration we intend to edit. To achieve this, we create a counter for the while loop and append it to the end of the path. For instance, ‘main_repeater_0’ would target the first iteration in your loop.

It’s crucial to consider any fields nested within groups or repeaters. For instance, if you have a repeater containing a group, this nesting should be reflected in the field path. To accomplish this, we append the name of each nested field to our path. For example, ‘main_repeater_0_group_name’ would correctly identify a field within the nested structure.

Groups
Repeaters
Flexible Content
Groups

The Group field uses both the parent and child field names when saving and loading values. For example, a Group field named ‘hero’ with a sub field named ‘image’ will be saved to the database using the meta name ‘hero_image’.

<?php 
  $group = get_field('group_name');

  if( $group ) : 
  ?>

    <?php
    $content_editable_args = [ 
      'field_name'      => 'main_title',
      'field_type'      => 'text',
      'field_path'      => 'group_name'
    ]; 
    ?>

    <h1 <?php echo dreameditor_func('dreameditor_field_args',$content_editable_args); ?>><?php echo $group['main_title'] ?></h1>

  <?php endif; ?>
Repeaters
Flexible Content

Changlog

1.0.0 (2024-05-08)

Build System / Dependencies
  • don't allow css when dreamEditor not allowed (880f6424)
Chores
  • update version and php minimum requirements (8ccab03e)
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • prompt user after change (1516cd03)
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • styling bugs on dark themes (2b6cb67b)
  • prompt user of changes (b3164a5f)
  • Max filesize upload (f4344450)
  • Max Filesize image error (263af2e4)
  • Media uploader z-index update (4d907df5)
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • //github.com/THS-devs/ths-dream-editor (84585348)
  • max file sise (e1bb20e6)
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-23)

Build System / Dependencies
  • don't allow css when dreamEditor not allowed (880f6424)
Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • prompt user after change (1516cd03)
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Max Filesize image error (263af2e4)
  • Media uploader z-index update (4d907df5)
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-17)

Build System / Dependencies
  • don't allow css when dreamEditor not allowed (880f6424)
Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Media uploader z-index update (4d907df5)
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-15)

Build System / Dependencies
  • don't allow css when dreamEditor not allowed (880f6424)
Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-12)

Build System / Dependencies
  • don't allow css when dreamEditor not allowed (880f6424)
Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-12)

Build System / Dependencies
  • don't allow css when dreamEditor not allowed (880f6424)
Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-05)

Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • auto get field path (7958fd13)
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Undefined variable $field_name (8d287204)
  • backward compatible (eb1fd3ac)
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-04-04)

Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Made backwards compatible (d65caf3c)
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-03-27)

Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • relative positioning for background images (9b95d399)
  • css layout issues (54cbe6c6)
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-03-20)

Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • links prevents editing (66db4712)
  • Saving data and images had broken (d887af62)
Other Changes
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-03-18)

Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Saving data and images had broken (d887af62)
Other Changes
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)
Refactors
  • Add wrapper div for sidebars (78c6336a)
  • CSS scoping (07b91f78)
Code Style Changes
  • icon title update while saving (98502106)

1.0.0 (2024-03-14)

Chores
  • remove logs (e88e2ed0)
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Saving data and images had broken (d887af62)
Other Changes
  • Updated styling icons (190773c9)
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)

1.0.0 (2024-03-14)

Chores
  • remove file (4bba846a)
  • version change (e121ad37)
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Saving data and images had broken (d887af62)
Other Changes
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)

1.0.0 (2024-03-07)

Chores
  • Downgraded minimum PHP requirement (326c563e)
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Saving data and images had broken (d887af62)
Other Changes
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)

1.0.0 (2024-03-04)

Chores
  • Version change (76d24240)
New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Saving data and images had broken (d887af62)
Other Changes
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)

1.0.0 (2024-03-01)

New Features
  • removed the need to include post_id on every field editor call (74dc9d2d)
Bug Fixes
  • Saving data and images had broken (d887af62)
Other Changes
  • wp_editor wasn't updating the content (f894c929)
  • added css overrides for wp editor (ddfaf742)
  • clean up and removed AOS (63cd89ca)
  • Version change (140bce0b)
  • Generated composer psr4 structure (95db10fa)

1.0.0 (2024-02-14)

Other Changes
  • Generated composer psr4 structure (95db10fa)