3D FlipBook - Preserving custom templates, skins

j***k@gmail.com
2021-09-22
2021-09-23

After updating the plugin, my custom templates and css have been removed and I had to upload the files again. Is there any way how to preserve custom templates for the next updates? Thanks a lot for help.

Replies

a***r@3dflipbook.net
2021-09-23
2021-09-23

Create your own plugin with your template like:

<?php
  /*
    Plugin Name: 3D FlipBook - Skins Pack
    Plugin URI: http://3dflipbook.net/
    Description: Premium Skins Pack for 3D FlipBook WordPress Plugin
    Author: iberezansky
    Author URI: http://3dflipbook.net/
    Version: 1.0.0
    License: https://3dflipbook.net/licenses-support-policy

    Text Domain: 3d-flip-book
  */
  namespace iberezansky\fb3dsp;

  define('iberezansky\fb3dsp\URL', plugins_url('/', __FILE__));
  define('iberezansky\fb3dsp\ASSETS', URL.'assets/');
  define('iberezansky\fb3dsp\ASSETS_CSS', ASSETS.'css/');
  define('iberezansky\fb3dsp\ASSETS_SOUNDS', ASSETS.'sounds/');

  function add_skins($ts) {
    return array_merge($ts, [
      'black-classic'=> [
        'styles'=> [
          ASSETS_CSS.'font-awesome.min.css',
          URL.'black-classic/style.css'
        ],
        'links'=> [],
        'html'=> URL.'black-classic/view.html',
        'script'=> URL.'black-classic/script.js',
        'sounds'=> [
          'startFlip'=> ASSETS_SOUNDS.'start-flip.mp3',
          'endFlip'=> ASSETS_SOUNDS.'end-flip.mp3'
        ]
      ]
    ]);
  }

  add_filter('fb3d_templates', 'iberezansky\fb3dsp\add_skins');
Log In to leave a comment