Changeset 2727228
- Timestamp:
- 05/20/2022 07:16:52 AM (4 years ago)
- Location:
- makestories-helper/trunk
- Files:
-
- 5 edited
-
helpers.php (modified) (1 diff)
-
hooks.php (modified) (11 diffs)
-
makestories.php (modified) (1 diff)
-
pages/category-structure.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
makestories-helper/trunk/helpers.php
r2724665 r2727228 54 54 } 55 55 if(isset($_POST['roles']) && is_array($_POST['roles'])){ 56 $options['roles'] = sanitize_text_field($_POST['roles']); 56 $roles = []; 57 foreach($_POST['roles'] as $role){ 58 $roles[] = sanitize_text_field($role); 59 } 60 $options['roles'] = $roles; 57 61 } 58 62 $options['to_rewrite'] = true; -
makestories-helper/trunk/hooks.php
r2724522 r2727228 10 10 function mscpt_register_amp_stories_post_type(){ 11 11 $toRewrite = false; 12 if(isset($_POST['mscpt_makestories_post_slug']) && !empty($_POST['mscpt_makestories_post_slug']) && current_user_can('administrator')){12 if(isset($_POST['mscpt_makestories_post_slug']) && !empty($_POST['mscpt_makestories_post_slug']) && current_user_can('administrator')){ 13 13 check_admin_referer('mscpt_register_amp_stories_post_type'); 14 14 $slug = sanitize_title($_POST['mscpt_makestories_post_slug'],'story'); … … 18 18 } 19 19 $slug = ms_get_options(); 20 if($slug['to_rewrite']){21 $toRewrite = true;22 $slug['to_rewrite'] = false;20 if($slug['to_rewrite']){ 21 $toRewrite = true; 22 $slug['to_rewrite'] = false; 23 23 update_option('mscpt_makestories_settings',$slug); 24 24 } 25 if(!empty($slug) && isset($slug['post_slug']))26 {25 if(!empty($slug) && isset($slug['post_slug'])) 26 { 27 27 //register widget post type 28 28 register_post_type( 29 MS_POST_WIDGET_TYPE,29 MS_POST_WIDGET_TYPE, 30 30 array( 31 31 'labels'=> array( … … 44 44 ); 45 45 46 register_post_type(47 MS_POST_TYPE,46 register_post_type( 47 MS_POST_TYPE, 48 48 array( 49 49 'labels'=> array( … … 74 74 'parent_item' => __( 'Parent MS Category' ), 75 75 'parent_item_colon' => __( 'Parent MS Category:' ), 76 'edit_item' => __( 'Edit MS Category' ), 76 'edit_item' => __( 'Edit MS Category' ), 77 77 'update_item' => __( 'Update MS Category' ), 78 78 'add_new_item' => __( 'Add New MS Category' ), 79 79 'new_item_name' => __( 'New MS Category Name' ), 80 80 'menu_name' => __( 'MS Category' ), 81 );82 81 ); 82 83 83 // Now register the taxonomy 84 register_taxonomy(MS_TAXONOMY,MS_POST_TYPE, array(84 register_taxonomy(MS_TAXONOMY,MS_POST_TYPE, array( 85 85 'hierarchical' => false, 86 86 'labels' => $labels, … … 89 89 'show_admin_column' => true, 90 90 'query_var' => true, 91 'rewrite' => array(92 'slug' => ms_get_slug().'-category'93 )94 ));95 96 }else{97 //No option found for the options, show the modal to user to help him set options91 'rewrite' => array( 92 'slug' => ms_get_slug().'-category' 93 ) 94 )); 95 96 }else{ 97 //No option found for the options, show the modal to user to help him set options 98 98 add_action('admin_head','mscpt_makeStoriesHeaderScript'); 99 99 add_action('admin_footer','mscpt_makeStoriesSlugModal'); 100 }101 if($toRewrite){100 } 101 if($toRewrite){ 102 102 flush_rewrite_rules(); 103 103 } … … 202 202 $plugins['mytinymceplugin'] = MS_PLUGIN_BASE_URL.'assets/js/tiny-mce/tiny-mce.js'; 203 203 return $plugins; 204 }205 204 } 205 206 206 function mscpt_tiny_mce_register_buttons( $buttons ) { 207 207 $newBtns = array( … … 215 215 216 216 function mscpt_tiny_mce_new_buttons() { 217 add_filter( 'mce_external_plugins', 'mscpt_tiny_mce_add_buttons' );218 add_filter( 'mce_buttons', 'mscpt_tiny_mce_register_buttons' );217 add_filter( 'mce_external_plugins', 'mscpt_tiny_mce_add_buttons' ); 218 add_filter( 'mce_buttons', 'mscpt_tiny_mce_register_buttons' ); 219 219 } 220 220 … … 225 225 } else { 226 226 return MS_PLUGIN_BASE_PATH . '/templates' . '/' . $file; 227 } 227 } 228 228 } 229 229 … … 270 270 ?> 271 271 <div class="grid" id="listing-grid"> 272 <?php272 <?php 273 273 foreach($value as $index=>$post) { 274 274 include mscpt_getTemplatePath("prepare-story-vars.php"); 275 275 include mscpt_getTemplatePath("listing-story-grid.php"); 276 276 } 277 ?>277 ?> 278 278 </div> 279 279 <?php … … 292 292 } 293 293 294 add_action('wp_ajax_nopriv_more_post_ajax', 'mscpt_more_post_ajax'); 294 add_action('wp_ajax_nopriv_more_post_ajax', 'mscpt_more_post_ajax'); 295 295 add_action('wp_ajax_more_post_ajax', 'mscpt_more_post_ajax'); 296 296 … … 317 317 } 318 318 319 add_action('wp_ajax_nopriv_load_post_data_ajax', 'mscpt_load_post_data_ajax'); 319 add_action('wp_ajax_nopriv_load_post_data_ajax', 'mscpt_load_post_data_ajax'); 320 320 add_action('wp_ajax_load_post_data_ajax', 'mscpt_load_post_data_ajax'); 321 321 -
makestories-helper/trunk/makestories.php
r2724522 r2727228 4 4 Plugin URI: https://makestories.io/official-wordpress-webstories-plugin/ 5 5 Description: The leading Google Web Stories Editor is now available to create Stories in WordPress. It is easy to use, allows for extensive customization, and is adaptive for future changes. 6 Version: 2.6. 56 Version: 2.6.6 7 7 Author: MakeStories Team 8 8 Author URI: https://makestories.io -
makestories-helper/trunk/pages/category-structure.php
r2724522 r2727228 97 97 </table> 98 98 </form> 99 <!-- <table class="form-table" role="presentation">--> 100 <!----> 101 <!-- <tbody>--> 102 <!-- <tr>--> 103 <!-- <td colspan="2">--> 104 <!-- <hr/>--> 105 <!-- </td>--> 106 <!-- </tr>--> 107 <!-- <tr>--> 108 <!-- <th scope="row"><label>Update Story Media</label></th>--> 109 <!-- <td>--> 110 <!-- <p class="description">If you think that your story media is not coming from your own domain, click this button. If all the things are already set, this will not affect you.</p>--> 111 <!-- <p id="summary"></p>--> 112 <!-- <p class="submit">--> 113 <!-- <input type="submit" id="run-media-updates" name="submit" class="button button-primary" value="Run Updates"/>--> 114 <!-- </p>--> 115 <!-- </td>--> 116 <!-- </tr>--> 117 <!-- </table>--> 99 118 <table class="form-table" role="presentation"> 100 101 119 <tbody> 102 120 <tr> … … 106 124 </tr> 107 125 <tr> 108 <th scope="row"><label>Update Story Media</label></th>109 <td>110 <p class="description">If you think that your story media is not coming from your own domain, click this button. If all the things are already set, this will not affect you.</p>111 <p id="summary"></p>112 <p class="submit">113 <input type="submit" id="run-media-updates" name="submit" class="button button-primary" value="Run Updates"/>114 </p>115 </td>116 </tr>117 </table>118 <table class="form-table" role="presentation">119 <tbody>120 <tr>121 <td colspan="2">122 <hr/>123 </td>124 </tr>125 <tr>126 126 <th scope="row"><label>Republish all stories</label></th> 127 127 <td> 128 <p class="description">This button re-publishes all the stories on your wordpress site. Helpful for bulk changes and in case you have not yet migrated from your old image urls.</p>128 <p class="description">This button re-publishes all the stories on your wordpress site. Helpful for bulk changes to thinks like analytics and Monetization.</p> 129 129 <p id="summary-republish"></p> 130 130 <p class="submit"> -
makestories-helper/trunk/readme.txt
r2724522 r2727228 4 4 Requires at least: 4.0 5 5 Tested up to: 5.9.3 6 Stable tag: 2.6. 56 Stable tag: 2.6.6 7 7 Requires PHP: 5.6 8 8
Note: See TracChangeset
for help on using the changeset viewer.