andyandy's avatar

Help with Wordpress plugin - looking for source files

Sorry for offtopic, maybe somebody knows.

In Wordpress Admin menu there are some standard links, like Posts, Settings etc. and one of these links is a custom link to custom subpage. It runs on url

wp-admin/admin.php?page=my-custom-admin-page
wp-admin/admin.php?page=my-custom-admin-page-add-new

I'm assuming it's a custom made plugin. But no matter what I can't find source files of this plugin. I downloaded all files from server and searched them for "my-custom-admin-page". I also exported entire database and searched it for "my-custom-admin-page".

0 results.

That subpage uses custom CSS, in the source code I can see:

<div class="my-custom-table-class">

Again I searched all files on FTP for "my-custom-table-class" and again 0 results. I searched entire DB for it. 0 results.

I don't get it! Where are source files of that custom admin subpage?!

That subpage also displays data from MySQL table my_custom_mysql_table. Yet again on FTP there is not a single file containing "my_custom_mysql_table" string.

0 likes
5 replies
Sinnbeck's avatar

First find out if it is a plugin. Rename the plugins folder to plugins2 and see if it disappears

andyandy's avatar

Once I renamed Advance custom fields pro 'inner content' of webpage started showing error 500, but it didn't disappear from menu. So it's probably build on it. But the main script is custom, since it stays.

andyandy's avatar

Yeah, but where to find the main thing, that is using Advanced fields and is making that link in menu....I can't see anything.... .

MarianoMoreyra's avatar

Hi @andyandy

A new menu item can be added from a custom plugin as you said, or at a functions.php at the child theme (provided that the theme was customized using a child theme as it should be).

You should be searching for the function add_menu_page() in which case the 4th parameter should be the slug you mentioned.

ref: https://developer.wordpress.org/reference/functions/add_menu_page/

Anyway, it's weird that you say you've searched on every file for the slug and it didn't showed up.

Also, depending on the type of menu, you may want to search for these functions too:

add_object_page()
add_utility_page()
add_submenu_page()

I leave this other article here so you can see if it gives you other ideas of what / where to search: https://codex.wordpress.org/Adding_Administration_Menus

Hope this helps!

Please or to participate in this conversation.