Changeset 2909963
- Timestamp:
- 05/09/2023 07:17:11 AM (3 years ago)
- Location:
- my-wp/trunk
- Files:
-
- 8 edited
-
assets/css/admin-sidebar.css (modified) (1 diff)
-
controller/modules/mywp.controller.module.admin.site-editor.php (modified) (1 diff)
-
mywp.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
setting/class.setting.menu.php (modified) (1 diff)
-
setting/class.setting.post-type.php (modified) (2 diffs)
-
setting/class.setting.screen.php (modified) (1 diff)
-
setting/class.setting.taxonomy.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
my-wp/trunk/assets/css/admin-sidebar.css
r2677466 r2909963 56 56 body.wp-admin.mywp.auto-fold #adminmenu li.mywp-sidebar-item .mywp-sidebar-item-childs { 57 57 width: auto; 58 } 59 body.wp-admin.mywp.auto-fold #adminmenu li.mywp-sidebar-item.wp-has-submenu:hover .mywp-sidebar-item-childs { 60 position: static; 61 left: 0; 58 62 } 59 63 } -
my-wp/trunk/controller/modules/mywp.controller.module.admin.site-editor.php
r2890935 r2909963 90 90 display: none; 91 91 } 92 #site-editor .edit-site-layout__view-mode-toggle.components-button .edit-site-layout__view-mode-toggle-icon { 93 display: none; 94 } 92 95 </style> 93 96 -
my-wp/trunk/mywp.php
r2890935 r2909963 4 4 Plugin URI: https://mywpcustomize.com/ 5 5 Description: My WP is powerful admin and frontend customize and debug and extendable plugin. 6 Version: 1.21. 06 Version: 1.21.1 7 7 Author: gqevu6bsiz 8 8 Author URI: http://gqevu6bsiz.chicappa.jp/ … … 43 43 44 44 define( 'MYWP_NAME' , 'My WP' ); 45 define( 'MYWP_VERSION' , '1.21. 0' );45 define( 'MYWP_VERSION' , '1.21.1' ); 46 46 define( 'MYWP_PLUGIN_FILE' , __FILE__ ); 47 47 define( 'MYWP_PLUGIN_BASENAME' , plugin_basename( MYWP_PLUGIN_FILE ) ); -
my-wp/trunk/readme.txt
r2890935 r2909963 4 4 Requires at least: 4.7 5 5 Tested up to: 6.2 6 Stable tag: 1.21. 06 Stable tag: 1.21.1 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 46 46 47 47 == Changelog == 48 49 = 1.21.1 2023-05-09 = 50 * Fixed: Misalignment of admin sidebar menu on mobile. 51 * Fixed: Hidden avatar icon on Site Editor. 52 * Fixed: Some security update(XSS vulnerability). 48 53 49 54 = 1.21.0 2023-03-31 = -
my-wp/trunk/setting/class.setting.menu.php
r2547822 r2909963 132 132 public static function set_current_menu_id( $setting_menu_id = false ) { 133 133 134 $setting_menu_id = strip_tags( $setting_menu_id);134 $setting_menu_id = esc_attr( strip_tags( $setting_menu_id ) ); 135 135 136 136 self::$current_menu_id = $setting_menu_id; -
my-wp/trunk/setting/class.setting.post-type.php
r2733956 r2909963 73 73 public static function set_current_post_type_id( $post_type = false ) { 74 74 75 $post_type = esc_attr( strip_tags( $post_type ) ); 76 77 self::$current_post_type_id = $post_type; 78 79 self::set_current_post_type( $post_type ); 80 81 } 82 83 public static function get_current_post_type_id() { 84 85 return self::$current_post_type_id; 86 87 } 88 89 private static function set_current_post_type( $post_type = false ) { 90 91 if( empty( $post_type ) ) { 92 93 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$post_type' ); 94 95 MywpHelper::error_require_message( '$post_type' , $called_text ); 96 97 return false; 98 99 } 100 101 $post_type_object = self::get_setting_post_type( $post_type ); 102 103 if( empty( $post_type_object ) ) { 104 105 return false; 106 107 } 108 109 self::$current_post_type = $post_type_object; 110 111 } 112 113 public static function get_current_post_type() { 114 115 return self::$current_post_type; 116 117 } 118 119 public static function set_current_post_type_to_default() { 120 121 $post_types = self::get_setting_post_types(); 122 123 if( empty( $post_types ) ) { 124 125 $called_text = sprintf( '%s::%s()' , __CLASS__ , __FUNCTION__ , '$post_types' ); 126 127 MywpHelper::error_require_message( '$post_types' , $called_text ); 128 129 return false; 130 131 } 132 133 $current_post_type_id = false; 134 135 foreach( $post_types as $post_type ) { 136 137 $current_post_type_id = $post_type->name; 138 139 break; 140 141 } 142 143 if( empty( $current_post_type_id ) ) { 144 145 return false; 146 147 } 148 149 self::set_current_post_type_id( $current_post_type_id ); 150 151 } 152 153 public static function get_latest_post( $post_type = false ) { 154 155 if( empty( $post_type ) ) { 156 157 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$post_type' ); 158 159 MywpHelper::error_require_message( '$post_type' , $called_text ); 160 161 return false; 162 163 } 164 75 165 $post_type = strip_tags( $post_type ); 76 166 77 self::$current_post_type_id = $post_type;78 79 self::set_current_post_type( $post_type );80 81 }82 83 public static function get_current_post_type_id() {84 85 return self::$current_post_type_id;86 87 }88 89 private static function set_current_post_type( $post_type = false ) {90 91 if( empty( $post_type ) ) {92 93 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$post_type' );94 95 MywpHelper::error_require_message( '$post_type' , $called_text );96 97 return false;98 99 }100 101 167 $post_type_object = self::get_setting_post_type( $post_type ); 102 168 … … 107 173 } 108 174 109 self::$current_post_type = $post_type_object; 110 111 } 112 113 public static function get_current_post_type() { 114 115 return self::$current_post_type; 116 117 } 118 119 public static function set_current_post_type_to_default() { 120 121 $post_types = self::get_setting_post_types(); 122 123 if( empty( $post_types ) ) { 124 125 $called_text = sprintf( '%s::%s()' , __CLASS__ , __FUNCTION__ , '$post_types' ); 126 127 MywpHelper::error_require_message( '$post_types' , $called_text ); 128 129 return false; 130 131 } 132 133 $current_post_type_id = false; 134 135 foreach( $post_types as $post_type ) { 136 137 $current_post_type_id = $post_type->name; 138 139 break; 140 141 } 142 143 if( empty( $current_post_type_id ) ) { 144 145 return false; 146 147 } 148 149 self::set_current_post_type_id( $current_post_type_id ); 150 151 } 152 153 public static function get_latest_post( $post_type = false ) { 154 155 if( empty( $post_type ) ) { 156 157 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$post_type' ); 158 159 MywpHelper::error_require_message( '$post_type' , $called_text ); 160 161 return false; 162 163 } 175 $args = array( 'post_type' => $post_type , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 ); 176 177 $args = apply_filters( "mywp_setting_get_latest_post_args_{$post_type}" , $args ); 178 179 $posts = get_posts( $args ); 180 181 if( ! empty( $posts ) ) { 182 183 $key = key( $posts ); 184 185 return $posts[ $key ]; 186 187 } else { 188 189 return false; 190 191 } 192 193 } 194 195 public static function get_one_post_link_edit( $post_type = false ) { 196 197 $post = self::get_latest_post( $post_type ); 198 199 if( ! empty( $post ) ) { 200 201 return add_query_arg( array( 'post' => $post->ID , 'action' => 'edit' ) , admin_url( 'post.php' ) ); 202 203 } else { 204 205 return add_query_arg( array( 'post_type' => $post_type ) , admin_url( 'post-new.php' ) ); 206 207 } 208 209 } 210 211 public static function get_list_link( $post_type = false ) { 164 212 165 213 $post_type = strip_tags( $post_type ); 166 214 167 $post_type_object = self::get_setting_post_type( $post_type );168 169 if( empty( $post_type_object ) ) {170 171 return false;172 173 }174 175 $args = array( 'post_type' => $post_type , 'order' => 'DESC' , 'orderby' => 'post_date' , 'numberposts' => 1 );176 177 $args = apply_filters( "mywp_setting_get_latest_post_args_{$post_type}" , $args );178 179 $posts = get_posts( $args );180 181 if( ! empty( $posts ) ) {182 183 $key = key( $posts );184 185 return $posts[ $key ];186 187 } else {188 189 return false;190 191 }192 193 }194 195 public static function get_one_post_link_edit( $post_type = false ) {196 197 $post = self::get_latest_post( $post_type );198 199 if( ! empty( $post ) ) {200 201 return add_query_arg( array( 'post' => $post->ID , 'action' => 'edit' ) , admin_url( 'post.php' ) );202 203 } else {204 205 return add_query_arg( array( 'post_type' => $post_type ) , admin_url( 'post-new.php' ) );206 207 }208 209 }210 211 public static function get_list_link( $post_type = false ) {212 213 $post_type = strip_tags( $post_type );214 215 215 return add_query_arg( array( 'post_type' => $post_type ) , admin_url( 'edit.php' ) ); 216 216 -
my-wp/trunk/setting/class.setting.screen.php
r2547822 r2909963 75 75 public static function set_current_screen_id( $setting_screen_id = false ) { 76 76 77 $setting_screen_id = strip_tags( $setting_screen_id);77 $setting_screen_id = esc_attr( strip_tags( $setting_screen_id ) ); 78 78 79 79 self::$current_screen_id = $setting_screen_id; -
my-wp/trunk/setting/class.setting.taxonomy.php
r2733956 r2909963 67 67 public static function set_current_taxonomy_id( $taxonomy = false ) { 68 68 69 $taxonomy = esc_attr( strip_tags( $taxonomy ) ); 70 71 self::$current_taxonomy_id = $taxonomy; 72 73 self::set_current_taxonomy( $taxonomy ); 74 75 } 76 77 public static function get_current_taxonomy_id() { 78 79 return self::$current_taxonomy_id; 80 81 } 82 83 private static function set_current_taxonomy( $taxonomy = false ) { 84 85 if( empty( $taxonomy ) ) { 86 87 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$taxonomy' ); 88 89 MywpHelper::error_require_message( '$taxonomy' , $called_text ); 90 91 return false; 92 93 } 94 95 $taxonomy_object = self::get_setting_taxonomy( $taxonomy ); 96 97 if( empty( $taxonomy_object ) ) { 98 99 return false; 100 101 } 102 103 self::$current_taxonomy = $taxonomy_object; 104 105 } 106 107 public static function get_current_taxonomy() { 108 109 return self::$current_taxonomy; 110 111 } 112 113 public static function set_current_taxonomy_to_default() { 114 115 $taxonomies = self::get_setting_taxonomies(); 116 117 if( empty( $taxonomies ) ) { 118 119 $called_text = sprintf( '%s::%s()' , __CLASS__ , __FUNCTION__ , '$taxonomies' ); 120 121 MywpHelper::error_require_message( '$taxonomies' , $called_text ); 122 123 return false; 124 125 } 126 127 $current_taxonomy_id = false; 128 129 foreach( $taxonomies as $taxonomy ) { 130 131 $current_taxonomy_id = $taxonomy->name; 132 133 break; 134 135 } 136 137 if( empty( $current_taxonomy_id ) ) { 138 139 return false; 140 141 } 142 143 self::set_current_taxonomy_id( $current_taxonomy_id ); 144 145 } 146 147 public static function get_one_term( $taxonomy = false ) { 148 149 if( empty( $taxonomy ) ) { 150 151 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$taxonomy' ); 152 153 MywpHelper::error_require_message( '$taxonomy' , $called_text ); 154 155 return false; 156 157 } 158 69 159 $taxonomy = strip_tags( $taxonomy ); 70 160 71 self::$current_taxonomy_id = $taxonomy;72 73 self::set_current_taxonomy( $taxonomy );74 75 }76 77 public static function get_current_taxonomy_id() {78 79 return self::$current_taxonomy_id;80 81 }82 83 private static function set_current_taxonomy( $taxonomy = false ) {84 85 if( empty( $taxonomy ) ) {86 87 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$taxonomy' );88 89 MywpHelper::error_require_message( '$taxonomy' , $called_text );90 91 return false;92 93 }94 95 161 $taxonomy_object = self::get_setting_taxonomy( $taxonomy ); 96 162 … … 101 167 } 102 168 103 self::$current_taxonomy = $taxonomy_object; 104 105 } 106 107 public static function get_current_taxonomy() { 108 109 return self::$current_taxonomy; 110 111 } 112 113 public static function set_current_taxonomy_to_default() { 114 115 $taxonomies = self::get_setting_taxonomies(); 116 117 if( empty( $taxonomies ) ) { 118 119 $called_text = sprintf( '%s::%s()' , __CLASS__ , __FUNCTION__ , '$taxonomies' ); 120 121 MywpHelper::error_require_message( '$taxonomies' , $called_text ); 122 123 return false; 124 125 } 126 127 $current_taxonomy_id = false; 128 129 foreach( $taxonomies as $taxonomy ) { 130 131 $current_taxonomy_id = $taxonomy->name; 132 133 break; 134 135 } 136 137 if( empty( $current_taxonomy_id ) ) { 138 139 return false; 140 141 } 142 143 self::set_current_taxonomy_id( $current_taxonomy_id ); 144 145 } 146 147 public static function get_one_term( $taxonomy = false ) { 148 149 if( empty( $taxonomy ) ) { 150 151 $called_text = sprintf( '%s::%s( %s )' , __CLASS__ , __FUNCTION__ , '$taxonomy' ); 152 153 MywpHelper::error_require_message( '$taxonomy' , $called_text ); 154 155 return false; 156 157 } 169 $args = array( 'taxonomy' => $taxonomy , 'order' => 'DESC' , 'orderby' => 'term_id' ); 170 171 $args = apply_filters( "mywp_setting_get_one_term_args_{$taxonomy}" , $args ); 172 173 $terms = get_terms( $args ); 174 175 if( ! empty( $terms ) ) { 176 177 $key = key( $terms ); 178 179 return $terms[ $key ]; 180 181 } else { 182 183 return false; 184 185 } 186 187 } 188 189 public static function get_one_term_archive_link( $taxonomy = false ) { 190 191 $term = self::get_one_term( $taxonomy ); 192 193 if( ! empty( $term ) ) { 194 195 return get_term_link( $term ); 196 197 } 198 199 } 200 201 public static function get_list_link( $taxonomy = false ) { 158 202 159 203 $taxonomy = strip_tags( $taxonomy ); 160 204 161 $taxonomy_object = self::get_setting_taxonomy( $taxonomy );162 163 if( empty( $taxonomy_object ) ) {164 165 return false;166 167 }168 169 $args = array( 'taxonomy' => $taxonomy , 'order' => 'DESC' , 'orderby' => 'term_id' );170 171 $args = apply_filters( "mywp_setting_get_one_term_args_{$taxonomy}" , $args );172 173 $terms = get_terms( $args );174 175 if( ! empty( $terms ) ) {176 177 $key = key( $terms );178 179 return $terms[ $key ];180 181 } else {182 183 return false;184 185 }186 187 }188 189 public static function get_one_term_archive_link( $taxonomy = false ) {190 191 $term = self::get_one_term( $taxonomy );192 193 if( ! empty( $term ) ) {194 195 return get_term_link( $term );196 197 }198 199 }200 201 public static function get_list_link( $taxonomy = false ) {202 203 $taxonomy = strip_tags( $taxonomy );204 205 205 return add_query_arg( array( 'taxonomy' => $taxonomy ) , admin_url( 'edit-tags.php' ) ); 206 206
Note: See TracChangeset
for help on using the changeset viewer.