Introduction
Lorem ipsum dolor sit amet consectetur adipiscing elit condimentum placerat magnis, aptent suspendisse maecenas eros sed nibh aenean lobortis augue dictumst penatibus, montes nec potenti eleifend sociis velit laoreet tempus ut. Vel tellus nulla odio, vehicula imperdiet dui, vitae litora.
Composer Installation 2023-03-22
- Composer is required to enable autoload. On MJ1900, followed the Comman-line Installation in this doc:
- The composer.phar is downloaded to a temp directory first, then renamed to composer and moved to /usr/local/bin so that it can be called globally
- # sudo mv composer.phar /usr/local/bin/composer
Design Processes
- Mainly followed the idea in “Simple WordPress Plugin Development – Start to Finish” by Mr Digital.
- Define the class IvrAioSlider in main php file.
- define method __construct( )
- define method init( )
- Initiate the IvrAioSlider class then call the method init( ).
- Install Carbon Fields to the vendor directory
- It is not recommended to run Composer as root.
- Run
$ composer require htmlburger/carbon-fields-plugin
- Uninstall Carbon Fields due to a reason outlined in Notes below.
$ composeer remove htmlburger/carbon-fields-plugin
Notes
- As per some forums,, Carbon Fields is no longer working after WordPress 6.4, due to the abendon of a library in WP. The attempt to create an option page was also failed. Therefore, the plugin design has given up CF and an alternative will be found.
- Explore the UI of these plugins : Serious Slider, OWL Carousel and some others.
- After composer.json is edited, run the command below to effect the changes.
$ composer dump-autoloadif the change is related to autoload$ composer installif the change is related to autoload or package installation
- After creating a new class or file, run
www-chxy.shto change the ownership and permission in order to prevent Class not Found error.
