Registers the setting.

@access public
@since 0.1
@param WP_Customize_Manager $wp_customize The customizer instance.
@return void
429695
public function add_setting( $wp_customize ) {

		/**
		 * Allow filtering the arguments.
		 *
		 * @since 0.1
		 * @param array                $this->args   The arguments.
		 * @param WP_Customize_Manager $wp_customize The customizer instance.
		 * @return array                             Return the arguments.
		 */
		$args = apply_filters( 'kirki_field_add_setting_args', $this->args, $wp_customize );
		if ( isset( $args['settings'] ) ) {
			$wp_customize->add_setting( $args['settings'], $args );
		}
	}
629903
public function register()
	{
		$configPath = __DIR__.'/../config/theme.php';

		// Merge config to allow user overwrite.
		$this->mergeConfigFrom($configPath, 'theme');

		$app = $this->app;

		// Register providers:
		$this->registerAsset();
		$this->registerTheme();
		$this->registerWidget();
		$this->registerBreadcrumb();
		$this->registerManifest();

		// Register commands:
		$this->registerThemeGenerator();
		$this->registerWidgetGenerator();
		$this->registerThemeList();
		$this->registerThemeDuplicate();
		$this->registerThemeDestroy();

		// Assign commands:
		$this->commands(
						'theme.create',
						'theme.widget',
						'theme.list',
						'theme.duplicate',
						'theme.destroy'
						);

	}
789600
public function registerJSVariables()
    {
        $object = json_encode($this->localizationData());

        $this->app['hook.factory']->action('wp_head', function () use ($object) {
            echo "<script>var Assely = {$object};</script>";
        })->dispatch();
    }
762816
public function colors( WP_Customize_Manager $wp_customize ) {

		$wp_customize->add_panel(
			'colors',
			array(
				'title'       => esc_html__( 'Colors', 'rock' ),
				'description' => 'Get what you need.',
				'priority'    => 40,
			)
		);

		$wp_customize->add_section(
			'colors-scheme',
			array(
				'title' => esc_html__( 'Color Schemes', 'rock' ),
				'panel' => 'colors',
			)
		);

		$wp_customize->add_section(
			'colors-header',
			array(
				'title' => esc_html__( 'Header', 'rock' ),
				'panel' => 'colors',
			)
		);

		$wp_customize->add_section(
			'colors-menu',
			array(
				'title' => esc_html__( 'Menu', 'rock' ),
				'panel' => 'colors',
			)
		);

		$wp_customize->add_section(
			'colors-buttons',
			array(
				'title' => esc_html__( 'Buttons', 'rock' ),
				'panel' => 'colors',
			)
		);

		$wp_customize->add_section(
			'colors-content',
			array(
				'title' => esc_html__( 'Content', 'rock' ),
				'panel' => 'colors',
			)
		);

		$wp_customize->add_section(
			'colors-footer',
			array(
				'title' => esc_html__( 'Footer', 'rock' ),
				'panel' => 'colors',
			)
		);

		foreach ( $this->colors as $name => $args ) {

			$this->register_color_setting( $wp_customize, $name, $args );

		}

	}
448423
public function register()
    {

        // include the package config
        $this->mergeConfigFrom(
            __DIR__.'/../config/blade.php', 'blade'
        );

        // load the alias (handled by the Laravel autoloader)
        //$this->app->alias('StringBlade', 'Wpb\String_Blade_Compiler\Facades\StringBlade');

        $this->registerEngineResolver();

        $this->registerViewFinder();

        $this->registerFactory();
    }
1073237
protected function registerBackendSettings()
    {
        SettingsManager::instance()->registerCallback(function ($manager) {
            $manager->registerSettingItems('October.Backend', [
                'branding' => [
                    'label'       => 'backend::lang.branding.menu_label',
                    'description' => 'backend::lang.branding.menu_description',
                    'category'    => SettingsManager::CATEGORY_SYSTEM,
                    'icon'        => 'icon-paint-brush',
                    'class'       => 'Backend\Models\BrandSetting',
                    'permissions' => ['backend.manage_branding'],
                    'order'       => 500,
                    'keywords'    => 'brand style'
                ],
                'editor' => [
                    'label'       => 'backend::lang.editor.menu_label',
                    'description' => 'backend::lang.editor.menu_description',
                    'category'    => SettingsManager::CATEGORY_SYSTEM,
                    'icon'        => 'icon-code',
                    'class'       => 'Backend\Models\EditorSetting',
                    'permissions' => ['backend.manage_editor'],
                    'order'       => 500,
                    'keywords'    => 'html code class style'
                ],
                'myaccount' => [
                    'label'       => 'backend::lang.myaccount.menu_label',
                    'description' => 'backend::lang.myaccount.menu_description',
                    'category'    => SettingsManager::CATEGORY_MYSETTINGS,
                    'icon'        => 'icon-user',
                    'url'         => Backend::url('backend/users/myaccount'),
                    'order'       => 500,
                    'context'     => 'mysettings',
                    'keywords'    => 'backend::lang.myaccount.menu_keywords'
                ],
                'preferences' => [
                    'label'       => 'backend::lang.backend_preferences.menu_label',
                    'description' => 'backend::lang.backend_preferences.menu_description',
                    'category'    => SettingsManager::CATEGORY_MYSETTINGS,
                    'icon'        => 'icon-laptop',
                    'url'         => Backend::url('backend/preferences'),
                    'permissions' => ['backend.manage_preferences'],
                    'order'       => 510,
                    'context'     => 'mysettings'
                ],
                'access_logs' => [
                    'label'       => 'backend::lang.access_log.menu_label',
                    'description' => 'backend::lang.access_log.menu_description',
                    'category'    => SettingsManager::CATEGORY_LOGS,
                    'icon'        => 'icon-lock',
                    'url'         => Backend::url('backend/accesslogs'),
                    'permissions' => ['system.access_logs'],
                    'order'       => 920
                ]
            ]);
        });
    }
1038411
public function register( $option_group ) {

		// Register rendering callbacks only for non-grouped controls.
		if ( empty( $this->grouped_with ) ) {
			\add_settings_field( $this->get_id(), $this->short, [ $this, 'render' ], $option_group . $this->tab_id, $this->section, $this->settings_args );
		}
	}
647203
public function register()
    {
        // Store details
        $args = $this->getModel()->getArgs();
        $metaboxes = $this->getModel()->getMetaboxes();
        $slug = $this->getModel()->getSlug();

        // Register post type if not post or page
        if (!in_array($slug, $this->reserved_slugs)) {
            global $wp_rewrite;

            // Action to register
            register_post_type($slug, $args);

            // Option
            $opt = 'permalink_structure_'.$slug;

            // Get value
            $structure = Option::get($opt, '/%'.$slug.'%-%post_id%');

            // Change structure
            $wp_rewrite->add_rewrite_tag('%'.$slug.'%', '([^/]+)', $slug.'=');
            $wp_rewrite->add_permastruct($slug, $structure, false);
        }

        // Check name
        $name = isset($args['labels']['name']) ? $args['labels']['name'] : '';

        // Works on hook
        $hook = new PosttypeHook($slug, $name, $metaboxes, $this->reserved_slugs);
        $this->getModel()->setHook($hook);
    }
48001
public function register_control_types() {
		global $wp_customize;

		$section_types = apply_filters( 'kirki_section_types', [] );
		foreach ( $section_types as $section_type ) {
			$wp_customize->register_section_type( $section_type );
		}

		$this->control_types = $this->default_control_types();
		if ( ! class_exists( 'WP_Customize_Code_Editor_Control' ) ) {
			unset( $this->control_types['code_editor'] );
		}
		foreach ( $this->control_types as $key => $classname ) {
			if ( ! class_exists( $classname ) ) {
				unset( $this->control_types[ $key ] );
			}
		}

		$skip_control_types = apply_filters(
			'kirki_control_types_exclude',
			[
				'\Kirki\Control\Repeater',
				'\WP_Customize_Control',
			]
		);

		foreach ( $this->control_types as $control_type ) {
			if ( ! in_array( $control_type, $skip_control_types, true ) && class_exists( $control_type ) ) {
				$wp_customize->register_control_type( $control_type );
			}
		}
	}
116053
public static function registerSettings()
    {
        if (!Gate::allows('settings_read')) {
            return;
        }

        Agencms::appendRoute(
            Route::load('settings')
                ->addGroup(
                    Group::full('Site')->key('site')->addField(
                        Field::string('title', 'Website Title'),
                        Field::string('title_prefix', 'Title Prefix'),
                        Field::string('title_suffix', 'Title Suffix')
                    )
                )
                ->addGroup(
                    Group::full('Analytics')->key('analytics')->addField(
                        Field::string('ga_code', 'Google Analytics Id')
                    )
                )
        );
    }
1200160
private function register() {

		$this->options['labels'] = $this->label;
		if (!isset($this->options['rewrite'])) {
			$this->options['rewrite'] = array('slug' => $this->singular);
		}

		$_self = &$this;

		add_action('init', function () use (&$_self) {
			register_taxonomy($_self->singular, $_self->post_types, $this->options);
		});

	}
1061480
private function register_commands() {
		foreach ( $this->commands as $class_name ) {
			\WP_CLI::add_command( $class_name::COMMAND_NAME, $class_name );
		}
	}
480843
protected function registerSettings()
    {
        $this->app->singleton('jlourenco.settings', function ($app) {
            $config = $app['config']->get('jlourenco.base');

            $model = array_get($config, 'models.Settings');

            return new SettingsRepository($model);
        });
    }
1014369
public function customize_register( WP_Customize_Manager $wp_customize ) {

		$wp_customize->add_section(
			'layout',
			array(
				'title'      => esc_html__( 'Layout', 'rock' ),
				'priority'   => 30,
				'capability' => 'edit_theme_options',
			)
		);

		if ( ! $this->page_widths ) {

			return;

		}

		reset( $this->page_widths );

		$wp_customize->add_setting(
			'page_width',
			array(
				'default'           => key( $this->page_widths ),
				'sanitize_callback' => 'sanitize_key',
				'transport'         => 'postMessage',
			)
		);

		$wp_customize->add_control(
			'page_width',
			array(
				'label'       => esc_html__( 'Page Width', 'rock' ),
				'description' => esc_html__( 'Display your site differently on larger screens.', 'rock' ),
				'section'     => 'layout',
				'settings'    => 'page_width',
				'type'        => 'radio',
				'choices'     => $this->page_widths,
			)
		);

	}
338201
public function register()
    {
        $this->registerBindings();

        $this->app['setting.settings'] = $this->app->share(function ($app) {
            return new Settings($app[SettingRepository::class]);
        });
        $this->app->booting(function () {
            $loader = AliasLoader::getInstance();
            $loader->alias('Settings', SettingsFacade::class);
        });

        $this->app['setting.themeOptions'] = $this->app->share(function ($app) {
            return new ThemeOptions($this->app['stylist']->current());
        });
    }
1133649
public function set_submit() {
		if ( ! $this->child['config']->is_submitted() ) {
			$data = $this->child['config']->get_data();
			$this->child['config']->struct['attributes']['data-default'] = wp_json_encode( $data );
			$data_template = $this->drill_in( $data );

			$this->child['config']->set_data( $data_template );
		}
	}
176465
public function register()
    {
        $registrars = array(
            new CustomPostTypeRegistrar($this),
            new TaxonomyRegistrar($this)
        );

        foreach ($registrars as $registrar) {
            $registrar->register();
        }
    }