options_helper = $options_helper;
}
/**
* Returns the priority which the custom meta's form field should be rendered with.
*
* @return int The priority which the custom meta's form field should be rendered with.
*/
public function get_render_priority(): int {
return 500;
}
/**
* Returns the db key of the Content_Analysis_Disable custom meta.
*
* @return string The db key of the Content_Analysis_Disable custom meta.
*/
public function get_key(): string {
return 'wpseo_content_analysis_disable';
}
/**
* Returns the id of the custom meta's form field.
*
* @return string The id of the custom meta's form field.
*/
public function get_field_id(): string {
return 'wpseo_content_analysis_disable';
}
/**
* Returns the meta value.
*
* @param int $user_id The user ID.
*
* @return string The meta value.
*/
public function get_value( $user_id ): string {
return \get_the_author_meta( $this->get_key(), $user_id );
}
/**
* Returns whether the respective global setting is enabled.
*
* @return bool Whether the respective global setting is enabled.
*/
public function is_setting_enabled(): bool {
return ( $this->options_helper->get( 'content_analysis_active', false ) );
}
/**
* Returns whether the custom meta is allowed to be empty.
*
* @return bool Whether the custom meta is allowed to be empty.
*/
public function is_empty_allowed(): bool {
return true;
}
/**
* Renders the custom meta's field in the user form.
*
* @param int $user_id The user ID.
*
* @return void
*/
public function render_field( $user_id ): void {
echo '
get_value( $user_id ), 'on', false )
. '/>';
echo '
';
echo '
' . \esc_html__( 'Removes the readability analysis section from the metabox and disables all readability-related suggestions.', 'wordpress-seo' ) . '
'; } }