'', 'is_external' => '', 'nofollow' => '', 'custom_attributes' => '', ]; } /** * Get url control default settings. * * Retrieve the default settings of the url control. Used to return the default * settings while initializing the url control. * * @since 1.0.0 * * @return array Control default settings */ protected function getDefaultSettings() { return [ 'label_block' => true, 'placeholder' => __('Paste URL or type'), 'autocomplete' => true, 'options' => ['is_external', 'nofollow', 'custom_attributes'], 'dynamic' => [ 'categories' => [TagsModule::URL_CATEGORY], 'property' => 'url', ], ]; } /** * Render url control output in the editor. * * Used to generate the control HTML in the editor using Underscore JS * template. The variables for the class are available using `data` JS * object. * * @since 1.0.0 */ public function contentTemplate() { $control_uid = $this->getControlUid(); $is_external_control_uid = $this->getControlUid('is_external'); $nofollow_control_uid = $this->getControlUid('nofollow'); $custom_attributes_uid = $this->getControlUid('custom_attributes'); ?>
<# if ( data.description ) { #>