Exemplo n.º 1
0
    Lessekirki::add_panel('lesse_general', array('title' => esc_html__('General', 'lesse-lite'), 'description' => esc_html__('Change general settings of the theme.', 'lesse-lite')));
    /*==============================
              Sections & Fields
    	===============================*/
    Lessekirki::add_section('lesse_footer_text', array('title' => esc_attr__('Footer Copyright Text', 'lesse-lite'), 'capability' => 'edit_theme_options', 'panel' => 'lesse_general'));
    Lessekirki::add_field('lesse', array('type' => 'text', 'settings' => 'lesse_copyright_text', 'label' => esc_attr__('Copyright Text', 'lesse-lite'), 'section' => 'lesse_footer_text'));
    /*
    |--------------------------------------------------------------------------
    | WordPress Default Settings
    |--------------------------------------------------------------------------
    */
    Lessekirki::add_field('lesse', array('type' => 'image', 'settings' => 'lesse_logo', 'label' => esc_attr__('Choose Site Logo', 'lesse-lite'), 'description' => esc_attr__('Remove logo to display site title.', 'lesse-lite'), 'section' => 'title_tagline'));
    Lessekirki::add_field('lesse', array('type' => 'checkbox', 'settings' => 'lesse_hide_tagline', 'label' => esc_attr__('Hide Tagline', 'lesse-lite'), 'section' => 'title_tagline', 'default' => false));
    /*==============================
    	         	 Colors
    	===============================*/
    $palettes = apply_filters('lesse_color_palettes', array('EB4D5C' => array('#EB4D5C'), 'F34235' => array('#F34235'), 'E81D62' => array('#E81D62'), 'FF6ABE' => array('#FF6ABE'), 'FF978A' => array('#FF978A'), 'f2cbbc' => array('#f2cbbc'), '963019' => array('#963019'), '300032' => array('#300032'), '16174f' => array('#16174f'), 'C270EC' => array('#C270EC'), '9B26AF' => array('#9B26AF'), '6639B6' => array('#6639B6'), '3F51B5' => array('#3F51B5'), '6534ff' => array('#6534ff'), '2095F2' => array('#2095F2'), '03A9F4' => array('#03A9F4'), '00BBD3' => array('#00BBD3'), '01EBB6' => array('#01EBB6'), '009587' => array('#009587'), '4CAF50' => array('#4CAF50'), '8BC34A' => array('#8BC34A'), 'CCDB38' => array('#CCDB38'), 'FEEA3A' => array('#FEEA3A'), 'FEC006' => array('#FEC006'), 'f2b632' => array('#f2b632'), 'FE9700' => array('#FE9700'), 'FE5621' => array('#FE5621'), '785447' => array('#785447'), '6a5750' => array('#6a5750'), 'b5a397' => array('#b5a397'), '9D9D9D' => array('#9D9D9D'), 'bccbde' => array('#bccbde'), 'c2dde6' => array('#c2dde6'), '607D8B' => array('#607D8B'), 'e6af4b' => array('#e6af4b'), '97743a' => array('#97743a')));
    //Color Schemes
    Lessekirki::add_field('lesse', array('type' => 'palette', 'settings' => 'lesse_color_scheme', 'label' => esc_attr__('Theme Skin', 'lesse-lite'), 'description' => esc_attr__('Change color scheme.', 'lesse-lite'), 'section' => 'colors', 'default' => 'EB4D5C', 'choices' => $palettes));
    /*
    |--------------------------------------------------------------------------
    | Configration
    |--------------------------------------------------------------------------
    */
    /**
     * Add the configuration.
     * This way all the fields using the 'lesse' ID
     * will inherit these options
     */
    Lessekirki::add_config('lesse', array('capability' => 'edit_theme_options', 'option_type' => 'theme_mod'));
}
Exemplo n.º 2
0
    }
    global $lessekirki;
    $lessekirki = Lessekirki();
}
/**
 * Apply the filters to the Lessekirki::$url
 */
if (!function_exists('lessekirki_filtered_url')) {
    function lessekirki_filtered_url()
    {
        $config = apply_filters('lessekirki/config', array());
        if (isset($config['url_path'])) {
            Lessekirki::$url = esc_url_raw($config['url_path']);
        }
    }
    add_action('after_setup_theme', 'lessekirki_filtered_url');
}
include_once Lessekirki::$path . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'deprecated.php';
// Include the API class
include_once Lessekirki::$path . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'class-lessekirki.php';
// Add an empty config for global fields
Lessekirki::add_config('');
/**
 * To enable the demo theme, just add this line to your wp-config.php file:
 * define( 'KIRKI_CONFIG', true );
 * Once you add that line, you'll see a new theme in your dashboard called "Lessekirki Demo".
 * Activate that theme to test all controls.
 */
if (defined('KIRKI_DEMO') && KIRKI_DEMO && file_exists(dirname(__FILE__) . '/demo-theme/style.css')) {
    register_theme_directory(dirname(__FILE__));
}