<# } #>
<# if ( data.theme.screenshot && data.theme.screenshot[0] ) { #>
<# } else { #>
<# } #>
<# if ( 'installed' === data.theme.type && data.theme.hasUpdate ) { #>
<# if ( data.theme.updateResponse.compatibleWP && data.theme.updateResponse.compatiblePHP ) { #>
' . __( 'Update now' ) . ''
);
}
?>
<# } else { #>
<# if ( ! data.theme.updateResponse.compatibleWP && ! data.theme.updateResponse.compatiblePHP ) { #>
Please update WordPress, and then learn more about updating PHP.' ),
self_admin_url( 'update-core.php' ),
esc_url( wp_get_update_php_url() )
);
wp_update_php_annotation( '
', '' );
} elseif ( current_user_can( 'update_core' ) ) {
printf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( 'Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
} elseif ( current_user_can( 'update_php' ) ) {
printf(
/* translators: %s: URL to Update PHP page. */
' ' . __( 'Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
wp_update_php_annotation( '
', '' );
}
?>
<# } else if ( ! data.theme.updateResponse.compatibleWP ) { #>
Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
}
?>
<# } else if ( ! data.theme.updateResponse.compatiblePHP ) { #>
Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
wp_update_php_annotation( '
', '' );
}
?>
<# } #>
<# } #>
<# } #>
<# if ( ! data.theme.compatibleWP || ! data.theme.compatiblePHP ) { #>
<# if ( ! data.theme.compatibleWP && ! data.theme.compatiblePHP ) { #>
Please update WordPress, and then learn more about updating PHP.' ),
self_admin_url( 'update-core.php' ),
esc_url( wp_get_update_php_url() )
);
wp_update_php_annotation( '
', '' );
} elseif ( current_user_can( 'update_core' ) ) {
printf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( 'Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
} elseif ( current_user_can( 'update_php' ) ) {
printf(
/* translators: %s: URL to Update PHP page. */
' ' . __( 'Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
wp_update_php_annotation( '
', '' );
}
?>
<# } else if ( ! data.theme.compatibleWP ) { #>
Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
}
?>
<# } else if ( ! data.theme.compatiblePHP ) { #>
Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
wp_update_php_annotation( '
', '' );
}
?>
<# } #>
<# } #>
<# if ( data.theme.active ) { #>
'success',
'additional_classes' => array( 'notice-alt' ),
)
);
?>
<# } else if ( 'installed' === data.theme.type ) { #>
<# if ( data.theme.blockTheme ) { #>
{{ data.theme.name }}
<# if ( data.theme.actions.activate ) { #>
<# } #>
<# if ( data.theme.actions.activate ) { #>
activate this theme, and use the Site Editor to customize it.' ),
'{{{ data.theme.actions.activate }}}'
);
?>
<# } #>
'error',
'additional_classes' => array( 'notice-alt' ),
)
);
?>
<# } else { #>
{{ data.theme.name }}
<# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #>
<# } else { #>
<# } #>
'success',
'additional_classes' => array( 'notice-alt' ),
)
);
?>
<# } #>
<# } else { #>
{{ data.theme.name }}
<# if ( data.theme.compatibleWP && data.theme.compatiblePHP ) { #>
<# } else { #>
<# } #>
<# } #>
action;
$exported['filter_type'] = $this->filter_type;
return $exported;
}
/**
* Renders a themes section as a JS template.
*
* The template is only rendered by PHP once, so all actions are prepared at once on the server side.
*
* @since 4.9.0
*/
protected function render_template() {
?>
<# } #>
value();
if ( $value ) {
// Get the attachment model for the existing file.
$attachment_id = attachment_url_to_postid( $value );
if ( $attachment_id ) {
$this->json['attachment'] = wp_prepare_attachment_for_js( $attachment_id );
}
}
}
}
class-wp-widget-area-customize-control.php 0000644 00000003267 15122362563 0014710 0 ustar 00 json[ $key ] = $this->$key;
}
}
/**
* Renders the control's content.
*
* @since 3.9.0
*/
public function render_content() {
$id = 'reorder-widgets-desc-' . str_replace( array( '[', ']' ), array( '-', '' ), $this->id );
?>
json[ $key ] = $this->$key;
}
// Get the widget_control and widget_content.
require_once ABSPATH . 'wp-admin/includes/widgets.php';
$widget = $wp_registered_widgets[ $this->widget_id ];
if ( ! isset( $widget['params'][0] ) ) {
$widget['params'][0] = array();
}
$args = array(
'widget_id' => $widget['id'],
'widget_name' => $widget['name'],
);
$args = wp_list_widget_controls_dynamic_sidebar(
array(
0 => $args,
1 => $widget['params'][0],
)
);
$widget_control_parts = $this->manager->widgets->get_widget_control_parts( $args );
$this->json['widget_control'] = $widget_control_parts['control'];
$this->json['widget_content'] = $widget_control_parts['content'];
}
/**
* Override render_content to be no-op since content is exported via to_json for deferred embedding.
*
* @since 3.9.0
*/
public function render_content() {}
/**
* Whether the current widget is rendered on the page.
*
* @since 4.0.0
*
* @return bool Whether the widget is rendered.
*/
public function active_callback() {
return $this->manager->widgets->is_widget_rendered( $this->widget_id );
}
}
class-wp-sidebar-block-editor-control.php 0000644 00000001256 15122362563 0014460 0 ustar 00