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










share|improve this question






















  • 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















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










share|improve this question






















  • 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













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










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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


















  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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




















































































Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff