Changeset 2498952
- Timestamp:
- 03/18/2021 07:22:17 PM (5 years ago)
- Location:
- makestories-helper/trunk
- Files:
-
- 5 edited
-
config.php (modified) (2 diffs)
-
gutenberg-block.php (modified) (1 diff)
-
helpers.php (modified) (2 diffs)
-
makestories.php (modified) (1 diff)
-
pages/category-structure.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
makestories-helper/trunk/config.php
r2490587 r2498952 4 4 */ 5 5 define("MS_CDN_URL", "https://api.makestories.io/wp/2.1/"); 6 6 7 7 8 … … 63 64 "forceUploadMedia" => false, 64 65 "default_category" => "Uncategorized", 66 "roles" => ["editor", "author", "administrator"], 65 67 ]); -
makestories-helper/trunk/gutenberg-block.php
r2481773 r2498952 10 10 'icon' => MS_ROUTING['EDITOR']['icon'] 11 11 ]); 12 13 // For all publish post display14 register_block_type('makestories/custom-block-all-published-post', array(15 'editor_script' => 'custom-cta-js'16 ) );17 18 // For display posts by category19 register_block_type('makestories/custom-block-category-post', array(20 'editor_script' => 'custom-cta-js'21 ) );22 12 23 // For display single post 24 register_block_type('makestories/custom-block-single-post', array( 25 'editor_script' => 'custom-cta-js' 26 ) ); 13 if(function_exists("register_block_type")){ 14 // For all publish post display 15 register_block_type('makestories/custom-block-all-published-post', array( 16 'editor_script' => 'custom-cta-js' 17 ) ); 18 19 // For display posts by category 20 register_block_type('makestories/custom-block-category-post', array( 21 'editor_script' => 'custom-cta-js' 22 ) ); 23 24 // For display single post 25 register_block_type('makestories/custom-block-single-post', array( 26 'editor_script' => 'custom-cta-js' 27 ) ); 28 } 27 29 } 28 30 -
makestories-helper/trunk/helpers.php
r2490587 r2498952 52 52 $options['default_category'] = $_POST['default_category']; 53 53 } 54 if(isset($_POST['roles']) && is_array($_POST['roles'])){ 55 $options['roles'] = $_POST['roles']; 56 } 54 57 $options['to_rewrite'] = true; 55 58 if(isset($_POST['forceUploadMedia'])){ … … 77 80 78 81 function ms_get_allowed_roles(){ 79 return ["editor", "author", "manage_options"]; 82 $config = ms_get_options(); 83 return $config['roles']; 80 84 } 81 85 -
makestories-helper/trunk/makestories.php
r2490589 r2498952 4 4 Plugin URI: https://www.notion.so/MakeStories-WordPress-Plugin-Set-Up-Guide-d903e700c9204ef08f9751bb4a101068 5 5 Description: Visual storytelling for WordPress. Made possible by MakeStories. 6 Version: 2.2. 26 Version: 2.2.3 7 7 Author: MakeStories Team 8 8 Author URI: http://makestories.io -
makestories-helper/trunk/pages/category-structure.php
r2490621 r2498952 17 17 18 18 $options = ms_get_options(); 19 20 global $wp_roles; 21 if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); 22 23 $roleNames = $wp_roles->get_names(); 19 24 ?> 20 25 <!-- Catgeory-wrap start --> … … 62 67 </tr> 63 68 <tr> 64 <hr/> 69 <td colspan="2"> 70 <hr/> 71 </td> 72 </tr> 73 <tr> 74 <th scope="row"><label for="categories">Roles allowed access to MakeStories</label></th> 75 <td> 76 <fieldset> 77 <?php 78 foreach($roleNames as $role => $roleName) { ?> 79 <label for="role_input_<?php echo $role; ?>"> 80 <input name="roles[]" type="checkbox" id="role_input_<?php echo $role; ?>" value="<?php echo $role; ?>" <?php if(in_array($role, $options['roles'])){ echo "checked"; } ?>> 81 <?php echo $roleName; ?></label> 82 <br> 83 <?php 84 } 85 ?> 86 </fieldset> 87 </td> 88 </tr> 89 <tr> 90 <td colspan="2"> 91 <hr/> 92 </td> 65 93 </tr> 66 94 <tr>
Note: See TracChangeset
for help on using the changeset viewer.