Skip to content

Idea to customize Basename/URL/Path #1

@kalicki

Description

@kalicki
public function __construct() {
        if ( ! defined( 'WDS_CMB2_Date_Range_BASENAME' ) ) {
            define( 'WDS_CMB2_Date_Range_BASENAME', plugin_basename( __FILE__ ));
        }
        if ( ! defined( 'PW_GALLERY_URL' ) ) {
            define( 'WDS_CMB2_Date_Range_URL', plugin_dir_url( __FILE__ ));
        }
        if ( ! defined( 'WDS_CMB2_Date_Range_DIR' ) ) {
            define( 'WDS_CMB2_Date_Range_DIR', plugin_dir_path( __FILE__ ));
        }

        $this->basename = WDS_CMB2_Date_Range_BASENAME;
        $this->url      = WDS_CMB2_Date_Range_URL;
        $this->path     = WDS_CMB2_Date_Range_DIR;
    }

This is an idea using constants to customize the attributes above, I can customize my structure of theme

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions