Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
jsarnowski/oxygen-woocommerce / product-description.php
Size: Mime:
<?php

namespace Oxygen\WooElements;

class ProductDescription extends \OxyWooEl {

    function name() {
        return 'Product Description';
    }

    function render($options, $defaults, $content) {
        global $post;
        setup_postdata($post->ID);
        the_content();
    }

    function tag() {
        return $this->textTagChoices();
    }

    function woo_button_place() {
        return "single";
    }

    function icon() {
        return plugin_dir_url(__FILE__) . 'assets/'.basename(__FILE__, '.php').'.svg';
    }

    function controls() {

        $selector = "p";

        $this->addStyleControl(
            array(
                "property" => 'font-family',
                "selector" => $selector
            )
        );

        $this->addStyleControl(
            array(
                "property" => 'color',
                "selector" => $selector
            )
        );

        $this->addStyleControl(
            array(
                "property" => 'font-size',
                "selector" => $selector
            )
        );

        $this->addStyleControl(
            array(
                "property" => 'font-weight',
                "selector" => $selector
            )
        );

        $this->addTagControl();
    
    }


    function defaultCSS() {
        return file_get_contents(__DIR__.'/'.basename(__FILE__, '.php').'.css');
    }

}

new ProductDescription();