Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update custom.php #5

Closed
wants to merge 1 commit into from
Closed

Conversation

fre2mansur
Copy link
Contributor

@fre2mansur fre2mansur commented Mar 31, 2018

This changes will help us to create user-custom page . without using of routes to get user-custom.php page instead of custom.php.
we should pass the param.

Ex

function my_user_menu() {
	echo '<li class="opt_mypage" ><a href="' . osc_render_file_url(osc_plugin_folder(__FILE__) . 'user/mypage.php&section=user') . '" >' . __('My Page', 'my_plugin') . '</a></li>';
	}
osc_add_hook('user_menu', 'my_user_menu');

This changes will help us to create user-custom page . without using of routes to get user-custom.php page instead of custom.php.
Some plugin custom pages created for user only. we should pass the param

Ex
function my_user_menu() {
	echo '<li class="opt_mypage" ><a href="' . osc_render_file_url(osc_plugin_folder(__FILE__) . 'user/mypage.php&section=user') . '" >' . __('My Page', 'my_plugin') . '</a></li>';
	}
osc_add_hook('user_menu', 'my_user_menu');
@navjottomer
Copy link
Member

Use of routes is recommended and secure way to create custom user page. Using old method is not accepted.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants