WPIntell

Source evidence

Show Childify Me button only to the networkadmin

Childify Me · support · 2016-03-03T16:26:00+00:00

complaintsentiment
mediumseverity
0.93relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 20 rows with source links

35.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

13 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
t2m unresolved
Hi I am using Cutomizr Pro theme which recommends using Childify Me plugin to create child themes. I, however, need Childify Me button in WordPress Customizer visible only for network admin (I’m using WordPress in Multisite configuration). Can I do that? How? Regards! https://wordpress.org/plugins/childify-me/ Hello t2m, to keep the plugin as simple as possible I tried to avoid adding settings page, so this is not possible at the moment without changing the code. Anyway the change to do in your case is pretty easy: put this (or something equivalent – take a look at the network admin role caps ) if ( is_multisite() && ! current_user_can('manage_network_themes') ) return; at this line -> https://github.com/eri-trabiccolo/childify-me/blob/master/childify-me.php#L53 Hope this helps p.s. be sure to not make errors while copy pasting that line, or test it in local / make a backup. Well as network admin you sure now how to manage your site 😉 Hi d4z_c0nf Thanks for your help. I’m not sure why but I didn’t get the follow-up mail. Anyway, that works and thanks for that! I, however, have another question or rather a request. Can’t you add some filter at that line so that one could add the code you provided into functions.php. This is recommended if we want our changes to servive plugin updates. 🙂 Thanks! Glad to hear that. The problem with the request is that .. well to achieve that you should add the add_filter in the fuctions.php of the parent theme, of any parent theme you wish to “childify” .. so don’t think is the perfect solution. I should think about some kind of easy to use way. A setting page just for that looks too much. Maybe I can think at some config file. Will let you know 😉 Thanks for your feedback, much appreciated! Rocco Yes you have point and my request is misplaced. It is rather specific requirement and of course is not wise to add complexity just for that. Thanks for listening though. Even that’s also a great thing. 😉 Have a nice weekend! Thanks! 😀 Have a nice weekend you too..

Comments

5 shown
Rocco Aliberti 2016-03-03T17:09:00+00:00

Hello t2m, to keep the plugin as simple as possible I tried to avoid adding settings page, so this is not possible at the moment without changing the code. Anyway the change to do in your case is pretty easy: put this (or something equivalent – take a look at the network admin role caps ) if ( is_multisite() && ! current_user_can('manage_network_themes') ) return; at this line -> https://github.com/eri-trabiccolo/childify-me/blob/master/childify-me.php#L53 Hope this helps p.s. be sure to not make errors while copy pasting that line, or test it in local / make a backup. Well as network admin you sure now how to manage your site 😉

t2m 2016-05-27T13:44:00+00:00

Hi d4z_c0nf Thanks for your help. I’m not sure why but I didn’t get the follow-up mail. Anyway, that works and thanks for that! I, however, have another question or rather a request. Can’t you add some filter at that line so that one could add the code you provided into functions.php. This is recommended if we want our changes to servive plugin updates. 🙂 Thanks!

Rocco Aliberti 2016-05-27T13:55:00+00:00

Glad to hear that. The problem with the request is that .. well to achieve that you should add the add_filter in the fuctions.php of the parent theme, of any parent theme you wish to “childify” .. so don’t think is the perfect solution. I should think about some kind of easy to use way. A setting page just for that looks too much. Maybe I can think at some config file. Will let you know 😉 Thanks for your feedback, much appreciated! Rocco

t2m 2016-05-27T17:39:00+00:00

Yes you have point and my request is misplaced. It is rather specific requirement and of course is not wise to add complexity just for that. Thanks for listening though. Even that’s also a great thing. 😉 Have a nice weekend!

Rocco Aliberti 2016-05-28T10:03:00+00:00

Thanks! 😀 Have a nice weekend you too..