Prev Next

How to Add New Profile Tabs and Content

[et_pb_dmb_code_snippet code=”PD9waHAKCi8vIGFkZCBhIG5ldyB0YWIgdG8gdGhlIHByb2ZpbGUgcGFnZSB1c2luZyB3cGNfcHJvZmlsZV90YWJzIGZpbHRlcgoKYWRkX2ZpbHRlcignd3BjX3Byb2ZpbGVfdGFicycsICd3cGNfd29vX3Byb2ZpbGVfdGFicycpOwoKZnVuY3Rpb24gd3BjX3dvb19wcm9maWxlX3RhYnMoJGNvbnRlbnQpIHsKCgkvLyAkX0dFVFsnd3BjX3ZpZXcnXSBob2xkcyB0aGUgYWN0aXZlIHRhYiB2YWx1ZS4KCgkkY2xhc3MgPSAnJzsKCglpZihpc3NldCgkX0dFVFsnd3BjX3ZpZXcnXSkpewoJCSRjbGFzcyA9ICRfR0VUWyd3cGNfdmlldyddID09ICdteS10YWInID8gJ3dwYy10YWItYWN0aXZlJyA6ICcnOwoJfQoKCXJldHVybiAkY29udGVudCAuICc8YSBjbGFzcz0id3BjLXRhYiAnIC4gJGNsYXNzIC4gJyIgaHJlZj0iP3dwY192aWV3PW15LXRhYiI+PGkgY2xhc3M9ImZhIGZhLWRvbGxhciI+PC9pPiBNeSBUYWI8L2E+JzsKCn0KCi8vIGFkZCB0aGUgdGFiIGNvbnRlbnQgdXNpbmcgdGhlIGZpbHRlciB3cGNfcHJvZmlsZV90YWJfY29udGVudAoKYWRkX2ZpbHRlcignd3BjX3Byb2ZpbGVfdGFiX2NvbnRlbnQnLCAnd3BjX3Byb2ZpbGVfd29vX2NvbnRlbnQnKTsKCmZ1bmN0aW9uIHdwY19wcm9maWxlX3dvb19jb250ZW50KCRjb250ZW50KXsKCglpZiggJF9HRVRbJ3dwY192aWV3J10gPT0gJ215LXRhYicgKXsKCQkkY29udGVudCAuPSAnWW91ciBjb250ZW50IGhlcmUuJzsKCX0KCglyZXR1cm4gJGNvbnRlbnQ7Cgp9Cgo/Pg==” language=”php” style=”github” linenums=”on” _builder_version=”4.6.5″]PD9waHAKCi8vIGFkZCBhIG5ldyB0YWIgdG8gdGhlIHByb2ZpbGUgcGFnZSB1c2luZyB3cGNfcHJvZmlsZV90YWJzIGZpbHRlcgoKYWRkX2ZpbHRlcignd3BjX3Byb2ZpbGVfdGFicycsICd3cGNfd29vX3Byb2ZpbGVfdGFicycpOwoKZnVuY3Rpb24gd3BjX3dvb19wcm9maWxlX3RhYnMoJGNvbnRlbnQpIHsKCgkvLyAkX0dFVFsnd3BjX3ZpZXcnXSBob2xkcyB0aGUgYWN0aXZlIHRhYiB2YWx1ZS4KCgkkY2xhc3MgPSAnJzsKCglpZihpc3NldCgkX0dFVFsnd3BjX3ZpZXcnXSkpewoJCSRjbGFzcyA9ICRfR0VUWyd3cGNfdmlldyddID09ICdteS10YWInID8gJ3dwYy10YWItYWN0aXZlJyA6ICcnOwoJfQoKCXJldHVybiAkY29udGVudCAuICc8YSBjbGFzcz0id3BjLXRhYiAnIC4gJGNsYXNzIC4gJyIgaHJlZj0iP3dwY192aWV3PW15LXRhYiI+PGkgY2xhc3M9ImZhIGZhLWRvbGxhciI+PC9pPiBNeSBUYWI8L2E+JzsKCn0KCi8vIGFkZCB0aGUgdGFiIGNvbnRlbnQgdXNpbmcgdGhlIGZpbHRlciB3cGNfcHJvZmlsZV90YWJfY29udGVudAoKYWRkX2ZpbHRlcignd3BjX3Byb2ZpbGVfdGFiX2NvbnRlbnQnLCAnd3BjX3Byb2ZpbGVfd29vX2NvbnRlbnQnKTsKCmZ1bmN0aW9uIHdwY19wcm9maWxlX3dvb19jb250ZW50KCRjb250ZW50KXsKCglpZiggJF9HRVRbJ3dwY192aWV3J10gPT0gJ215LXRhYicgKXsKCQkkY29udGVudCAuPSAnWW91ciBjb250ZW50IGhlcmUuJzsKCX0KCglyZXR1cm4gJGNvbnRlbnQ7Cgp9Cgo/Pg==[/et_pb_dmb_code_snippet]