Changeset 3205672
- Timestamp:
- 12/10/2024 01:23:23 PM (16 months ago)
- Location:
- orbisius-child-theme-creator/trunk
- Files:
-
- 1 deleted
- 4 edited
-
addons/cloud_lib (deleted)
-
addons/init.php (modified) (1 diff)
-
lib/user.php (modified) (5 diffs)
-
orbisius-child-theme-creator.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
orbisius-child-theme-creator/trunk/addons/init.php
r3128135 r3205672 1 1 <?php 2 3 if (file_exists( ORBISIUS_CHILD_THEME_CREATOR_BASE_DIR . '/addons/cloud_lib/init.php' ) ) {4 require_once( ORBISIUS_CHILD_THEME_CREATOR_BASE_DIR . '/addons/cloud_lib/init.php' );5 }6 2 7 3 require_once( ORBISIUS_CHILD_THEME_CREATOR_BASE_DIR . '/addons/clipboard/init.php' ); -
orbisius-child-theme-creator/trunk/lib/user.php
r3128135 r3205672 10 10 * 11 11 * @staticvar type $instance 12 * @return \cls12 * @return static 13 13 */ 14 14 public static function get_instance() { … … 27 27 /** 28 28 * 29 * @param str /opt$key30 * @return str29 * @param string $key 30 * @return mixed 31 31 */ 32 32 public function api_key($key = null) { … … 54 54 /** 55 55 * 56 * @param str/opt$data57 * @return str56 * @param mixed $data 57 * @return mixed 58 58 */ 59 59 public function plan($data = null) { … … 81 81 /** 82 82 * 83 * @param str /opt$key84 * @return str 83 * @param string $key 84 * @return string 85 85 */ 86 86 public function email($key = null) { … … 125 125 } 126 126 127 /** 128 * Checks if user has sufficient permissions to manage child themes 129 * Requires either edit_themes or install_themes capability 130 * 131 * @param int|string|WP_User $user 132 * @return bool 133 */ 134 public function has_access($user = null) 135 { 136 if (empty($user)) { 137 $user = wp_get_current_user(); 138 } elseif (is_numeric($user)) { 139 $user = get_user_by('id', $user); 140 } elseif (is_string($user)) { 141 if (strpos($user, '@') !== false) { 142 $user = get_user_by('email', $user); 143 } else { 144 $user = get_user_by('login', $user); 145 } 146 } 147 148 if (empty($user)) { 149 return false; 150 } 151 152 // Allow filtering of required capabilities 153 $required_caps = apply_filters('orbisius_child_theme_creator_filter_required_caps', [ 154 'edit_themes', 155 'install_themes', 156 ]); 157 158 foreach ($required_caps as $cap) { 159 if (user_can($user, $cap)) { 160 return true; 161 } 162 } 163 164 return false; 165 } 166 127 167 } -
orbisius-child-theme-creator/trunk/orbisius-child-theme-creator.php
r3128135 r3205672 4 4 Plugin URI: https://orbisius.com/products/wordpress-plugins/orbisius-child-theme-creator/ 5 5 Description: This plugin allows you to quickly create child themes from any theme that you have currently installed on your site/blog. 6 Version: 1.5. 56 Version: 1.5.6 7 7 Author: Svetoslav Marinov (Slavi) 8 8 Author URI: https://orbisius.com … … 44 44 add_action( 'wp_ajax_nopriv_orbisius_ctc_theme_editor_ajax', 'orbisius_ctc_theme_editor_no_auth_ajax'); 45 45 46 47 46 register_activation_hook( __FILE__, 'orbisius_child_theme_creator_on_activate' ); 48 47 … … 73 72 $opts['setup_time'] = time(); 74 73 orbisius_child_theme_creator_set_options($opts); 74 } 75 } 76 77 add_action( 'orbisius_child_theme_creator_action_auth', 'orbisius_child_theme_creator_ensure_auth'); 78 79 /** 80 * @param array $ctx 81 * @return void 82 * @throws Exception 83 */ 84 function orbisius_child_theme_creator_ensure_auth($ctx = []) 85 { 86 $user_api_obj = orbisius_child_theme_creator_user::get_instance(); 87 88 if ($user_api_obj->has_access()) { 89 return; 90 } 91 92 $msg = __('Cannot complete operation or not enough access.', 'orbisius-child-theme-creator'); 93 94 if (wp_doing_ajax()) { 95 $req_res = new orbisius_child_theme_creator_result(); 96 $req_res->msg = $msg; 97 wp_send_json($req_res); 98 } else { 99 wp_die($msg); 75 100 } 76 101 } … … 424 449 </ul> 425 450 426 <iframe width="560" height="315" src="https://youtube-nocookie.com/embed/BZUVq6ZTv-o" frameborder="0" allowfullscreen></iframe> 451 <iframe width="560" height="315" 452 src="https://youtube-nocookie.com/embed/BZUVq6ZTv-o" 453 frameborder="0" 454 allow="encrypted-media" 455 allowfullscreen> 456 </iframe> 427 457 428 458 </div> <!-- .inside --> -
orbisius-child-theme-creator/trunk/readme.txt
r3128135 r3205672 2 2 Contributors: lordspace,orbisius 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7APYDVPBCSY9A 4 Tags: theme,child theme,childtheme,childthemes,parent theme,child themes,CSS,styling,resposive design,design,custom themeing, shared hosting,theme editor theme,themes,wp,wordpress,orbisius,theme creator,custom theme,theme generator,css,css editor4 Tags: child theme, child themes, design, theme generator, theme creator 5 5 Requires at least: 3.4 6 Tested up to: 6. 56 Tested up to: 6.6 7 7 Requires PHP: 5.6 8 Stable tag: 1.5. 58 Stable tag: 1.5.6 9 9 License: GPLv2 or later 10 10 … … 171 171 == Changelog == 172 172 173 = 1.5.6 = 174 * reduced the number of tags. WP org complained about having more than 5 tags 175 * removed cloud library 176 173 177 = 1.5.5 = 174 178 * Maintenance release
Note: See TracChangeset
for help on using the changeset viewer.