--- a/wp/wp-includes/class-wp-customize-control.php Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/class-wp-customize-control.php Fri Sep 05 18:52:52 2025 +0200
@@ -7,6 +7,11 @@
* @since 3.4.0
*/
+// Don't load directly.
+if ( ! defined( 'ABSPATH' ) ) {
+ die( '-1' );
+}
+
/**
* Customize Control class.
*
@@ -242,14 +247,14 @@
}
/**
- * Enqueue control related scripts/styles.
+ * Enqueues control related scripts/styles.
*
* @since 3.4.0
*/
public function enqueue() {}
/**
- * Check whether control is active to current Customizer preview.
+ * Checks whether control is active to current Customizer preview.
*
* @since 4.0.0
*
@@ -287,7 +292,7 @@
}
/**
- * Fetch a setting's value.
+ * Fetches a setting's value.
* Grabs the main setting by default.
*
* @since 3.4.0
@@ -302,7 +307,7 @@
}
/**
- * Refresh the parameters passed to the JavaScript via JSON.
+ * Refreshes the parameters passed to the JavaScript via JSON.
*
* @since 3.4.0
*/
@@ -327,7 +332,7 @@
}
/**
- * Get the data to export to the client via JSON.
+ * Gets the data to export to the client via JSON.
*
* @since 4.1.0
*
@@ -370,7 +375,7 @@
}
/**
- * Get the control's content for insertion into the Customizer pane.
+ * Gets the control's content for insertion into the Customizer pane.
*
* @since 4.1.0
*
@@ -383,7 +388,7 @@
}
/**
- * Check capabilities and render the control.
+ * Checks capabilities and render the control.
*
* @since 3.4.0
* @uses WP_Customize_Control::render()
@@ -432,14 +437,15 @@
}
/**
- * Get the data link attribute for a setting.
+ * Gets the data link attribute for a setting.
*
* @since 3.4.0
* @since 4.9.0 Return a `data-customize-setting-key-link` attribute if a setting is not registered for the supplied setting key.
*
* @param string $setting_key
- * @return string Data link parameter, a `data-customize-setting-link` attribute if the `$setting_key` refers to a pre-registered setting,
- * and a `data-customize-setting-key-link` attribute if the setting is not yet registered.
+ * @return string Data link parameter, a `data-customize-setting-link` attribute if the `$setting_key` refers
+ * to a pre-registered setting, and a `data-customize-setting-key-link` attribute if the setting
+ * is not yet registered.
*/
public function get_link( $setting_key = 'default' ) {
if ( isset( $this->settings[ $setting_key ] ) && $this->settings[ $setting_key ] instanceof WP_Customize_Setting ) {
@@ -450,19 +456,19 @@
}
/**
- * Render the data link attribute for the control's input element.
+ * Renders the data link attribute for the control's input element.
*
* @since 3.4.0
* @uses WP_Customize_Control::get_link()
*
- * @param string $setting_key
+ * @param string $setting_key Default 'default'.
*/
public function link( $setting_key = 'default' ) {
echo $this->get_link( $setting_key );
}
/**
- * Render the custom attributes for the control's input element.
+ * Renders the custom attributes for the control's input element.
*
* @since 4.0.0
*/
@@ -473,7 +479,7 @@
}
/**
- * Render the control's content.
+ * Renders the control's content.
*
* Allows the content to be overridden without having to rewrite the wrapper in `$this::render()`.
*
@@ -608,7 +614,7 @@
$dropdown = str_replace( '<select', '<select ' . $this->get_link() . ' id="' . esc_attr( $input_id ) . '" ' . $describedby_attr, $dropdown );
/*
- * Even more hacikly add auto-draft page stubs.
+ * Even more hackily add auto-draft page stubs.
* @todo Eventually this should be removed in favor of the pages being injected into the underlying get_pages() call.
* See <https://github.com/xwp/wp-customize-posts/pull/250>.
*/
@@ -631,7 +637,7 @@
<?php if ( $this->allow_addition && current_user_can( 'publish_pages' ) && current_user_can( 'edit_theme_options' ) ) : // Currently tied to menus functionality. ?>
<button type="button" class="button-link add-new-toggle">
<?php
- /* translators: %s: Add New Page label. */
+ /* translators: %s: Add Page label. */
printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item );
?>
</button>
@@ -669,7 +675,7 @@
}
/**
- * Render the control's JS template.
+ * Renders the control's JS template.
*
* This function is only run for control types that have been registered with
* WP_Customize_Manager::register_control_type().