Answers.Body: <p>Personally speaking, I think your proposed plugin goes against the separation of front-end and back-end that is a deliberate feature of WordPress. You might be able to do it, but should you?</p>
  <blockquote>
  <p>when CiviCRM is running under WordPress: the administrator of CiviCRM has full access to all the settings of WordPress</p>
  </blockquote>
  <p>This is not true. Please look again at roles and capabilities and what they mean when accessing the WordPress admin. Users can only ever see (and do) what you expose to them via the relevant role and/or capability. The fact that others also misunderstand the architecture of WordPress doesn't seem relevant to me.</p>
  <p>FWIW, <a href="https://wordpress.org/plugins/civicrm-admin-utilities/" rel="nofollow noreferrer">CiviCRM Admin Utilities</a> has a &quot;CiviCRM Shortcuts&quot; menu that has links to various CiviCRM admin screens depending on a User's CiviCRM permissions. It appears on the front-end (if the theme allows the WordPress top menu to be shown) so you <em>could</em> customise it to suit your needs via <a href="https://github.com/christianwach/civicrm-admin-utilities/blob/d77cc0025185c3408013a3244bc14f91e4bff80a/includes/civicrm-admin-utilities-single.php#L2238" rel="nofollow noreferrer">the available actions</a> - but the resultant CiviCRM admin screens would <em>always</em> be rendered in the WordPress back-end rather than wrapped in the front-end theme.</p>
  <p>If you <em>really really</em> have to hide CiviCRM admin screens from your Users, you could:</p>
  <ul>
  <li>Use CiviCRM Profiles to build forms for the front-end</li>
  <li>Use a form builder of some kind to build custom forms that interact with the CiviCRM data that you want your Users to access and/or update.</li>
  </ul>
  <p>There are a number of plugins out there that provide this functionality.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-10T15:17:28.347Z
Answers.Text: I appreciate your suggestions. I will dig into these. Regarding the separation front-end back-end of WP: giving access to the back-end of CiviCRM without giving access to the back-end of WP makes sense, since WP and CiviCRM use a separate set of tables, and in some case separate databases. The administrator of CiviCRM doesn't need to be the administrator of WP.
Answers.UserDisplayName: Pierre François
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-10T19:07:32.817Z
Answers.Text: Technically, all CiviCRM admin pages *can* be accessed via the front-end "base page". So, for example, try https://your.site/civicrm/contact/view/?reset=1&cid=<some-id> where <some-id> is the ID of a Contact in your database. This will show the CiviCRM UI for that Contact, though the style and javascript is likely to be messed up. You could try and fix the front-end CSS and JS to make it work as expected, but I still wonder if it's worthwhile!
Answers.UserDisplayName: Christian Wach
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-10T14:43:47.573Z
Answers.LastActivityDate: 2021-12-10T14:43:47.573Z
Answers.UserDisplayName: Christian Wach
Body: <p>CiviCRM running under Drupal gives the possibility to some users to access a complete menu for managing CiviCRM without giving them access to the settings of the CMS.</p>
  <p>It seems this is not possible when CiviCRM is running under WordPress: the administrator of CiviCRM has full access to all the settings of WordPress, which is not an option in our case.</p>
  <p>After some painful experiences with Drupal regarding the hassle of the updates, we decided to switch to WordPress, without knowing about this issue.</p>
  <p>We are not the only ones concerned by that issue:</p>
  <ul>
  <li><a href="https://civicrm.stackexchange.com/questions/11434/how-do-we-set-up-wordpress-front-end-pages-to-allow-our-team-to-access-civicrm-a">How do we set up WordPress front end pages to allow our team to access CiviCRM admin tabs etc.?</a></li>
  <li><a href="https://civicrm.stackexchange.com/questions/18782/create-a-login-page-for-wordpress-users-to-access-civicrm-but-not-wordpress-func">Create a Login page for wordpress users to access civicrm but not wordpress functionality</a></li>
  <li><a href="https://civicrm.stackexchange.com/questions/40825/no-civicrm-link-in-my-wordpress-menu-after-migration-from-drupal-to-wordpress">No CiviCRM link in my WordPress menu after migration from Drupal to Wordpress</a> (that's me)</li>
  <li><a href="https://civicrm.stackexchange.com/questions/39504/how-to-set-up-basic-civicrm-access-for-a-user-in-wordpress">How to set up basic CiviCRM access for a user in WordPress?</a></li>
  </ul>
  <p>We are disposed to write an extension of CiviCRM allowing a user with enough rights to get the full menu of CiviCRM from the user side of the website, but we need some pointers to start somewhere. We are thinking about a static page containing the javascript code to launch the full CiviCRM management menu.</p>
  <p>Any help would be appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-10T15:31:08.163Z
Comments.Text: Do you mind to elaborate what are the "painful experiences with Drupal regarding the hassle of the updates". Do you mean updating things like Drupal 7 to 8 or 8 to 9 ? if so what are the issues?
Comments.UserDisplayName: salah-1
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-11T23:19:30.910Z
Comments.Text: @salah-1: I am disappointed there is no upgrade tool for updating Drupal 7 from the GUI. I tried to update manually to Drupal 8 but didn't succeed. I had to write my own scripts for everal maintenance operations. I tried to make the site compatible first with `drush` then with `composer`, but some mutual dependencies were difficult to solve. At a certain moment, I was fed up and recorded the ease to maintain WordPress websites and decided to switch to that platform.
Comments.UserDisplayName: Pierre François
Tags: <wordpress><civicrm-home>
Title: Where should I start for writing a CiviCRM plugin for allowing some Wordpress users to access the CiviCRM menu from the front end of Wordpress?
ThreadText: # Where should I start for writing a CiviCRM plugin for allowing some Wordpress users to access the CiviCRM menu from the front end of Wordpress?
  
  (Asked by: username_0 on 2021-12-10)
  
  CiviCRM running under Drupal gives the possibility to some users to access a complete menu for managing CiviCRM without giving them access to the settings of the CMS.
  
  It seems this is not possible when CiviCRM is running under WordPress: the administrator of CiviCRM has full access to all the settings of WordPress, which is not an option in our case.
  
  After some painful experiences with Drupal regarding the hassle of the updates, we decided to switch to WordPress, without knowing about this issue.
  
  We are not the only ones concerned by that issue:
  
  * [How do we set up WordPress front end pages to allow our team to access CiviCRM admin tabs etc.?](https://civicrm.stackexchange.com/questions/11434/how-do-we-set-up-wordpress-front-end-pages-to-allow-our-team-to-access-civicrm-a)
  * [Create a Login page for wordpress users to access civicrm but not wordpress functionality](https://civicrm.stackexchange.com/questions/18782/create-a-login-page-for-wordpress-users-to-access-civicrm-but-not-wordpress-func)
  * [No CiviCRM link in my WordPress menu after migration from Drupal to Wordpress](https://civicrm.stackexchange.com/questions/40825/no-civicrm-link-in-my-wordpress-menu-after-migration-from-drupal-to-wordpress) (that's me)
  * [How to set up basic CiviCRM access for a user in WordPress?](https://civicrm.stackexchange.com/questions/39504/how-to-set-up-basic-civicrm-access-for-a-user-in-wordpress)
  
  We are disposed to write an extension of CiviCRM allowing a user with enough rights to get the full menu of CiviCRM from the user side of the website, but we need some pointers to start somewhere. We are thinking about a static page containing the javascript code to launch the full CiviCRM management menu.
  
  Any help would be appreciated.
  
  **Tags:** wordpress, civicrm-home
  
  > **Comments:**
  > **username_1**: Do you mind to elaborate what are the "painful experiences with Drupal regarding the hassle of the updates". Do you mean updating things like Drupal 7 to 8 or 8 to 9 ? if so what are the issues?  
  > **username_0**: @username_1: I am disappointed there is no upgrade tool for updating Drupal 7 from the GUI. I tried to update manually to Drupal 8 but didn't succeed. I had to write my own scripts for everal maintenance operations. I tried to make the site compatible first with `drush` then with `composer`, but some mutual dependencies were difficult to solve. At a certain moment, I was fed up and recorded the ease to maintain WordPress websites and decided to switch to that platform.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-12-10. Score: 1
  
  Personally speaking, I think your proposed plugin goes against the separation of front-end and back-end that is a deliberate feature of WordPress. You might be able to do it, but should you?
  
  > when CiviCRM is running under WordPress: the administrator of CiviCRM has full access to all the settings of WordPress
  
  This is not true. Please look again at roles and capabilities and what they mean when accessing the WordPress admin. Users can only ever see (and do) what you expose to them via the relevant role and/or capability. The fact that others also misunderstand the architecture of WordPress doesn't seem relevant to me.
  
  FWIW, [CiviCRM Admin Utilities](https://wordpress.org/plugins/civicrm-admin-utilities/) has a "CiviCRM Shortcuts" menu that has links to various CiviCRM admin screens depending on a User's CiviCRM permissions. It appears on the front-end (if the theme allows the WordPress top menu to be shown) so you *could* customise it to suit your needs via [the available actions](https://github.com/username_2/civicrm-admin-utilities/blob/d77cc0025185c3408013a3244bc14f91e4bff80a/includes/civicrm-admin-utilities-single.php#L2238) - but the resultant CiviCRM admin screens would *always* be rendered in the WordPress back-end rather than wrapped in the front-end theme.
  
  If you *really really* have to hide CiviCRM admin screens from your Users, you could:
  
  * Use CiviCRM Profiles to build forms for the front-end
  * Use a form builder of some kind to build custom forms that interact with the CiviCRM data that you want your Users to access and/or update.
  
  There are a number of plugins out there that provide this functionality.
  
  > **Comments:**
  > **username_0**: I appreciate your suggestions. I will dig into these. Regarding the separation front-end back-end of WP: giving access to the back-end of CiviCRM without giving access to the back-end of WP makes sense, since WP and CiviCRM use a separate set of tables, and in some case separate databases. The administrator of CiviCRM doesn't need to be the administrator of WP.  
  > **username_2**: Technically, all CiviCRM admin pages *can* be accessed via the front-end "base page". So, for example, try https://your.site/civicrm/contact/view/?reset=1&cid=<some-id> where <some-id> is the ID of a Contact in your database. This will show the CiviCRM UI for that Contact, though the style and javascript is likely to be messed up. You could try and fix the front-end CSS and JS to make it work as expected, but I still wonder if it's worthwhile!  
  
  ---
  
  