File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
framework/Page_Builder/v25/Traits Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,18 @@ public function add_widget_options( $fields ) {
7575 * Register widget layouts available
7676 *
7777 * @param string $class_name relative or absolute class name of Widget Layout to be registered.
78+ * @param string $title optional. to rewrite row layout title.
7879 */
79- public function register_widget_layout ( $ class_name ) {
80+ public function register_widget_layout ( $ class_name, $ title = '' ) {
8081 if ( strpos ( $ class_name , '\\' ) !== 0 ) {
8182 $ class_name = $ this ->default_layout_namespace . '\\' . $ class_name ;
8283 }
8384
84- $ widget_layout = new $ class_name ();
85+ $ widget_layout = new $ class_name ();
86+ if ( ! empty ( $ title ) ) {
87+ $ widget_layout ::$ TITLE = $ title ;
88+ }
89+
8590 $ this ->widgets [ $ widget_layout ::$ ID ] = $ widget_layout ;
8691 }
8792
You can’t perform that action at this time.
0 commit comments