Installing a Cornerstone custom element

Hi,

I was looking at the following guide: https://theme.co/apex/forum/t/cornerstone-custom-elements/217

It shows the files that make up an element, but it omits mentioning how to install them.

I gave a shot at installing the zip file from the example as a plugin, but that breaks the Wordpress install. How is installing the element in the example supposed to work?

Hello There,

Thanks for writing in! You may need to download the Sample Extension and start from there. The extension would be the same as installing a plugin. Once installed, the element can be selected and drag in Cornerstone. To avoid any issues like fatal error, please make sure that there are no duplicate function names. Your function names should be unique to avoid any issues.

Hope this helps.

So to be clear, you do mean go to Plugins, click upload plugin, install and activate? If I do that, as I said the install breaks. When you try to access things in from the wp-admin menu you get “Fatal error: Call to undefined function csl18n() in C:\xampp\htdocs\wp\wp-content\plugins\my-extension\includes\my-sortable-element\controls.php on line 13”.

Hello There,

Thanks for updating in! Please edit your plugin particularly this file C:\xampp\htdocs\wp\wp-content\plugins\my-extension\includes\my-sortable-element\controls.php and find this csl18n(). You will need to replace it with 'my_extension'.

Please let us know how it goes.