Changeset 1772316
- Timestamp:
- 11/21/2017 01:14:24 PM (8 years ago)
- Location:
- permissions-editor-for-ninja-forms/trunk
- Files:
-
- 3 edited
-
penf_role_matrix.php (modified) (1 diff)
-
permissions-editor-for-ninja_forms.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
permissions-editor-for-ninja-forms/trunk/penf_role_matrix.php
r1771338 r1772316 2 2 global $wp_roles; 3 3 ?> 4 <h1> Permissions Editor for Ninja Forms</h1>5 <p> Simply use the matrix below to select the Ninja Forms capabilities that you wish to enable the different user roles to have access to.</p>6 <p> Please note that 'View Menu' is required for any other capabilities and will be completed automatically upon selection of other capabilities.</p>7 <h2> Overview of each capability:</h2>4 <h1><?= __('Permissions Editor for Ninja Forms', 'permissions-editor-for-ninja-forms') ?></h1> 5 <p><?= __('Simply use the matrix below to select the Ninja Forms capabilities that you wish to enable the different user roles to have access to.', 'permissions-editor-for-ninja-forms') ?></p> 6 <p><?= __('Please note that \'View Menu\' is required for any other capabilities and will be completed automatically upon selection of other capabilities.', 'permissions-editor-for-ninja-forms') ?></p> 7 <h2><?= __('Overview of each capability:', 'permissions-editor-for-ninja-forms') ?></h2> 8 8 <ul> 9 <li><strong> Manage</strong> - enables the user to add new forms, edit/manage existing forms and access the Ninja Forms 'Add-ons'</li>10 <li><strong> Submissions</strong> - enables the user to view the submissions from form users</li>11 <li><strong> Import / Export</strong> - provides the user with access to the Import / Export options for Ninja Forms</li>12 <li><strong> Settings</strong> - provides user with access to the Ninja Forms settings</li>9 <li><strong><?= __('Manage', 'permissions-editor-for-ninja-forms') ?></strong> - <?= __('enables the user to add new forms, edit/manage existing forms and access the Ninja Forms \'Add-ons\'', 'permissions-editor-for-ninja-forms') ?></li> 10 <li><strong><?= __('Submissions', 'permissions-editor-for-ninja-forms') ?></strong> - <?= __('enables the user to view the submissions from form users', 'permissions-editor-for-ninja-forms') ?></li> 11 <li><strong><?= __('Import / Export', 'permissions-editor-for-ninja-forms') ?></strong> - <?= __('provides the user with access to the Import / Export options for Ninja Forms', 'permissions-editor-for-ninja-forms') ?></li> 12 <li><strong><?= __('Settings', 'permissions-editor-for-ninja-forms') ?></strong> - <?= __('provides user with access to the Ninja Forms settings', 'permissions-editor-for-ninja-forms') ?></li> 13 13 </ul> 14 14 <form method="post" action="<?php echo esc_url(admin_url('admin-post.php')); ?>"> -
permissions-editor-for-ninja-forms/trunk/permissions-editor-for-ninja_forms.php
r1771338 r1772316 3 3 Plugin Name: Permissions Editor for Ninja Forms 4 4 Description: This plugin enables you to select the Ninja Forms capabilities that you wish to enable different WordPress user roles to have access to. 5 Version: 1. 0.05 Version: 1.1.0 6 6 Author: Rapid Web Ltd 7 7 Author URI: http://rapidweb.biz 8 Text Domain: penf 9 Domain Path: /languages 8 10 */ 9 11 12 function penf_load_plugin_textdomain() { 13 load_plugin_textdomain('permissions-editor-for-ninja-forms', false, basename(dirname(__FILE__)).'/languages/' ); 14 } 15 add_action('plugins_loaded', 'penf_load_plugin_textdomain' ); 16 10 17 function penf_get_caps() { 11 return ['penf_manage' => 'Manage',12 'penf_submissions' => 'Submissions',13 'penf_import' => 'Import / Export',14 'penf_settings' => 'Settings',15 'penf_view_menu' => 'View Menu'];18 return ['penf_manage' => __('Manage', 'permissions-editor-for-ninja-forms'), 19 'penf_submissions' => __('Submissions', 'permissions-editor-for-ninja-forms'), 20 'penf_import' => __('Import / Export', 'permissions-editor-for-ninja-forms'), 21 'penf_settings' => __('Settings', 'permissions-editor-for-ninja-forms'), 22 'penf_view_menu' => __('View Menu', 'permissions-editor-for-ninja-forms')]; 16 23 } 17 24 18 25 function penf_build_menu() 19 26 { 20 add_options_page( 'Permissions Editor for Ninja Forms',21 'Permissions Editor for Ninja Forms',27 add_options_page( __('Permissions Editor for Ninja Forms', 'permissions-editor-for-ninja-forms'), 28 __('Permissions Editor for Ninja Forms', 'permissions-editor-for-ninja-forms'), 22 29 'manage_options', 23 30 'penf_role_matrix', 'penf_role_matrix' ); … … 28 35 function penf_role_matrix() { 29 36 if (!current_user_can('manage_options')) { 30 wp_die( 'You do not have sufficient permissions to access this page.');37 wp_die(__('You do not have sufficient permissions to access this page.', 'permissions-editor-for-ninja-forms')); 31 38 } 32 39 … … 41 48 if (!is_plugin_active('ninja-forms/ninja-forms.php')) { 42 49 deactivate_plugins(plugin_basename(__FILE__)); 43 wp_die('<p>The <strong>Permissions Editor for Ninja Forms</strong> plugin requires the Ninja Forms plugin. Please install and activate the Ninja Forms plugin and then try again.</p>', 'Ninja Forms is not installed!', ['response' => 200, 'back_link' => true]); 50 wp_die( 51 __('<p>The <strong>Permissions Editor for Ninja Forms</strong> plugin requires the Ninja Forms plugin. Please install and activate the Ninja Forms plugin and then try again.</p>', 'permissions-editor-for-ninja-forms'), 52 __('Ninja Forms is not installed!', 'permissions-editor-for-ninja-forms'), 53 ['response' => 200, 'back_link' => true] 54 ); 44 55 } 45 56 … … 55 66 ?> 56 67 <div class="notice notice-info is-dismissible"> 57 < p>The <strong>Permissions Editor for Ninja Forms</strong> plugin has been deactivated, because the Ninja Forms plugin is no longer active.</p>68 <?= __('<p>The <strong>Permissions Editor for Ninja Forms</strong> plugin has been deactivated, because the Ninja Forms plugin is no longer active.</p>', 'permissions-editor-for-ninja-forms') ?> 58 69 </div> 59 70 <?php … … 65 76 66 77 if (!current_user_can('manage_options')) { 67 wp_die( 'You do not have sufficient permissions to perform this action.');78 wp_die(__('You do not have sufficient permissions to perform this action.', 'permissions-editor-for-ninja-forms')); 68 79 } 69 80 -
permissions-editor-for-ninja-forms/trunk/readme.txt
r1771338 r1772316 4 4 Requires at least: 4.1 5 5 Tested up to: 4.8.1 6 Stable tag: 1. 0.06 Stable tag: 1.1.0 7 7 License: LGPL-3.0 8 8 License URI: https://opensource.org/licenses/LGPL-3.0
Note: See TracChangeset
for help on using the changeset viewer.