Visual Composer - Overwrite class
up vote
0
down vote
favorite
I'm working on a Wordpress website using Visual Composer (WPBakery).
I had to modify some classes in the core of the plugin, for example,
I modified this class : WPBakeryShortCode_VC_Tta_Section
The problem is I had to modify functions in the core of the plugin (shortcodes/vc-tta-section.php).
I didn't found any solution to overwrite a class of Visual Composer. Even If I extends this class and add my own code, I would have to call my own class, but didn't found anything in the code that could help me to modify base class used WPBakeryShortCode_VC_Tta_Section to WPBakeryShortCode_VC_Tta_Section_CUSTOM for example.
Thanks for your help
php wordpress
|
show 3 more comments
up vote
0
down vote
favorite
I'm working on a Wordpress website using Visual Composer (WPBakery).
I had to modify some classes in the core of the plugin, for example,
I modified this class : WPBakeryShortCode_VC_Tta_Section
The problem is I had to modify functions in the core of the plugin (shortcodes/vc-tta-section.php).
I didn't found any solution to overwrite a class of Visual Composer. Even If I extends this class and add my own code, I would have to call my own class, but didn't found anything in the code that could help me to modify base class used WPBakeryShortCode_VC_Tta_Section to WPBakeryShortCode_VC_Tta_Section_CUSTOM for example.
Thanks for your help
php wordpress
Why you need to modify the class? That is not a good way to modify the plugin.
– Tristup
Nov 8 at 11:07
@tristup I needed to add a tab on each accordion with a specific class. And needed to change the tab_id with the title of the accordion instead of the random numbers/letters
– Théo Benoit
Nov 8 at 11:13
I think there are two boxes are already there in accordian section, please check the screenshot drive.google.com/file/d/18l9JRmIq3EoWUvwGTDjTzqhzVm93VY1-/…
– Tristup
Nov 8 at 11:19
@Tristup I mean, add a tab on EACH accordion with a certain class on the accordion. Without the needs to set it up on each pages (there is more than 50 pages with that. So I don't really want to change EACH pages if client have to change a thing in the tab, you see ?)
– Théo Benoit
Nov 8 at 11:29
1
Did you try extending the class in your functions.php file? : "The function can be called by extending the class WPBakeryShortCode_VC_Tta_Section. It can be called either using the html overriding process or via your child theme functions.php" ... from: [link]codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
– Jamie_D
Nov 8 at 17:03
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm working on a Wordpress website using Visual Composer (WPBakery).
I had to modify some classes in the core of the plugin, for example,
I modified this class : WPBakeryShortCode_VC_Tta_Section
The problem is I had to modify functions in the core of the plugin (shortcodes/vc-tta-section.php).
I didn't found any solution to overwrite a class of Visual Composer. Even If I extends this class and add my own code, I would have to call my own class, but didn't found anything in the code that could help me to modify base class used WPBakeryShortCode_VC_Tta_Section to WPBakeryShortCode_VC_Tta_Section_CUSTOM for example.
Thanks for your help
php wordpress
I'm working on a Wordpress website using Visual Composer (WPBakery).
I had to modify some classes in the core of the plugin, for example,
I modified this class : WPBakeryShortCode_VC_Tta_Section
The problem is I had to modify functions in the core of the plugin (shortcodes/vc-tta-section.php).
I didn't found any solution to overwrite a class of Visual Composer. Even If I extends this class and add my own code, I would have to call my own class, but didn't found anything in the code that could help me to modify base class used WPBakeryShortCode_VC_Tta_Section to WPBakeryShortCode_VC_Tta_Section_CUSTOM for example.
Thanks for your help
php wordpress
php wordpress
asked Nov 8 at 10:39
Théo Benoit
7216
7216
Why you need to modify the class? That is not a good way to modify the plugin.
– Tristup
Nov 8 at 11:07
@tristup I needed to add a tab on each accordion with a specific class. And needed to change the tab_id with the title of the accordion instead of the random numbers/letters
– Théo Benoit
Nov 8 at 11:13
I think there are two boxes are already there in accordian section, please check the screenshot drive.google.com/file/d/18l9JRmIq3EoWUvwGTDjTzqhzVm93VY1-/…
– Tristup
Nov 8 at 11:19
@Tristup I mean, add a tab on EACH accordion with a certain class on the accordion. Without the needs to set it up on each pages (there is more than 50 pages with that. So I don't really want to change EACH pages if client have to change a thing in the tab, you see ?)
– Théo Benoit
Nov 8 at 11:29
1
Did you try extending the class in your functions.php file? : "The function can be called by extending the class WPBakeryShortCode_VC_Tta_Section. It can be called either using the html overriding process or via your child theme functions.php" ... from: [link]codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
– Jamie_D
Nov 8 at 17:03
|
show 3 more comments
Why you need to modify the class? That is not a good way to modify the plugin.
– Tristup
Nov 8 at 11:07
@tristup I needed to add a tab on each accordion with a specific class. And needed to change the tab_id with the title of the accordion instead of the random numbers/letters
– Théo Benoit
Nov 8 at 11:13
I think there are two boxes are already there in accordian section, please check the screenshot drive.google.com/file/d/18l9JRmIq3EoWUvwGTDjTzqhzVm93VY1-/…
– Tristup
Nov 8 at 11:19
@Tristup I mean, add a tab on EACH accordion with a certain class on the accordion. Without the needs to set it up on each pages (there is more than 50 pages with that. So I don't really want to change EACH pages if client have to change a thing in the tab, you see ?)
– Théo Benoit
Nov 8 at 11:29
1
Did you try extending the class in your functions.php file? : "The function can be called by extending the class WPBakeryShortCode_VC_Tta_Section. It can be called either using the html overriding process or via your child theme functions.php" ... from: [link]codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
– Jamie_D
Nov 8 at 17:03
Why you need to modify the class? That is not a good way to modify the plugin.
– Tristup
Nov 8 at 11:07
Why you need to modify the class? That is not a good way to modify the plugin.
– Tristup
Nov 8 at 11:07
@tristup I needed to add a tab on each accordion with a specific class. And needed to change the tab_id with the title of the accordion instead of the random numbers/letters
– Théo Benoit
Nov 8 at 11:13
@tristup I needed to add a tab on each accordion with a specific class. And needed to change the tab_id with the title of the accordion instead of the random numbers/letters
– Théo Benoit
Nov 8 at 11:13
I think there are two boxes are already there in accordian section, please check the screenshot drive.google.com/file/d/18l9JRmIq3EoWUvwGTDjTzqhzVm93VY1-/…
– Tristup
Nov 8 at 11:19
I think there are two boxes are already there in accordian section, please check the screenshot drive.google.com/file/d/18l9JRmIq3EoWUvwGTDjTzqhzVm93VY1-/…
– Tristup
Nov 8 at 11:19
@Tristup I mean, add a tab on EACH accordion with a certain class on the accordion. Without the needs to set it up on each pages (there is more than 50 pages with that. So I don't really want to change EACH pages if client have to change a thing in the tab, you see ?)
– Théo Benoit
Nov 8 at 11:29
@Tristup I mean, add a tab on EACH accordion with a certain class on the accordion. Without the needs to set it up on each pages (there is more than 50 pages with that. So I don't really want to change EACH pages if client have to change a thing in the tab, you see ?)
– Théo Benoit
Nov 8 at 11:29
1
1
Did you try extending the class in your functions.php file? : "The function can be called by extending the class WPBakeryShortCode_VC_Tta_Section. It can be called either using the html overriding process or via your child theme functions.php" ... from: [link]codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
– Jamie_D
Nov 8 at 17:03
Did you try extending the class in your functions.php file? : "The function can be called by extending the class WPBakeryShortCode_VC_Tta_Section. It can be called either using the html overriding process or via your child theme functions.php" ... from: [link]codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
– Jamie_D
Nov 8 at 17:03
|
show 3 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205994%2fvisual-composer-overwrite-class%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Why you need to modify the class? That is not a good way to modify the plugin.
– Tristup
Nov 8 at 11:07
@tristup I needed to add a tab on each accordion with a specific class. And needed to change the tab_id with the title of the accordion instead of the random numbers/letters
– Théo Benoit
Nov 8 at 11:13
I think there are two boxes are already there in accordian section, please check the screenshot drive.google.com/file/d/18l9JRmIq3EoWUvwGTDjTzqhzVm93VY1-/…
– Tristup
Nov 8 at 11:19
@Tristup I mean, add a tab on EACH accordion with a certain class on the accordion. Without the needs to set it up on each pages (there is more than 50 pages with that. So I don't really want to change EACH pages if client have to change a thing in the tab, you see ?)
– Théo Benoit
Nov 8 at 11:29
1
Did you try extending the class in your functions.php file? : "The function can be called by extending the class WPBakeryShortCode_VC_Tta_Section. It can be called either using the html overriding process or via your child theme functions.php" ... from: [link]codecanyon.net/item/visual-composer-page-builder-for-wordpress/…
– Jamie_D
Nov 8 at 17:03