Changeset 2716381
- Timestamp:
- 04/29/2022 01:29:03 PM (3 years ago)
- Location:
- oneds-start
- Files:
-
- 319 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
oneds-start/trunk/languages/oneds-start.pot
r2095354 r2716381 2 2 msgid "" 3 3 msgstr "" 4 "Project-Id-Version: OneDS Start Package\n"4 "Project-Id-Version: OneDS Start\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 20 19-05-26 17:49+0000\n"6 "POT-Creation-Date: 2022-04-28 14:35+0000\n" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 14 14 "Content-Transfer-Encoding: 8bit\n" 15 15 "X-Generator: Loco https://localise.biz/\n" 16 "X-Loco-Version: 2.2.2; wp-5.2.1" 16 "X-Loco-Version: 2.6.1; wp-5.9.3\n" 17 "X-Domain: oneds-start" 17 18 18 #: oneds-start.php:40319 #: includes/admin-theme-addon.php:278 19 20 msgid "&" 20 21 msgstr "" 21 22 22 #: oneds-start.php:54323 #: includes/maintenance-mode-addon.php:88 23 24 msgid "" 24 25 "<h1>Website Under Maintenance</h1><p>Our Website is currently undergoing " … … 26 27 msgstr "" 27 28 28 #: oneds-start.php:478 29 #: includes/admin-dashboard-widgets-addon.php:185 30 msgid "Active Plugins" 31 msgstr "" 32 33 #: includes/admin-dashboard-widgets-addon.php:134 34 msgid "All info" 35 msgstr "" 36 37 #: includes/admin-dashboard-widgets-addon.php:132 38 msgid "Browser" 39 msgstr "" 40 41 #: includes/maintenance-mode-addon.php:24 29 42 msgid "Content" 30 43 msgstr "" 31 44 32 #: oneds-start.php:55245 #: includes/maintenance-mode-addon.php:99 33 46 msgid "Disabled" 34 47 msgstr "" 35 48 36 #: oneds-start.php:473 oneds-start.php:554 49 #: includes/maintenance-mode-addon.php:18 50 #: includes/maintenance-mode-addon.php:101 37 51 msgid "Enabled" 38 msgstr ""39 40 #. Author URI of the plugin41 msgid "http://oneds.org"42 msgstr ""43 44 #. URI of the plugin45 msgid "http://oneds.org/category/releases/start-package/"46 52 msgstr "" 47 53 … … 50 56 msgstr "" 51 57 52 #: oneds-start.php:45858 #: includes/maintenance-mode-addon.php:7 53 59 msgid "Maintenance Mode" 54 60 msgstr "" 55 61 56 #: oneds-start.php:465 oneds-start.php:561 oneds-start.php:572 62 #: includes/maintenance-mode-addon.php:14 63 #: includes/maintenance-mode-addon.php:107 64 #: includes/maintenance-mode-addon.php:118 57 65 msgid "Maintenance Mode Settings" 58 66 msgstr "" 59 67 60 #: oneds-start.php:558 oneds-start.php:569 68 #: includes/maintenance-mode-addon.php:104 69 #: includes/maintenance-mode-addon.php:115 61 70 msgid "Maintenance Mode: " 62 71 msgstr "" 63 72 73 #: includes/admin-dashboard-widgets-addon.php:209 74 msgid "MySQL Version" 75 msgstr "" 76 64 77 #. Author of the plugin 65 #: oneds-start.php:376 oneds-start.php:405 oneds-start.php:690 78 #: includes/admin-theme-addon.php:251 includes/admin-theme-addon.php:280 79 #: includes/admin-theme-addon.php:338 66 80 msgid "OneDS" 67 81 msgstr "" 68 82 69 83 #. Name of the plugin 70 msgid "OneDS Start Package"84 msgid "OneDS Start" 71 85 msgstr "" 72 86 73 #: oneds-start.php:399 87 #: includes/admin-dashboard-widgets-addon.php:189 88 msgid "OneDS System Version" 89 msgstr "" 90 91 #: includes/admin-dashboard-widgets-addon.php:130 92 #: includes/admin-dashboard-widgets-addon.php:179 93 msgid "Operating System" 94 msgstr "" 95 96 #: includes/admin-dashboard-widgets-addon.php:201 97 msgid "PHP Memory Limit" 98 msgstr "" 99 100 #: includes/admin-dashboard-widgets-addon.php:197 101 msgid "PHP Version" 102 msgstr "" 103 104 #: includes/admin-theme-addon.php:274 74 105 msgid "Powered By" 75 106 msgstr "" 76 107 77 #: oneds-start.php:401 108 #: includes/admin-dashboard-widgets-addon.php:186 109 msgid "registered users" 110 msgstr "" 111 112 #: includes/admin-dashboard-widgets-addon.php:20 113 msgid "Server Information" 114 msgstr "" 115 116 #: includes/admin-dashboard-widgets-addon.php:74 117 msgid "User Display Name" 118 msgstr "" 119 120 #: includes/admin-dashboard-widgets-addon.php:72 121 msgid "User Email" 122 msgstr "" 123 124 #: includes/admin-dashboard-widgets-addon.php:68 125 msgid "User ID" 126 msgstr "" 127 128 #: includes/admin-dashboard-widgets-addon.php:76 129 msgid "User Role" 130 msgstr "" 131 132 #: includes/admin-dashboard-widgets-addon.php:70 133 msgid "Username" 134 msgstr "" 135 136 #: includes/admin-dashboard-widgets-addon.php:194 137 msgid "Web Server Version" 138 msgstr "" 139 140 #: includes/admin-theme-addon.php:276 78 141 msgid "WordPress" 79 142 msgstr "" 143 144 #: includes/admin-dashboard-widgets-addon.php:183 145 msgid "WordPress Version" 146 msgstr "" 147 148 #. Widget slug. 149 #: includes/admin-dashboard-widgets-addon.php:8 150 msgid "Your Profile Information" 151 msgstr "" 152 153 #. Widget slug. 154 #: includes/admin-dashboard-widgets-addon.php:14 155 msgid "Your System Information" 156 msgstr "" -
oneds-start/trunk/oneds-start.php
r2095352 r2716381 1 1 <?php 2 2 /* 3 Plugin Name: OneDS Start Package 4 Plugin URI: http://oneds.org/category/releases/start-package/ 3 Plugin Name: OneDS Start 5 4 Description: Just Start Package 6 Version: 0. 35 Version: 0.4 7 6 Author: OneDS 8 Author URI: http://oneds.org9 7 Text Domain: oneds-start 10 Domain Path: /languages /8 Domain Path: /languages 11 9 */ 12 10 13 14 /** 15 * Load OneDS plugin textdomain. 16 */ 17 function ods_load_textdomain() { 18 load_plugin_textdomain( 'oneds-start', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 11 if (!defined('ABSPATH')) { 12 exit; // Exit if accessed directly 19 13 } 20 14 21 add_action( 'plugins_loaded', 'ods_load_textdomain' ); 15 /** 16 * Load OneDS plugin textdomain 17 */ 18 19 function ods_load_textdomain() 20 { 21 22 load_plugin_textdomain('oneds-start', false, dirname(plugin_basename(__FILE__)) . '/languages'); 23 } 24 25 add_action('plugins_loaded', 'ods_load_textdomain'); 22 26 23 27 24 28 /** 25 * Add OneDS Dashboard Theme. 26 */ 27 function ods_dash_css() { 28 // This makes sure that the positioning is also good for right-to-left languages 29 $y = is_rtl() ? 'left' : 'right'; 30 $x = is_rtl() ? 'right' : 'left'; 31 32 // CSS 33 echo " 34 <style type='text/css'> 35 :root { 36 --odscolor: rgba(18, 72, 99, 1); 37 } //Premium color 38 39 40 .wp-core-ui .notice.is-dismissible { 41 border-top: 1px #eee solid; 42 border-bottom: 1px #eee solid; 43 border-$y: 1px #eee solid; 44 } 45 46 .wp-core-ui .button, .wp-core-ui .button-primary, .wp-core-ui .button-secondary { 47 border-width: 0px; 48 border-radius: 0px; 49 } 50 #adminmenu li.wp-menu-separator { 51 display:none 52 } 53 54 #adminmenu { 55 margin:0 56 } 57 58 html { 59 //background:#FFF 60 } 61 62 #adminmenu div.wp-menu-image:before { 63 color: rgba(255, 255, 255, 0.5); 64 } 65 66 #adminmenu li a:focus div.wp-menu-image:before,#adminmenu li.opensub div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before { 67 color:var(--odscolor) 68 } 69 70 #adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap,/* Sub Menu */ 71 #adminmenu .wp-has-current-submenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu.sub-open,#adminmenu .wp-has-current-submenu.opensub .wp-submenu,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu,.no-js li.wp-has-current-submenu:hover .wp-submenu { 72 background:var(--odscolor); 73 } 74 75 #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head { 76 background: inherit; 77 color: var(--odscolor); 78 } 79 #adminmenu .wp-menu-arrow,#adminmenu .wp-menu-arrow div,#adminmenu li.current a.menu-top,#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,.folded #adminmenu li.current.menu-top,.folded #adminmenu li.wp-has-current-submenu,/* Hover actions */ 80 #adminmenu li.menu-top:hover,#adminmenu li.opensub>a.menu-top { 81 background: rgba(57, 44, 61, 0.5); 82 } 83 84 #adminmenu .opensub .wp-submenu li.current a,#adminmenu .wp-submenu li.current,#adminmenu .wp-submenu li.current a,#adminmenu .wp-submenu li.current a:focus,#adminmenu .wp-submenu li.current a:hover,#adminmenu a.wp-has-current-submenu:focus+.wp-submenu li.current a,#adminmenu .wp-submenu .wp-submenu-head,/* Dashicons */ 85 #adminmenu .current div.wp-menu-image:before,#adminmenu .wp-has-current-submenu div.wp-menu-image:before,#adminmenu a.current:hover div.wp-menu-image:before,#adminmenu a.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li.wp-has-current-submenu:hover div.wp-menu-image:before,#adminmenu li:hover div.wp-menu-image:before { 86 color:var(--odscolor); 87 } 88 89 #adminmenu .wp-submenu-head,#adminmenu a.menu-top { 90 padding:7px 0; 91 } 92 93 .folded #adminmenu .wp-submenu-head,.folded #adminmenu a.menu-top { 94 padding:7px 0; 95 } 96 97 #adminmenu .wp-not-current-submenu .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu { 98 padding:10px; 99 } 100 101 #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu div.wp-menu-name { 102 color:#fff; 103 } 104 105 #adminmenu .wp-submenu,#adminmenu .wp-has-current-submenu .wp-submenu { 106 background:#F1F1F1!important 107 } 108 109 #adminmenu .wp-submenu a { 110 color:#333; 111 } 112 113 #adminmenu .wp-has-current-submenu ul>li>a { 114 padding-$x:34px 115 } 116 117 ul#adminmenu a.wp-has-current-submenu:after,ul#adminmenu>li.current>a.current:after,#adminmenu li.wp-has-submenu.wp-not-current-submenu.opensub:hover:after { 118 display:none 119 } 120 121 /*#adminmenu li.menu-top { 122 border-bottom:1px solid #e4e4e4; 123 }*/ 124 125 #adminmenu div.wp-menu-name { 126 color:#fff; 127 } 128 129 .wrap h2 { 130 //font-size:34px; 131 //font-weight:100; 132 padding:30px 25px 24px 0; 133 } 134 135 /*.wrap .add-new-h2,.wrap .add-new-h2:active { 136 background:#392C3D; 137 color:#FFF; 138 }*/ 139 140 .wrap .add-new-h2:hover { 141 background:#154 142 } 143 144 #titlediv #title-prompt-text { 145 font-size:1.2em; 146 font-weight:100 147 } 148 149 .menu.ui-sortable .menu-item-handle,.meta-box-sortables.ui-sortable .hndle { 150 //background: #F5F5F5 151 } 152 153 #collapse-menu { 154 color:#392C3D 155 } 156 157 #collapse-button div:after { 158 color:#392C3D 159 } 160 161 #collapse-menu:hover, #collapse-menu:hover #collapse-button div:after { 162 color: #F5954F 163 } 164 165 #adminmenu li a.wp-has-current-submenu .update-plugins, #adminmenu li.current a .awaiting-mod { 166 background-color: #F5954F 167 } 168 169 #wpadminbar ul#wp-admin-bar-root-default>li#wp-admin-bar-wp-logo { 170 display:none 171 } 172 173 #wpadminbar * { 174 font-family:'Segoe UI','Segoe UI Web Regular','Segoe UI Symbol','Helvetica Neue','BBAlpha Sans','S60 Sans',Arial,sans-serif; 175 font-size:14px 176 } 177 178 #wpadminbar { 179 background:#222222; 180 } 181 182 #wpadminbar .quicklinks .menupop ul li a:focus,#wpadminbar .quicklinks .menupop ul li a:focus strong,#wpadminbar .quicklinks .menupop ul li a:hover,#wpadminbar .quicklinks .menupop ul li a:hover strong,#wpadminbar .quicklinks .menupop.hover ul li a:focus,#wpadminbar .quicklinks .menupop.hover ul li a:hover,#wpadminbar li .ab-item:focus:before,#wpadminbar li a:focus .ab-icon:before,#wpadminbar li.hover .ab-icon:before,#wpadminbar li.hover .ab-item:before,#wpadminbar li:hover #adminbarsearch:before,#wpadminbar li:hover .ab-icon:before,#wpadminbar li:hover .ab-item:before,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:focus,#wpadminbar.nojs .quicklinks .menupop:hover ul li a:hover { 183 color:#FFF 184 } 185 186 #wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input { 187 margin-top:7px; 188 $x:0 189 } 190 191 #wpadminbar .menupop .ab-sub-wrapper,#wpadminbar .shortlink-input { 192 background:#392C3D 193 } 194 195 #wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img { 196 width:24px; 197 height:24px; 198 //border-radius:50% 199 } 200 201 202 203 li#wp-admin-bar-ods_title.ods_title_oneds { 204 width: 160px; 205 } 206 207 #wp-admin-bar-ods_title.ods_title_oneds>.ab-item { 208 /*text-align: center;*/ 209 padding-$x: 18px; 210 vertical-align: middle; 211 height: auto; 212 font-size: 23px; 213 font-family: 'Segoe UI Light','Segoe UI Web Light','Segoe UI Web Regular','Segoe UI','Segoe UI Symbol',HelveticaNeue-Light,'Helvetica Neue',Arial,sans-serif; 214 color: #fff; 215 } 216 217 #wp-admin-bar-ods_title_icon.ods_title_logo { 218 /*background: #F5954F;*/ 219 /*border-$y: 1px solid rgba(255,255,255,.3);*/ 220 width: 49px; 221 height: 41px; 222 padding:0px; 223 padding-top: 9px; 224 text-align: center; 225 } 226 227 228 @media screen and (min-width: 783px) { 229 230 #wpadminbar { 231 height:50px !important 232 } 233 234 .folded #wpcontent, .folded #wpfooter { 235 margin-$x: 50px; 236 } 237 238 .folded #adminmenu div.wp-menu-image { 239 width: 50px;} 240 .folded #adminmenu, .folded #adminmenu li.menu-top, .folded #adminmenuback, .folded #adminmenuwrap { 241 width: 50px; 242 } 243 .dashicons, .dashicons-before:before { 244 width: 22px; 245 height: 22px; 246 font-size: 22px; 247 } 248 #adminmenu div.wp-menu-image { 249 width: 50px;} 250 #collapse-button div:after { $x: -11px;} 251 #collapse-button { padding-$x: 15px;} 252 .folded .wp-submenu{top:0; $x:50px !important;} 253 254 #wpadminbar ul li { 255 padding:9px 4px 256 } 257 258 html.wp-toolbar { 259 padding-top:50px!important 260 } 261 262 .admin-bar.masthead-fixed .site-header { 263 top:50px!important 264 } 265 266 #adminmenu,#adminmenu .wp-submenu,#adminmenuback,#adminmenuwrap { 267 width:210px 268 } 269 270 #wpcontent,#wpfooter { 271 margin-$x:210px 272 } 273 274 #wpfooter a{ 275 color: #333 276 } 277 #wpfooter { 278 border-top: 1px solid #ddd; 279 background:#fff; 280 z-index:9999!important; 281 /*margin: 0 !important;*/ 282 position:fixed; 283 color:#666; 284 font-size:9pt; 285 font-family:'Segoe UI','Segoe UI Web Regular','Segoe UI Symbol','Helvetica Neue','BBAlpha Sans','S60 Sans',Arial,sans-serif 286 } 287 288 a#wpfooter { 289 color:inherit 290 } 291 292 #wp-admin-bar-site-name-default { 293 display:none!important 294 } 295 296 #adminmenu .wp-submenu { 297 $x:210px 298 } 299 } 300 //end @ media 301 302 @media screen and (max-width: 782px) { 303 304 img.is_img{margin-top: 8px !important;} 305 #wp-admin-bar-ods_title_icon.ods_title_logo { 306 height: 46px; 307 padding-top: 0px; 308 } 309 310 #wpadminbar li#wp-admin-bar-ods_title_icon { 311 display:block 312 } 313 #wpadminbar #wp-admin-bar-ods_title_icon>.ab-item { 314 width:50px;text-align:center 315 } 316 #wpadminbar #wp-admin-bar-ods_title_icon>.ab-item .ab-icon:before { 317 font:32px/1 'dashicons';top:-1px 318 } 319 #wpadminbar #wp-admin-bar-ods_title_icon>.ab-item img { 320 margin:19px 0 321 } 322 #wpadminbar #wp-admin-bar-ods_title_icon #wp-admin-bar-all .ab-item .ab-icon { 323 margin-$y:6px;font-size:20px !important;line-height:20px !important; 324 } 325 } 326 327 328 #adminmenu .awaiting-mod, #adminmenu .update-plugins { 329 //background-color: #BC5EB6; 330 } 331 332 333 </style> 334 "; 335 } 336 337 338 add_action( 'admin_head', 'ods_dash_css' ); 339 add_action( 'wp_head', 'ods_dash_css' ); 340 341 /* 342 //Register and enqueue a custom stylesheet in the WordPress admin. 343 function ods_enqueue_custom_admin_style() { 344 wp_register_style( 'custom_wp_admin_css', '/dashcss.css', false, '1.0.0' ); 345 wp_enqueue_style( 'custom_wp_admin_css' ); 346 } 347 add_action( 'admin_enqueue_scripts', 'ods_enqueue_custom_admin_style' ); 29 * continue 348 30 */ 349 31 350 function ods_front_admin_bar_style() { 351 if ( is_admin_bar_showing() ) { 352 ?> 353 <style type="text/css" media="screen"> 354 html { margin-top: 50px !important; } 355 * html body { margin-top: 50px !important; } 356 357 </style> 358 <?php } } 359 360 add_theme_support( 'admin-bar', array( 'callback' => 'ods_front_admin_bar_style' ) ); 361 362 363 // Add OneDS Toolbar Link 364 365 function ods_toolbar_link( $wp_admin_bar ) { 366 367 //link 368 /*$wp_admin_bar->add_node(array( 369 'id' => 'ods_title_icon', 370 'title' => '', 371 'meta' => array( 'class' => 'ods_title_logo',) 372 ) );*/ 373 374 $wp_admin_bar->add_node(array( 375 'id' => 'ods_title', 376 'title' => __('OneDS', 'oneds-start'), 377 'href' => home_url(). '/wp-admin', 378 'meta' => array( 'class' => 'ods_title_oneds',) 379 ) ); 380 381 //sublink 382 /*$wp_admin_bar->add_node(array( 383 'id' => 'outlook_link', 384 'title' => __('Outlook.com', 'oneds-start'), 385 'href' => 'https://outlook.com', 386 'parent' => 'ods_title_icon', 387 'meta' => array( 'target' => '_blank',) 388 ) );*/ 389 390 } 391 392 if ( is_admin() ) { 393 add_action( 'admin_bar_menu', 'ods_toolbar_link', 0 ); 394 } 395 396 // Add OneDS footer 397 398 function ods_footer_admin () { 399 echo __('Powered By', 'oneds-start'); 400 echo __(' <a href="http://www.wordpress.org">'); 401 echo __('WordPress', 'oneds-start'); 402 echo __('</a> '); 403 echo __('&', 'oneds-start'); 404 echo __(' <a href="http://www.oneds.org">'); 405 echo __('OneDS', 'oneds-start'); 406 echo __('</a>'); 407 } 408 409 add_filter('admin_footer_text', 'ods_footer_admin'); 410 411 function ods_footer_admin_core () { 412 echo "" . date_i18n( 'l, d/m/Y', current_time( 'timestamp', 1 ) ); 413 echo '<script type="text/javascript"> 414 function GetClock(){ 415 var d=new Date(); 416 var nday=d.getDay(),nmonth=d.getMonth(),ndate=d.getDate(),nyear=d.getYear(); 417 if(nyear<1000) nyear+=1900; 418 var d=new Date(); 419 var nhour=d.getHours(),nmin=d.getMinutes(),nsec=d.getSeconds(),ap; 420 421 if(nhour==0){ap=" AM";nhour=12;} 422 else if(nhour<12){ap=" AM";} 423 else if(nhour==12){ap=" PM";} 424 else if(nhour>12){ap=" PM";nhour-=12;} 425 426 if(nmin<=9) nmin="0"+nmin; 427 if(nsec<=9) nsec="0"+nsec; 428 429 document.getElementById("clockbox").innerHTML=" | "+nhour+":"+nmin+":"+nsec+""; 430 } 431 432 window.onload=function(){ 433 GetClock(); 434 setInterval(GetClock,1000); 435 } 436 </script> 437 <span id="clockbox"></span> 438 439 '; 440 echo "" . date_i18n( 'a', current_time( 'timestamp', 1 ) ); 441 } 442 443 add_filter('update_footer', 'ods_footer_admin_core'); 444 445 function footer_admin_core() { 446 remove_filter( 'update_footer', 'core_update_footer' ); 447 } 448 449 add_action( 'admin_menu', 'footer_admin_core' ); 450 451 452 453 /** 454 * Add OneDS maintenance mode 455 */ 456 457 function ods_mm_ui() { 458 add_submenu_page( 'options-general.php', $ods_mm_menu_title = __('Maintenance Mode', 'oneds-start'), $ods_mm_menu_title, 'delete_plugins', 'wp-maintenance-mode', 'ods_mm_ui_settingsPage'); 459 } 460 461 462 function ods_mm_ui_settingsPage() { 463 464 ?><div class="wrap"> 465 <h2><?php _e( 'Maintenance Mode Settings', 'oneds-start' ); ?></h2> 466 467 <form method="post" action="options.php"> 468 <?php settings_fields( 'ods_mm' ); ?> 469 <?php do_settings_sections( 'ods_mm' ); ?> 470 471 <table class="form-table"> 472 <tr valign="top"> 473 <th scope="row"><?php _e( 'Enabled', 'oneds-start' ); ?></th> 474 <td><input type="checkbox" name="ods_mm-enabled" value="1" <?php checked( esc_attr( get_option('ods_mm-enabled') ), 1 ); ?>></td> 475 </tr> 476 477 <tr valign="top"> 478 <th scope="row" colspan="2"><?php _e( 'Content', 'oneds-start' ); ?></th> 479 </tr> 480 <tr> 481 <td colspan="2"> 482 <?php 483 $content = get_option('ods_mm-content'); 484 $editor_id = 'ods_mm-content'; 485 486 wp_editor( $content, $editor_id ); 487 ?> 488 </td> 489 </tr> 490 </table> 491 492 <?php submit_button(); ?> 493 494 </form> 495 </div> 496 <?php 497 } 498 499 add_action( 'admin_menu', 'ods_mm_ui' ); 500 501 function ods_mm_style() { 502 echo ' 503 <style type="text/css"> 504 #wp-admin-bar-ods_mm-indicator.Enabled { 505 background: rgba(159, 0, 0, 1); 506 } 507 #wp-admin-bar-ods_mm-indicator.Disabled { 508 display: none!Important; 509 } 510 #wpadminbar #wp-admin-bar-ods_mm-indicator .ab-icon:before { 511 content: "\f308"; top: 2px; 512 } 513 @media screen and (max-width: 782px) { 514 #wpadminbar li#wp-admin-bar-ods_mm-indicator { 515 display:block 516 } 517 #wpadminbar #wp-admin-bar-ods_mm-indicator>.ab-item { 518 width:50px;text-align:center 519 } 520 #wpadminbar #wp-admin-bar-ods_mm-indicator>.ab-item .ab-icon:before { 521 font:32px/1 "dashicons";top:-1px 522 } 523 #wpadminbar #wp-admin-bar-ods_mm-indicator>.ab-item img { 524 margin:19px 0 525 } 526 #wpadminbar #wp-admin-bar-ods_mm-indicator #wp-admin-bar-all .ab-item .ab-icon { 527 margin-$y:6px;font-size:20px !important;line-height:20px !important 528 } 529 } 530 </style> 531 '; 532 } 533 534 add_action( 'admin_head', 'ods_mm_style' ); 535 add_action( 'wp_head', 'ods_mm_style' ); 536 537 function ods_mm_settings() { 538 register_setting('ods_mm', 'ods_mm-enabled'); 539 register_setting('ods_mm', 'ods_mm-content'); 540 541 $default = get_option('ods_mm-content-default'); 542 if(empty($default)) { 543 $content = __( '<h1>Website Under Maintenance</h1><p>Our Website is currently undergoing scheduled maintenance. Please check back soon.</p>', 'oneds-start' ); 544 update_option( 'ods_mm-content-default', $content);} 545 } 546 547 add_action( 'admin_init', 'ods_mm_settings' ); 548 549 550 function ods_mm_indicator($wp_admin_bar) { 551 $is_enabled = get_option('ods_mm-enabled'); 552 $status = __( 'Disabled', 'oneds-start' ); 553 if($is_enabled) 554 $status = __( 'Enabled', 'oneds-start' ); 555 556 $indicator = array( 557 'id' => 'ods_mm-indicator', 558 'title' => '<span class="ab-icon"></span>'.'<span class="ab-label">'.__( 'Maintenance Mode: ', 'oneds-start' ).$status.'</span>', 559 'href' => get_admin_url(null, 'options-general.php?page=wp-maintenance-mode'), 560 'meta' => array( 561 'title' => __( 'Maintenance Mode Settings', 'oneds-start' ), 562 'class' => 'Disabled', 563 ) 564 ); 565 if($is_enabled) 566 $indicator = array( 567 'id' => 'ods_mm-indicator', 568 'parent' => 'top-secondary', 569 'title' => '<span class="ab-icon"></span>'.'<span class="ab-label">'.__( 'Maintenance Mode: ', 'oneds-start' ).$status.'</span>', 570 'href' => get_admin_url(null, 'options-general.php?page=wp-maintenance-mode'), 571 'meta' => array( 572 'title' => __( 'Maintenance Mode Settings', 'oneds-start' ), 573 'class' => 'Enabled', 574 ) 575 ); 576 $wp_admin_bar->add_node($indicator); 577 } 578 579 add_action( 'admin_bar_menu', 'ods_mm_indicator', 100 ); 580 581 582 function ods_mm_maintenance() { 583 584 if ( !(current_user_can( 'administrator' ) || current_user_can( 'super admin' )) || ( isset($_GET['ods_mm']) && $_GET['ods_mm'] !== 'preview')) { 585 $content = get_option('ods_mm-content'); 586 if(empty($content)) { 587 $content = get_option( 'ods_mm-content-default'); 588 } 589 $content = apply_filters('the_content', $content); 590 591 wp_die($content, 'Maintenance Mode'); 592 } 593 594 } 595 596 $is_enabled = get_option('ods_mm-enabled'); 597 598 if($is_enabled) : 599 add_action('get_header', 'ods_mm_maintenance'); 600 endif; 601 602 /* to add link in plugins page to this plugin settings 1(now off) 603 *add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this, 'action_links') );*/ 604 /*to add link in plugins page to this plugin settings 2(now off) 605 *function action_links( $links ) { 606 $links[] = '<a href="'. get_admin_url(null, 'options-general.php?page=wp-maintenance-mode') .'">Settings</a>'; 607 return $links; 608 }*/ 609 610 611 /** 612 * Add OneDS Hello 613 */ 614 615 function ods_hello_get_lyric() { 616 /** These are the lyrics to Hello ODS */ 617 $lyrics = 'OneDS | One Data System'; 618 619 // Here we split it into lines 620 $lyrics = explode( "\n", $lyrics ); 621 622 // And then randomly choose a line 623 return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] ); 624 } 625 626 // This just echoes the chosen line, we'll position it later 627 function ods_hello() { 628 $chosen = ods_hello_get_lyric(); 629 echo "<p id='hello'>$chosen</p>"; 630 } 631 632 // Now we set that function up to execute when the admin_notices action is called 633 add_action( 'admin_notices', 'ods_hello' ); 634 635 // We need some CSS to position the paragraph 636 function ods_hello_css() { 637 // This makes sure that the positioning is also good for right-to-left languages 638 $x = is_rtl() ? 'left' : 'right'; 639 640 echo " 641 <style type='text/css'> 642 #hello { 643 float: $x; 644 padding-$x: 15px; 645 padding-top: 5px; 646 margin: 0; 647 font-size: 11px; 648 height: 30px; 649 } 650 </style> 651 "; 652 } 653 654 add_action( 'admin_head', 'ods_hello_css' ); 655 656 657 /** 658 * Add a OneDS shortcuts-widget to the dashboard 659 660 function ods_add_dashboard_widgets() { 661 662 wp_add_dashboard_widget( 663 'ods_dashboard_widget', // Widget slug. 664 'Shortcuts Dashboard Widget', // Title. 665 'ods_dashboard_widget_function' // Display function. 666 ); 667 } 668 add_action( 'wp_dashboard_setup', 'ods_add_dashboard_widgets' ); 669 670 // Create the function to output the contents of our Dashboard Widget. 671 672 function ods_dashboard_widget_function() { 673 674 // Display whatever it is you want to show. 675 echo "Hello World, I'm a great Shortcuts Dashboard Widget 676 you can Drop any Link Here"; 677 } 678 */ 679 680 681 /** 682 * Add OneDS Version in galance admin widget 683 */ 684 685 function ods_version() { 686 /*if ( !current_user_can( 'manage_options' ) ) 687 return;*/ 688 $ods_plugin_data = get_plugin_data( __FILE__ ); 689 $ods_plugin_version = $ods_plugin_data['Version']; 690 echo "</ul><ul><p id='oneds-version-message'><span id='oneds-version'>". __( 'OneDS', 'oneds-start' )." $ods_plugin_version.</span></p>"; 691 } 692 693 add_action( 'dashboard_glance_items', 'ods_version' ); 694 //add_filter( 'update_right_now_text', 'ods_version', 10, 3 ); 695 696 // remove from admin menu if not admin 697 698 function remove_menus(){ 699 700 if ( current_user_can( 'manage_options' ) ) 701 return; 702 703 //remove_menu_page( 'index.php' ); //Dashboard 704 remove_menu_page( 'edit.php' ); //Posts 705 //remove_menu_page( 'link-manager.php' ); //Links 706 //remove_menu_page( 'upload.php' ); //Media 707 //remove_menu_page( 'edit.php?post_type=page' ); //Pages 708 //remove_menu_page( 'edit-comments.php' ); //Comments 709 remove_menu_page( 'themes.php' ); //Appearance 710 remove_menu_page( 'plugins.php' ); //Plugins 711 remove_menu_page( 'users.php' ); //Users 712 remove_menu_page( 'tools.php' ); //Tools 713 remove_menu_page( 'options-general.php' ); //Settings 714 remove_menu_page( 'edit.php?post_type=shop_order' ); //WooCommerce shop order 715 remove_menu_page('woocommerce'); //WooCommerce 716 717 } 718 719 //if ( current_user_can( 'editor' ) ) { 720 add_action( 'admin_init', 'remove_menus' ); 721 //} 722 723 724 function ap_remove_jetpack_page( ) { 725 if ( class_exists( 'Jetpack' ) && !current_user_can( 'manage_options' ) ) { 726 remove_menu_page( 'jetpack' ); 727 } 728 } 729 //add_action( 'admin_init', 'ap_remove_jetpack_page', 999 ); 730 731 732 733 734 // remove this widgets from admin dashboard if not admin 735 736 //add_action('admin_init', 'rw_remove_dashboard_widgets'); 737 738 function rw_remove_dashboard_widgets() { 739 740 if ( current_user_can( 'manage_options' ) ) 741 return; 742 743 //remove_meta_box('dashboard_right_now', 'dashboard', 'normal'); // right now 744 //remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal'); // recent comments 745 //remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); // incoming links 746 //remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); // plugins 747 //remove_meta_box('dashboard_quick_press', 'dashboard', 'normal'); // quick press 748 //remove_meta_box('dashboard_recent_drafts', 'dashboard', 'normal'); // recent drafts 749 //remove_meta_box('gbworld_dashboard_widget', 'dashboard', 'normal'); // your blog-activity 750 //remove_meta_box('blogplay_db_widget', 'dashboard', 'normal'); // blogplay.com widget 751 //remove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wordpress blog 752 //remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); // other wordpress news 753 //remove_meta_box('yoast_db_widget', 'dashboard', 'normal'); //yoast widget 754 //remove_meta_box( 'dashboard_activity', 'dashboard', 'side' ); 755 //remove_meta_box( 'jetpack_summary_widget', 'dashboard', 'side' ); 756 757 } 758 759 760 761 762 ?> 32 include_once(plugin_dir_path(__FILE__) . '/includes/init.php'); -
oneds-start/trunk/readme.txt
r2095352 r2716381 1 1 === OneDS Start Package === 2 2 Contributors: king-a-s 3 Tags: OneDS, Dashboard, Dashboard Theme, Maintenance Mode, Hello4 Tested up to: 5. 2.15 Version: 0. 33 Tags: OneDS, Admin Dashboard, Admin Color Scheme, Admin Widgets, Maintenance Mode, Hello, ACF 4 Tested up to: 5.9.3 5 Version: 0.4 6 6 7 7 … … 9 9 10 10 == Description == 11 Dashboard Theme 11 Some CSS for Admin Dashboard 12 Admin Color Scheme (Dark) 13 Admin Widgets (Your System Information - Your Profile Information - Server Information) 12 14 Maintenance Mode 13 Empty Admin Widget 15 Language Switcher (Costomized - Thanks for User Language Switcher by Stephen Harris and Franz Josef Kaiser) 14 16 Empty Hello Lyrics add-on 17 Advanced Custom Fields (Just Included Thanks for ACF) 15 18 16 19 == Screenshots == 17 20 1. screenshot-1.jpg 21 2. screenshot-2.jpg 22 3. screenshot-3.jpg 23 18 24 19 25 == Installation == … … 38 44 = 0.3 = 39 45 * new release. 46 47 = 0.4 = 48 * new release.
Note: See TracChangeset
for help on using the changeset viewer.