├── README.md ├── inc ├── admin │ └── classes │ │ └── class-wp-statuses-admin.php └── core │ ├── classes │ └── class-wp-statuses-core-status.php │ ├── custom.php │ └── functions.php ├── js ├── inline-script.js ├── inline-script.min.js ├── press-this-script.js ├── press-this-script.min.js ├── script.js ├── script.min.js ├── sidebar.js └── sidebar.js.map ├── languages ├── wp-statuses-de_DE.mo ├── wp-statuses-de_DE.po ├── wp-statuses-de_DE_formal.mo ├── wp-statuses-de_DE_formal.po ├── wp-statuses-es_ES.mo ├── wp-statuses-es_ES.po ├── wp-statuses-fr_FR-1e7dd3b279d4fa91096bb7844e3fb538.json ├── wp-statuses-fr_FR-3c73bf895687c547c13b854e06c1e266.json ├── wp-statuses-fr_FR.mo ├── wp-statuses-fr_FR.po ├── wp-statuses-it_IT.mo ├── wp-statuses-ja.mo ├── wp-statuses-ja.po └── wp-statuses.pot └── wp-statuses.php /README.md: -------------------------------------------------------------------------------- 1 | # WP Statuses 2 | 3 | WordPress leader acts [here](https://wordpress.org/news/2024/09/wp-engine-banned/) and [here](https://wordpress.org/news/2024/10/secure-custom-fields/) are incompatible with my personal ethics and should also be incompatible with the ethics of an organization powering ~4/10 Internet sites. I decided to stop contributing to the WordPress software, WP Plugins/Themes, well everything that is part of Matt’s Web. 4 | 5 | Feel free to take over/fork this plugin & many thanks to the people who contributed to it! 6 | 7 | This WP Plugin is no more supported by @imath and this repository is now archived. 8 | -------------------------------------------------------------------------------- /inc/admin/classes/class-wp-statuses-admin.php: -------------------------------------------------------------------------------- 1 | hooks(); 54 | } 55 | 56 | /** 57 | * Starts the Admin class 58 | * 59 | * @since 1.0.0 60 | */ 61 | public static function start() { 62 | if ( ! is_admin() ) { 63 | return; 64 | } 65 | 66 | $wp_statuses = wp_statuses(); 67 | 68 | if ( empty( $wp_statuses->admin ) ) { 69 | $wp_statuses->admin = new self; 70 | } 71 | 72 | return $wp_statuses->admin; 73 | } 74 | 75 | /** 76 | * Setups the action and filters to hook to 77 | * 78 | * @since 1.0.0 79 | */ 80 | private function hooks() { 81 | add_action( 'admin_enqueue_scripts', array( $this, 'register_script' ), 1, 1 ); 82 | add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ), 10, 2 ); 83 | 84 | // Press This 85 | add_filter( 'press_this_save_post', array( $this, 'reset_status' ), 10, 1 ); 86 | 87 | // Block editor 88 | if ( function_exists( 'register_block_type' ) ) { 89 | add_action( 'init', array( $this, 'register_block_editor_script' ), 1001 ); 90 | add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_asset' ), 10 ); 91 | if ( function_exists( 'block_editor_rest_api_preload' ) ) { 92 | add_filter( 'block_editor_rest_api_preload_paths', array( $this, 'preload_path' ), 10 ); 93 | } else { 94 | add_filter( 'block_editor_preload_paths', array( $this, 'preload_path' ), 10 ); 95 | } 96 | } 97 | } 98 | 99 | /** 100 | * Register and enqueue needed scripts and css. 101 | * 102 | * @since 1.0.0 103 | */ 104 | public function register_script( $press_this = '' ) { 105 | 106 | // Editor's screen 107 | wp_register_script( 108 | 'wp-statuses', 109 | sprintf( '%1$sscript%2$s.js', wp_statuses_js_url(), wp_statuses_min_suffix() ), 110 | array( 'jquery', 'post' ), 111 | wp_statuses_version(), 112 | true 113 | ); 114 | 115 | // Regular Admin screens. 116 | if ( 'press-this.php' !== $press_this ) { 117 | $current_screen = get_current_screen(); 118 | 119 | // Bail if the post type is not supported. 120 | if ( isset( $current_screen->post_type ) && ! wp_statuses_is_post_type_supported( $current_screen->post_type ) ) { 121 | return; 122 | } 123 | 124 | if ( isset( $current_screen->base ) && in_array( $current_screen->base, array( 'page', 'post' ), true ) ) { 125 | wp_add_inline_style( 'edit', ' 126 | #wp-statuses-publish-box .inside { 127 | margin: 0; 128 | padding: 0; 129 | } 130 | 131 | #wp-statuses-dropdown { 132 | width: calc( 100% - 29px ); 133 | } 134 | 135 | #misc-publishing-actions .misc-pub-section span.dashicons { 136 | vertical-align: middle; 137 | color: #82878c; 138 | padding-right: 3px; 139 | } 140 | ' ); 141 | } 142 | 143 | // List tables screens 144 | if ( isset( $current_screen->base ) && 'edit' === $current_screen->base && ! empty( $current_screen->post_type ) ) { 145 | $inline_statuses = wp_statuses_get_statuses( $current_screen->post_type, 'inline' ); 146 | $statuses = array(); 147 | 148 | foreach ( $inline_statuses as $inline_status ) { 149 | if ( ! current_user_can( $this->post_type_capability ) && ! in_array( $inline_status->name, array( 'draft', 'pending' ), true ) ) { 150 | continue; 151 | } 152 | 153 | $statuses[ $inline_status->name ] = $inline_status->labels['inline_dropdown']; 154 | } 155 | 156 | $bulk_statuses = $statuses; 157 | unset( $bulk_statuses['password'] ); 158 | 159 | if ( ! empty( $inline_statuses ) ) { 160 | wp_enqueue_script( 161 | 'wp-statuses-inline', 162 | sprintf( '%1$sinline-script%2$s.js', wp_statuses_js_url(), wp_statuses_min_suffix() ), 163 | array( 'inline-edit-post' ), 164 | wp_statuses_version(), 165 | true 166 | ); 167 | wp_localize_script( 'wp-statuses-inline', 'wpStatusesInline', array( 168 | 'inline' => $statuses, 169 | 'bulk' => $bulk_statuses, 170 | 'bulk_default' => __( '— No Change —', 'wp-statuses' ), 171 | ) ); 172 | } 173 | } 174 | 175 | // Press This specific screen 176 | } else { 177 | $pressthis_statuses = wp_statuses_get_statuses( 'post', 'press_this' ); 178 | $statuses = array(); 179 | 180 | foreach ( $pressthis_statuses as $pressthis_status ) { 181 | // Only include Press this statuses if the user can use them. 182 | if ( ! current_user_can( $this->post_type_capability ) ) { 183 | continue; 184 | } 185 | 186 | $statuses[ $pressthis_status->name ] = $pressthis_status->labels['press_this_dropdown']; 187 | } 188 | 189 | if ( ! empty( $statuses ) ) { 190 | wp_enqueue_script( 191 | 'wp-statuses-press-this', 192 | sprintf( '%1$spress-this-script%2$s.js', wp_statuses_js_url(), wp_statuses_min_suffix() ), 193 | array( 'press-this' ), 194 | wp_statuses_version(), 195 | true 196 | ); 197 | wp_localize_script( 'wp-statuses-press-this', 'wpStatusesPressThis', array( 198 | 'statuses' => $statuses, 199 | ) ); 200 | } 201 | } 202 | } 203 | 204 | /** 205 | * Replace the WordPress Publish metabox by plugin's one. 206 | * 207 | * @since 1.0.0 208 | * 209 | * @param string $post_type The displayed post type. 210 | * @param WP_Post $post The post object. 211 | */ 212 | public function add_meta_box( $post_type, $post ) { 213 | // Bail if the Post Type is not supported, or if post uses Gutenberg block editor 214 | if ( ! wp_statuses_is_post_type_supported( $post_type ) ) { 215 | return; 216 | } 217 | 218 | // Remove the built-in Publish meta box. 219 | remove_meta_box( 'submitdiv', get_current_screen(), 'side' ); 220 | 221 | $publish_callback_args = array( '__back_compat_meta_box' => true ); 222 | 223 | if ( post_type_supports( $post_type, 'revisions' ) && 'auto-draft' !== $post->post_status ) { 224 | $revisions = wp_get_post_revisions( $post->ID, array( 'fields' => 'ids' ) ); 225 | 226 | // We should aim to show the revisions meta box only when there are revisions. 227 | if ( count( $revisions ) > 1 ) { 228 | $publish_callback_args = array( 229 | 'revisions_count' => count( $revisions ), 230 | 'revision_id' => reset( $revisions ), 231 | '__back_compat_meta_box' => true, 232 | ); 233 | } 234 | } 235 | 236 | // Use plugin's Publishing box instead. 237 | add_meta_box( 238 | 'wp-statuses-publish-box', 239 | __( 'Publishing', 'wp-statuses' ), 240 | array( $this, 'publishing_box' ), 241 | $post_type, 242 | 'side', 243 | 'high', 244 | $publish_callback_args 245 | ); 246 | 247 | // Validate the post type. 248 | $this->post_type_object = get_post_type_object( $post_type ); 249 | 250 | if ( is_a( $this->post_type_object, 'WP_Post_Type' ) ) { 251 | $this->post_type = $post_type; 252 | $this->post_type_capability = $this->post_type_object->cap->publish_posts; 253 | } 254 | } 255 | 256 | /** 257 | * The Publishing metabox. 258 | * 259 | * @since 1.0.0 260 | * 261 | * @param WP_Post $post The displayed post object. 262 | * @param array $args Additional arguments (eg: revisions' count). 263 | */ 264 | public function publishing_box( $post = null, $args = array() ) { 265 | if ( empty( $post->post_type ) ) { 266 | return; 267 | } 268 | 269 | $status = $post->post_status; 270 | if ( 'auto-draft' === $status ) { 271 | $status = 'draft'; 272 | } elseif ( ! empty( $post->post_password ) ) { 273 | $status = 'password'; 274 | } 275 | 276 | // Get the customizable labels 277 | $statuses_labels = wp_statuses_get_metabox_labels( $post->post_type ); 278 | 279 | foreach ( $statuses_labels as $status_name => $labels_list ) { 280 | $this->labels[ $status_name ] = wp_array_slice_assoc( $labels_list, array( 281 | 'metabox_submit', 282 | 'metabox_save_on', 283 | 'metabox_save_date', 284 | 'metabox_saved_on', 285 | 'metabox_saved_date', 286 | 'metabox_save_now', 287 | 'metabox_save_later', 288 | ) ); 289 | } 290 | 291 | // Load script for the metabox. 292 | wp_enqueue_script ( 'wp-statuses' ); 293 | wp_localize_script( 'wp-statuses', 'wpStatuses', array( 294 | 'status' => $status, 295 | 'attributes' => array( 296 | 'password' => $post->post_password, 297 | 'sticky' => is_sticky( $post->ID ), 298 | ), 299 | 'strings' => array( 300 | 'previewChanges' => __( 'Preview Changes', 'wp-statuses' ), 301 | 'preview' => __( 'Preview', 'wp-statuses' ), 302 | 'labels' => $this->labels, 303 | ), 304 | 'public_statuses' => wp_statuses_get_public_statuses( $post->post_type ), 305 | ) ); ?> 306 | 307 |
308 |
309 | 310 | get_minor_publishing_div( $post, $status ); ?> 315 | 316 |
317 | 318 | get_status_publishing_div( $post, $status ); 323 | $this->get_status_extra_attributes( $post, $status ); 324 | $this->get_time_publishing_div( $post, $status, $args ); ?> 325 | 326 |
327 |
328 | 329 |
330 | 331 |
332 | get_major_publishing_div( $post, $status ); ?> 333 | 334 |
335 |
336 | 337 |
338 | post_type ) || empty( $status ) ) { 351 | return; 352 | } 353 | 354 | // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key 355 | ?> 356 |
357 | 358 |
359 | 360 |
361 |
362 | 363 | labels['draft'] ) ) : ?> 364 | 365 | 366 | 367 | post_type_capability ) ) : ?> 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 |
376 | 377 | post_type_object ) ) : ?> 378 | 379 |
380 | %3$s', 381 | esc_url( get_preview_post_link( $post ) ), 382 | (int) $post->ID, 383 | 'publish' === $status ? esc_html__( 'Preview Changes', 'wp-statuses' ) : esc_html__( 'Preview', 'wp-statuses' ) 384 | ); ?> 385 | 386 |
387 | 388 | 398 | 399 |
400 |
401 | post_type ) || empty( $current ) ) { 414 | return; 415 | } 416 | 417 | $statuses = wp_statuses_get_statuses( $post->post_type ); 418 | 419 | $options = array( '', esc_attr( $current ) ), 460 | sprintf( '%s', esc_html( $status_display ) ), 461 | ); 462 | } else { 463 | $options[] = ''; 464 | } 465 | 466 | ?> 467 |
468 | 469 | 470 | %2$s', 472 | sanitize_html_class( $dashicon ), 473 | join( "\n", $options ) 474 | ); 475 | 476 | /** 477 | * As WordPress is overriding the $_POST global inside _wp_translate_postdata() 478 | * We'll use this input to remember what was the real posted status. 479 | * 480 | * @see this part of the code, around line 100 of wp-admin/includes/post.php : 481 | * if ( isset($post_data['publish']) && ( '' != $post_data['publish'] ) && ( !isset($post_data['post_status']) || $post_data['post_status'] != 'private' ) ) 482 | * $post_data['post_status'] = 'publish'; 483 | */ 484 | ?> 485 | 486 | 487 |
488 | post_type ) || empty( $status ) || ! current_user_can( $this->post_type_capability ) ) { 501 | return; 502 | } 503 | 504 | $sticky_class = $password_class = 'hide-if-js'; 505 | if ( wp_statuses_is_public( $status ) && ! $post->post_password ) { 506 | $sticky_class = ''; 507 | } 508 | 509 | if ( 'private' !== $status && ! empty( $post->post_password ) ) { 510 | $password_class = ''; 511 | } 512 | 513 | ?> 514 |
515 |
516 | post_type && current_user_can( 'edit_others_posts' ) ) : ?> 517 | 518 | ID ) ); ?> /> 519 | 522 |
523 |
524 | 525 | 526 | 527 | 528 | 529 |
530 |
531 | 532 | 542 |
543 |
544 | post_type ) || empty( $status ) || ! current_user_can( $this->post_type_capability ) ) { 557 | return; 558 | } 559 | 560 | global $action; 561 | $is_future = time() < strtotime( $post->post_date_gmt . ' +0000' ); 562 | 563 | /* translators: Publish box date format, see https://secure.php.net/date */ 564 | $datef = __( 'M j, Y @ H:i', 'wp-statuses' ); 565 | 566 | // Default stamps. 567 | $stamps = array( 568 | /* translators: 1: the scheduled date for the post. */ 569 | 'metabox_save_later' => __( 'Schedule for: %1$s', 'wp-statuses' ), 570 | /* translators: 1: the post’s saved date. */ 571 | 'metabox_saved_date' => __( 'Saved on: %1$s', 'wp-statuses' ), 572 | 'metabox_save_now' => __( 'Save now', 'wp-statuses' ), 573 | /* translators: 1: the date to save the post on. */ 574 | 'metabox_save_date' => __( 'Save on: %1$s', 'wp-statuses' ), 575 | ); 576 | 577 | if ( isset( $this->labels[ $status ] ) ) { 578 | $stamps = wp_parse_args( $this->labels[ $status ], $stamps ); 579 | } 580 | 581 | // Post already exists. 582 | if ( 0 !== (int) $post->ID ) { 583 | // scheduled for publishing at a future date. 584 | if ( 'future' === $status || ( 'draft' !== $status && $is_future ) ) { 585 | $stamp = $stamps['metabox_save_later']; 586 | 587 | // already published. 588 | } elseif ( ! in_array( $status, array( 'draft', 'future', 'pending' ), true ) ) { 589 | $stamp = $stamps['metabox_saved_date']; 590 | 591 | // draft, 1 or more saves, no date specified. 592 | } elseif ( '0000-00-00 00:00:00' === $post->post_date_gmt ) { 593 | $stamp = $stamps['metabox_save_now']; 594 | 595 | // draft, 1 or more saves, future date specified. 596 | } elseif ( $is_future ) { 597 | $stamp = $stamps['metabox_save_later']; 598 | 599 | // draft, 1 or more saves, date specified. 600 | } else { 601 | $stamp = $stamps['metabox_save_date']; 602 | } 603 | 604 | $date = date_i18n( $datef, strtotime( $post->post_date ) ); 605 | 606 | // draft (no saves, and thus no date specified). 607 | } else { 608 | $stamp = $stamps['metabox_save_now']; 609 | $date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) ); 610 | } 611 | 612 | if ( ! empty( $args['args']['revisions_count'] ) ) : ?> 613 |
614 | ' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); 617 | ?> 618 | 619 | 620 | 621 | 622 |
623 | 624 | 625 |
626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 |
636 | 637 | 638 | 639 |
640 |
641 | 642 | post_type ) || empty( $status ) ) { 664 | return; 665 | } 666 | 667 | // Default is submit box's default value. 668 | $text = ''; 669 | 670 | if ( isset( $this->labels[ $status ]['metabox_submit'] ) ) { 671 | $text = $this->labels[ $status ]['metabox_submit']; 672 | } 673 | 674 | // Submit input arguments. 675 | $args = array( 676 | 'text' => $text, 677 | 'type' => 'primary large', 678 | 'name' => 'save', 679 | 'wrap' => false, 680 | 'other_attributes' => array( 'id' => 'publish' ), 681 | ); 682 | 683 | $default_labels = reset( $this->labels ); 684 | $default_status = key( $this->labels ); 685 | 686 | // The current post type does not support the Publish status. 687 | if ( 'publish' !== $default_status ) { 688 | $args['text'] = __( 'Save', 'wp-statuses' ); 689 | 690 | if ( isset( $default_labels['metabox_submit'] ) ) { 691 | $args['text'] = $default_labels['metabox_submit']; 692 | } 693 | 694 | // The current post type supports the Publish status. 695 | } elseif ( in_array( $status, array( 'draft', 'pending' ), true ) || 0 === (int) $post->ID ) { 696 | $args = array_merge( $args, array( 697 | 'text' => __( 'Submit for Review', 'wp-statuses' ), 698 | 'name' => 'publish', 699 | ) ); 700 | 701 | if ( current_user_can( $this->post_type_capability ) ) { 702 | $args['text'] = __( 'Publish', 'wp-statuses' ); 703 | 704 | if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { 705 | $args['text'] = __( 'Schedule', 'wp-statuses' ); 706 | } 707 | } 708 | } 709 | 710 | /** This action is documented in wp-admin/includes/meta-boxes.php */ 711 | do_action( 'post_submitbox_start', $post ); ?> 712 | 713 |
714 | ID ) ) : ?> 715 | 716 | 717 | 718 | 719 |
720 | 721 |
722 | 723 | 724 |
725 | $status->name, 750 | ) ); 751 | } 752 | 753 | /** 754 | * Registers the Block Editor's Sidebar script. 755 | * 756 | * @since 2.0.0 757 | */ 758 | public function register_block_editor_script() { 759 | wp_register_script( 760 | 'wp-statuses-sidebar', 761 | sprintf( '%ssidebar.js', wp_statuses_js_url() ), 762 | array( 763 | 'wp-blocks', 764 | 'wp-components', 765 | 'wp-compose', 766 | 'wp-data', 767 | 'wp-date', 768 | 'wp-edit-post', 769 | 'wp-i18n', 770 | 'wp-plugins', 771 | 'lodash', 772 | ), 773 | wp_statuses_version() 774 | ); 775 | 776 | $test = wp_set_script_translations( 'wp-statuses-sidebar', 'wp-statuses', trailingslashit( wp_statuses()->dir ) . 'languages' ); 777 | } 778 | 779 | /** 780 | * Loads the needed CSS/Script for the Block Editor's Sidebar script. 781 | * 782 | * @since 2.0.0 783 | */ 784 | public function enqueue_block_editor_asset() { 785 | $post_type = get_post_type(); 786 | if ( ! in_array( $post_type, wp_statuses_get_customs_post_types(), true ) ) { 787 | return; 788 | } 789 | 790 | $future_control = ''; 791 | $required_status = wp_statuses_get( 'publish' ); 792 | 793 | if ( ! in_array( $post_type, $required_status->post_type, true ) ) { 794 | $future_control = ', .edit-post-post-schedule'; 795 | } 796 | 797 | wp_enqueue_script( 'wp-statuses-sidebar' ); 798 | wp_add_inline_style( 'wp-edit-post', " 799 | .editor-post-panel__row:has(.editor-post-status) { display: none } 800 | .edit-post-post-visibility{$future_control} { display: none } 801 | .editor-post-panel__row:has(.edit-post-post-visibility__toggle) { display: none } 802 | .editor-post-switch-to-draft { display: none } 803 | .components-panel__row.wp-statuses-info { display: block } 804 | .components-panel__row.wp-statuses-info .components-base-control__label, 805 | .components-panel__row.wp-statuses-info .components-select-control__input, 806 | .components-panel__row.wp-statuses-info .components-text-control__input { 807 | display: inline-block; 808 | max-width: 100%; 809 | width: 100%; 810 | } 811 | .components-base-control.wp-statuses-password { margin-top: 20px } 812 | " ); 813 | } 814 | 815 | /** 816 | * Adds a REST route to preload into the Block Editor. 817 | * 818 | * @since 2.0.0 819 | * 820 | * @param array $paths The list of REST routes to preload. 821 | * @return array The list of REST routes to preload. 822 | */ 823 | public function preload_path( $paths = array() ) { 824 | if ( ! in_array( get_post_type(), wp_statuses_get_customs_post_types(), true ) ) { 825 | return $paths; 826 | } 827 | 828 | return array_merge( $paths, array( 829 | '/wp/v2/statuses?context=edit' 830 | ) ); 831 | } 832 | } 833 | -------------------------------------------------------------------------------- /inc/core/classes/class-wp-statuses-core-status.php: -------------------------------------------------------------------------------- 1 | $value ) { 154 | $this->{$key} = $value; 155 | } 156 | 157 | $status_data = $this->get_initial_types_data( $status->name ); 158 | 159 | if ( $status_data ) { 160 | $this->labels = $status_data['labels']; 161 | $this->dashicon = $status_data['dashicon']; 162 | 163 | if ( ! isset( $status->post_type ) ) { 164 | $this->post_type = wp_statuses_get_registered_post_types( $status->name ); 165 | } 166 | 167 | if ( ! isset( $status->show_in_metabox_dropdown ) ) { 168 | $this->show_in_metabox_dropdown = true; 169 | } 170 | 171 | if ( ! isset( $status->show_in_inline_dropdown ) ) { 172 | $this->show_in_inline_dropdown = true; 173 | } 174 | } 175 | 176 | $this->labels = wp_parse_args( $this->labels, array( 177 | 'label' => $this->label, 178 | 'label_count' => $this->label_count, 179 | 'metabox_dropdown' => $this->label, 180 | 'metabox_publish' => __( 'Publish', 'wp-statuses' ), 181 | 'metabox_submit' => __( 'Update', 'wp-statuses' ), 182 | 'metabox_save_on' => __( 'Publish on:', 'wp-statuses' ), 183 | /* translators: 1: the date on which the post is to be published */ 184 | 'metabox_save_date' => __( 'Publish on: %1$s', 'wp-statuses' ), 185 | 'metabox_saved_on' => __( 'Published on:', 'wp-statuses' ), 186 | /* translators: 1: the date on which the post was published */ 187 | 'metabox_saved_date' => __( 'Published on: %1$s', 'wp-statuses' ), 188 | 'metabox_save_now' => __( 'Publish immediately', 'wp-statuses' ), 189 | /* translators: 1: the scheduled date for the post. */ 190 | 'metabox_save_later' => __( 'Schedule for: %1$s', 'wp-statuses' ), 191 | 'inline_dropdown' => $this->label, 192 | ) ); 193 | } 194 | 195 | /** 196 | * Get the additional properties for the WordPress built-in statuses. 197 | * 198 | * @since 1.0.0 199 | * 200 | * @param string $name The name of the status. 201 | * @return array The additional properties matching the name of the status. 202 | */ 203 | public function get_initial_types_data( $name = '' ) { 204 | /** 205 | * Filter here to edit the WordPress default statuses labels. 206 | * 207 | * @since 1.3.0 208 | * 209 | * @param array $value An associative array keyed by status names. 210 | */ 211 | $labels = apply_filters( 'wp_statuses_initial_labels', array( 212 | 'publish' => array( 213 | 'labels' => array( 214 | 'metabox_dropdown' => __( 'Publicly published', 'wp-statuses' ), 215 | 'inline_dropdown' => __( 'Published', 'wp-statuses' ), 216 | ), 217 | 'dashicon' => 'dashicons-visibility', 218 | ), 219 | 'private' => array( 220 | 'labels' => array( 221 | 'metabox_dropdown' => __( 'Privately Published', 'wp-statuses' ), 222 | 'metabox_submit' => __( 'Save as Private', 'wp-statuses' ), 223 | 'metabox_save_on' => __( 'Save as Private on:', 'wp-statuses' ), 224 | /* translators: Post date information. 1: Date on which the post is to be saved privately */ 225 | 'metabox_save_date' => __( 'Save as Private on: %1$s', 'wp-statuses' ), 226 | 'metabox_saved_on' => __( 'Saved as Private on:', 'wp-statuses' ), 227 | /* translators: Post date information. 1: Date on which the post was saved privately */ 228 | 'metabox_saved_date' => __( 'Saved as Private on: %1$s', 'wp-statuses' ), 229 | 'metabox_save_now' => __( 'Save as private now', 'wp-statuses' ), 230 | 'inline_dropdown' => __( 'Private', 'wp-statuses' ), 231 | ), 232 | 'dashicon' => 'dashicons-hidden', 233 | ), 234 | 'pending' => array( 235 | 'labels' => array( 236 | 'metabox_dropdown' => __( 'Pending Review', 'wp-statuses' ), 237 | ), 238 | 'dashicon' => 'dashicons-flag', 239 | ), 240 | 'draft' => array( 241 | 'labels' => array( 242 | 'metabox_dropdown' => __( 'Draft', 'wp-statuses' ), 243 | ), 244 | 'dashicon' => 'dashicons-edit', 245 | ), 246 | ) ); 247 | 248 | if ( ! isset( $labels[ $name ] ) ) { 249 | return null; 250 | } 251 | 252 | return $labels[ $name ]; 253 | } 254 | 255 | /** 256 | * Is the status a built-in one ? 257 | * 258 | * @since 2.0.0 259 | * 260 | * @return boolean True if the status is a built-in one. False otherwise. 261 | */ 262 | public function is_builtin() { 263 | return true === $this->_builtin; 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /inc/core/custom.php: -------------------------------------------------------------------------------- 1 | _x( 'Restricted to members', 'post status', 'wp-statuses' ), 23 | 'public' => true, 24 | /* translators: %s is the number of restricted to members pages. */ 25 | 'label_count' => _n_noop( 'Restricted to members (%s)', 'Restricted to members (%s)', 'wp-statuses' ), 26 | 'post_type' => array( 'page' ), // Just pages for this example :) 27 | 'show_in_admin_all_list' => true, 28 | 'show_in_admin_status_list' => true, 29 | 'show_in_metabox_dropdown' => true, 30 | 'show_in_inline_dropdown' => true, 31 | 'labels' => array( 32 | 'metabox_submit' => __( 'Save', 'wp-statuses' ), 33 | 'inline_dropdown' => __( 'Restricted', 'wp-statuses' ), 34 | ), 35 | 'dashicon' => 'dashicons-groups', 36 | ) ); 37 | } 38 | add_action( 'init', 'wp_statuses_register_members_restricted', 11 ); 39 | 40 | /** 41 | * Filter the content for the "restricted" pages. 42 | * 43 | * @since 1.0.0 44 | * 45 | * @param string $content The content. 46 | */ 47 | function wp_statuses_restrict_content( $content = '' ) { 48 | $post = get_post(); 49 | 50 | if ( ! isset( $post->post_type ) || 'page' !== $post->post_type ) { 51 | return $content; 52 | } 53 | 54 | if ( 'restricted' !== $post->post_status || is_user_logged_in() ) { 55 | return $content; 56 | } 57 | 58 | /* translators: %s is the login link. */ 59 | return sprintf( __( 'Please %s to view this content.', 'wp-statuses' ), sprintf( 60 | '%2$s', 61 | esc_url( wp_login_url( get_permalink( $post->ID ) ) ), 62 | esc_html__( 'log in', 'wp-statuses' ) 63 | ) ); 64 | } 65 | add_filter( 'the_content', 'wp_statuses_restrict_content', 1, 1 ); 66 | 67 | /** 68 | * Add an example of custom status for the Post's post type. 69 | * 70 | * @since 1.1.0 71 | */ 72 | function wp_statuses_register_archived_post_status() { 73 | register_post_status( 'archive', array( 74 | 'label' => __( 'Archive', 'wp-statuses' ), 75 | /* translators: %s is the number of archived posts. */ 76 | 'label_count' => _n_noop( 'Archived (%s)', 'Archived (%s)', 'wp-statuses' ), 77 | 'public' => false, 78 | 'show_in_admin_all_list' => false, 79 | 'show_in_admin_status_list' => true, 80 | 'post_type' => array( 'post' ), // Only for posts! 81 | 'show_in_metabox_dropdown' => true, 82 | 'show_in_inline_dropdown' => true, 83 | 'show_in_press_this_dropdown' => true, 84 | 'labels' => array( 85 | 'metabox_dropdown' => __( 'Archived', 'wp-statuses' ), 86 | 'metabox_submit' => __( 'Archive', 'wp-statuses' ), 87 | 'metabox_save_on' => __( 'Archive on:', 'wp-statuses' ), 88 | /* translators: Post date information. 1: Date on which the post is to be archived */ 89 | 'metabox_save_date' => __( 'Archive on: %1$s', 'wp-statuses' ), 90 | 'metabox_saved_on' => __( 'Archived on:', 'wp-statuses' ), 91 | /* translators: Post date information. 1: Date on which the post was archived */ 92 | 'metabox_saved_date' => __( 'Archived on: %1$s', 'wp-statuses' ), 93 | 'metabox_save_now' => __( 'Archive now', 'wp-statuses' ), 94 | 'inline_dropdown' => __( 'Archived', 'wp-statuses' ), 95 | 'press_this_dropdown' => __( 'Add to archives', 'wp-statuses' ), 96 | ), 97 | 'dashicon' => 'dashicons-archive', 98 | ) ); 99 | } 100 | add_action( 'init', 'wp_statuses_register_archived_post_status', 11 ); 101 | -------------------------------------------------------------------------------- /inc/core/functions.php: -------------------------------------------------------------------------------- 1 | version; 22 | } 23 | 24 | /** 25 | * Get the plugin's JS Url. 26 | * 27 | * @since 1.0.0 28 | * 29 | * @return string the plugin's JS Url. 30 | */ 31 | function wp_statuses_js_url() { 32 | return wp_statuses()->js_url; 33 | } 34 | 35 | /** 36 | * Get the JS minified suffix. 37 | * 38 | * @since 1.0.0 39 | * 40 | * @return string the JS minified suffix. 41 | */ 42 | function wp_statuses_min_suffix() { 43 | $min = '.min'; 44 | 45 | if ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) { 46 | $min = ''; 47 | } 48 | 49 | /** 50 | * Filter here to edit the minified suffix. 51 | * 52 | * @since 1.0.0 53 | * 54 | * @param string $min The minified suffix. 55 | */ 56 | return apply_filters( 'wp_statuses_min_suffix', $min ); 57 | } 58 | 59 | /** 60 | * Get the supported post types. 61 | * 62 | * @since 1.2.1 63 | * 64 | * @return array The list of supported Post Types name. 65 | */ 66 | function wp_statuses_get_supported_post_types() { 67 | // All Post Types using the WordPress UI except the Attachment one. 68 | $post_types = array_diff( get_post_types( array( 'show_ui' => true ) ), array( 'attachment' ) ); 69 | 70 | /** 71 | * Filter here to disable specific post types. 72 | * 73 | * @since 1.2.1 74 | * 75 | * @param array $post_types The list of supported Post Types name. 76 | */ 77 | return apply_filters( 'wp_statuses_get_supported_post_types', $post_types ); 78 | } 79 | 80 | /** 81 | * Checks if a post type can have custom statuses. 82 | * 83 | * @since 1.2.1 84 | * 85 | * @param string $post_type The name of the Post Type. 86 | * @return boolean True if supported. False otherwise. 87 | */ 88 | function wp_statuses_is_post_type_supported( $post_type = '' ) { 89 | if ( ! $post_type ) { 90 | return false; 91 | } 92 | 93 | return in_array( $post_type, wp_statuses_get_supported_post_types(), true ); 94 | } 95 | 96 | /** 97 | * Get the registered Post Types for the WordPress built-in statuses. 98 | * 99 | * This is used to set the 'post' attribute of the WP_Statuses_Core_Status object. 100 | * You can use the filter to customize the statuses for your custom post type. 101 | * 102 | * @since 1.0.0 103 | * 104 | * @param string $status_name The status name (eg: pending, draft etc..). 105 | * @return array The list of Post types supported by the WordPress built-in statuses. 106 | */ 107 | function wp_statuses_get_registered_post_types( $status_name = '' ) { 108 | /** 109 | * Filter here to edit the Post types built-in statuses apply to. 110 | * 111 | * @since 1.0.0 112 | * 113 | * @param array $value A list of public post types names. 114 | * @param string $status_name The status name (eg: pending, draft etc..). 115 | */ 116 | return apply_filters( 'wp_statuses_get_registered_post_types', wp_statuses_get_supported_post_types(), $status_name ); 117 | } 118 | 119 | /** 120 | * Get a status object. 121 | * 122 | * @since 1.0.0 123 | * 124 | * @param mixed $status It can be a WP_Statuses_Core_Status object, 125 | * the name of the status or a regular object. 126 | * @return WP_Statuses_Core_Status|null The status object if found. Null otherwise. 127 | */ 128 | function wp_statuses_get( $status = null ) { 129 | if ( empty( $status ) ) { 130 | return null; 131 | } 132 | 133 | if ( is_a( $status, 'WP_Statuses_Core_Status' ) ) { 134 | $_status = $status; 135 | } elseif ( is_object( $status ) ) { 136 | $_status = new WP_Statuses_Core_Status( $status ); 137 | } else { 138 | global $wp_post_statuses; 139 | 140 | if ( isset( $wp_post_statuses[ $status ] ) ) { 141 | if ( ! is_a( $wp_post_statuses[ $status ], 'WP_Statuses_Core_Status' ) ) { 142 | $wp_post_statuses[ $status ] = new WP_Statuses_Core_Status( $wp_post_statuses[ $status ] ); 143 | } 144 | 145 | $_status = $wp_post_statuses[ $status ]; 146 | } 147 | } 148 | 149 | if ( empty( $_status ) ) { 150 | return null; 151 | } 152 | 153 | return $_status; 154 | } 155 | 156 | /** 157 | * Register a new status for the Password protected visibility. 158 | * 159 | * @since 1.0.0 160 | */ 161 | function wp_statuses_register_password_protected() { 162 | register_post_status( 'password', array( 163 | 'label' => _x( 'Password Protected', 'post status', 'wp-statuses' ), 164 | 'public' => true, 165 | /* translators: %s is the number of password protected posts. */ 166 | 'label_count' => _n_noop( 'Password Protected (%s)', 'Password Protected (%s)', 'wp-statuses' ), 167 | 'post_type' => wp_statuses_get_registered_post_types( 'password' ), 168 | 'show_in_admin_all_list' => false, 169 | 'show_in_admin_status_list' => false, 170 | 'show_in_metabox_dropdown' => true, 171 | 'show_in_inline_dropdown' => true, 172 | 'labels' => array( 173 | 'metabox_dropdown' => __( 'Password Protected', 'wp-statuses' ), 174 | 'inline_dropdown' => __( 'Password', 'wp-statuses' ), 175 | ), 176 | 'dashicon' => 'dashicons-lock', 177 | '_builtin' => true, 178 | ) ); 179 | } 180 | 181 | /** 182 | * Map the registered statuses to WP_Statuses_Core_Status objects. 183 | * 184 | * @since 1.0.0 185 | */ 186 | function wp_statuses_register() { 187 | global $wp_post_statuses; 188 | 189 | $wp_post_statuses = array_map( 'wp_statuses_get', $wp_post_statuses ); 190 | 191 | /** 192 | * Hook here to be sure all available statuses are registered. 193 | * 194 | * @since 1.3.0 195 | */ 196 | do_action( 'wp_statuses_registered' ); 197 | } 198 | 199 | /** 200 | * Get the registered statuses for the given post type. 201 | * 202 | * @since 1.0.0 203 | * @since 1.3.0 Add a filter to allow statuses order changes. 204 | * 205 | * @param string $post_type The Name of the post type to get available statuses for. 206 | * @param string $context The context of the dropdown box. It can be: 207 | * - The Publishing metabox ('metabox' ), 208 | * - The inline edit row of the Post Type's Table list ('inline'). 209 | * @return array A filtered array containing the matching WP_Statuses_Core_Status objects. 210 | */ 211 | function wp_statuses_get_statuses( $post_type = '', $context = 'metabox' ) { 212 | global $wp_post_statuses; 213 | 214 | if ( empty( $post_type ) ) { 215 | return array(); 216 | } 217 | 218 | $dropdown_statuses = wp_filter_object_list( $wp_post_statuses, array( "show_in_{$context}_dropdown" => true ) ); 219 | 220 | foreach ( $dropdown_statuses as $status_name => $status ) { 221 | if ( ! in_array( $post_type, $status->post_type, true ) ) { 222 | unset( $dropdown_statuses[ $status_name ] ); 223 | } 224 | } 225 | 226 | /** 227 | * Filter here to edit the order of the displayed statuses. 228 | * 229 | * @since 1.3.0 230 | * 231 | * @param array $dropdown_statuses A filtered array containing the matching WP_Statuses_Core_Status objects. 232 | * @param string $context The context of the dropdown box. 233 | */ 234 | $sorted_statuses = apply_filters( 'wp_statuses_get_ordered_statuses', $dropdown_statuses, $context ); 235 | 236 | if ( array_diff_key( $dropdown_statuses, $sorted_statuses ) ) { 237 | _doing_it_wrong( __FUNCTION__, __( 'You need to preserve keys to customize the order.', 'wp-statuses' ), '1.3.0' ); 238 | return $dropdown_statuses; 239 | } 240 | 241 | return $sorted_statuses; 242 | } 243 | 244 | /** 245 | * Get the list of statuses labels for a post type. 246 | * 247 | * @since 1.2.0 248 | * 249 | * @param string $post_type The Name of the post type to get the statuses' labels for. 250 | * @return array An associative array listing labels for each status. 251 | */ 252 | function wp_statuses_get_metabox_labels( $post_type = '' ) { 253 | global $wp_post_statuses; 254 | 255 | $labels = array(); 256 | 257 | foreach ( $wp_post_statuses as $status_name => $status ) { 258 | if ( ! empty( $post_type ) && ! in_array( $post_type, $status->post_type, true ) ) { 259 | continue; 260 | } 261 | 262 | if ( empty( $status->labels ) ) { 263 | continue; 264 | } 265 | 266 | $labels[ $status_name ] = $status->labels; 267 | } 268 | 269 | return $labels; 270 | } 271 | 272 | /** 273 | * Get public statuses regarding the context. 274 | * 275 | * @since 1.0.0 276 | * 277 | * @param string $post_type The name of the post type, statuses are applying to. 278 | * @param string $context Whether public statuses are requested for an wp-admin usage or not. 279 | * Default: 'admin'. 280 | * @return array A list of public statuses' names. 281 | */ 282 | function wp_statuses_get_public_statuses( $post_type = '', $context = 'admin' ) { 283 | global $wp_post_statuses; 284 | 285 | if ( $post_type ) { 286 | // Validate the post type 287 | $type = get_post_type_object( $post_type ); 288 | if ( ! $type ) { 289 | $post_type = ''; 290 | } 291 | } 292 | 293 | $public_statuses = array(); 294 | $args = array( 'public' => true ); 295 | $operator = 'AND'; 296 | 297 | // Draft and Pending are protected 298 | if ( 'admin' === $context ) { 299 | $args['protected'] = true; 300 | $operator = 'OR'; 301 | } 302 | 303 | $statuses = wp_filter_object_list( $wp_post_statuses, $args, $operator ); 304 | 305 | foreach ( $statuses as $status ) { 306 | if ( $post_type && ! in_array( $post_type, $status->post_type, true ) ) { 307 | continue; 308 | } 309 | 310 | $public_statuses[] = $status->name; 311 | } 312 | 313 | /** 314 | * Filter here to edit the public statuses. 315 | * 316 | * @since 1.1.0 317 | * 318 | * @param array $public_statuses A list of public statuses' names. 319 | * @param string $post_type The name of the post type, statuses are applying to. 320 | * @param string $context Whether public statuses are requested for an wp-admin usage or not. 321 | */ 322 | return apply_filters( 'wp_statuses_get_public_statuses', $public_statuses, $post_type, $context ); 323 | } 324 | 325 | /** 326 | * Checks if a status is public 327 | * 328 | * @since 1.1.0 329 | * 330 | * @param string $status The status to check. 331 | * @return bool True if a status is public. False otherwise. 332 | */ 333 | function wp_statuses_is_public( $status = '' ) { 334 | $context = ''; 335 | 336 | if ( is_admin() && ! wp_doing_ajax() ) { 337 | $context = 'admin'; 338 | } 339 | 340 | $statuses = wp_statuses_get_public_statuses( '', $context ); 341 | 342 | if ( ! $statuses || ! $status ) { 343 | return false; 344 | } 345 | 346 | return in_array( $status, $statuses, true ); 347 | } 348 | 349 | /** 350 | * Unregisters a status for the given list of post type names. 351 | * 352 | * @since 1.3.0 353 | * 354 | * @param string $status The status name 355 | * @param array $post_type A list of post type names. 356 | * @return boolean True if the Status has been unregistered for the post types. 357 | * False otherwise. 358 | */ 359 | function wp_statuses_unregister_status_for_post_type( $status = '', $post_type = array() ) { 360 | if ( ! doing_action( 'wp_statuses_registered' ) ) { 361 | _doing_it_wrong( __FUNCTION__, __( 'You need to hook to the wp_statuses_registered action to unregister a status for one or more post type.', 'wp-statuses' ), '1.3.0' ); 362 | return false; 363 | } 364 | 365 | global $wp_post_statuses; 366 | $post_types = (array) $post_type; 367 | $statuses = (array) $status; 368 | 369 | if ( ! isset( $wp_post_statuses[ $status ]->post_type ) || ! $post_types ) { 370 | return false; 371 | } 372 | 373 | if ( 'publish' === $status ) { 374 | $statuses = array_merge( $statuses, array( 'draft', 'pending' ) ); 375 | } 376 | 377 | foreach ( $statuses as $s ) { 378 | $wp_post_statuses[ $s ]->post_type = array_diff( $wp_post_statuses[ $s ]->post_type, $post_types ); 379 | } 380 | 381 | return true; 382 | } 383 | 384 | /** 385 | * Gets all custom stati. 386 | * 387 | * @since 2.0.0 388 | * 389 | * @return array The list of custom status objects. 390 | */ 391 | function wp_statuses_get_customs() { 392 | $stati = get_post_stati( array( 'internal' => false ), 'objects' ); 393 | 394 | foreach ( $stati as $s => $status ) { 395 | if ( $status->is_builtin() ) { 396 | unset( $stati[ $s ] ); 397 | } 398 | } 399 | 400 | return $stati; 401 | } 402 | 403 | /** 404 | * Gets all post types concerned by one or more custom status. 405 | * 406 | * @since 2.0.0 407 | * 408 | * @return array The list of post types concerned by one or more custom status. 409 | */ 410 | function wp_statuses_get_customs_post_types() { 411 | $post_types = array(); 412 | $post_types_by_status = wp_list_pluck( wp_statuses_get_customs(), 'post_type', 'name' ); 413 | 414 | foreach ( $post_types_by_status as $types ) { 415 | $post_types = array_merge( $post_types, array_values( $types ) ); 416 | } 417 | 418 | return array_unique( $post_types ); 419 | } 420 | 421 | /** 422 | * Gets the registered post types for statuses in REST Requests. 423 | * 424 | * @since 2.0.0 425 | * 426 | * @param array $data The status data. 427 | * @param string $attribute The REST field's name attribute. 428 | * @return array The list of supported post types. 429 | */ 430 | function wp_statuses_rest_get_post_types( $data, $attribute ) { 431 | $value = array(); 432 | 433 | if ( 'post_type' !== $attribute || ! isset( $data['slug'] ) ) { 434 | return $value; 435 | } 436 | 437 | global $wp_post_statuses; 438 | $statuses = wp_list_pluck( $wp_post_statuses, 'post_type', 'name' ); 439 | 440 | if ( isset( $statuses[ $data['slug'] ] ) ) { 441 | $rest_post_types = get_post_types( array( 'show_in_rest' => true ) ); 442 | $value = array_intersect( $rest_post_types, $statuses[ $data['slug'] ] ); 443 | } 444 | 445 | return array_values( $value ); 446 | } 447 | 448 | /** 449 | * Gets the label for the Block Editor's dropdown in REST Requests. 450 | * 451 | * @since 2.0.0 452 | * 453 | * @param array $data The status data. 454 | * @param string $attribute The REST field's name attribute. 455 | * @return string The label to use into the Block editor. 456 | */ 457 | function wp_statuses_rest_get_label( $data, $attribute ) { 458 | $value = ''; 459 | 460 | if ( 'label' !== $attribute || ! isset( $data['slug'] ) ) { 461 | return $value; 462 | } 463 | 464 | // Defaults to the status name. 465 | $value = $data['name']; 466 | 467 | $status = wp_statuses_get( $data['slug'] ); 468 | if ( isset( $status->labels['metabox_dropdown'] ) ) { 469 | $value = esc_html( $status->labels['metabox_dropdown'] ); 470 | } 471 | 472 | return $value; 473 | } 474 | 475 | /** 476 | * Registers a new property for the REST Status controller schema. 477 | * 478 | * @since 2.0.0 479 | */ 480 | function wp_statuses_register_post_types_field() { 481 | register_rest_field( 'status', 'post_type', array( 482 | 'get_callback' => 'wp_statuses_rest_get_post_types', 483 | 'schema' => array( 484 | 'context' => array( 'view', 'edit' ), 485 | 'description' => __( 'The list of post types the status applies to.', 'wp-statuses' ), 486 | 'type' => 'array', 487 | 'readonly' => true, 488 | ), 489 | ) ); 490 | 491 | register_rest_field( 'status', 'label', array( 492 | 'get_callback' => 'wp_statuses_rest_get_label', 493 | 'schema' => array( 494 | 'context' => array( 'view', 'edit' ), 495 | 'description' => __( 'The label to use into the Block editor.', 'wp-statuses' ), 496 | 'type' => 'string', 497 | 'readonly' => true, 498 | ), 499 | ) ); 500 | 501 | foreach ( wp_statuses_get_customs_post_types() as $post_type ) { 502 | $post_type_object = get_post_type_object( $post_type ); 503 | if ( ! isset( $post_type_object->show_in_rest ) || true !== $post_type_object->show_in_rest ) { 504 | continue; 505 | } 506 | 507 | add_filter( "rest_prepare_{$post_type}", 'wp_statuses_rest_prepare_for_response', 10, 3 ); 508 | add_filter( "rest_pre_insert_{$post_type}", 'wp_statuses_rest_prepare_for_database', 10, 2 ); 509 | } 510 | } 511 | add_action( 'rest_api_init', 'wp_statuses_register_post_types_field', 11 ); 512 | 513 | /** 514 | * Checks whether a post type is being edited inside the Block Editor. 515 | * 516 | * @since 2.1.5 517 | * 518 | * @return bool True if a post type is being edited inside the Block Editor. 519 | * False otherwise. 520 | */ 521 | function wp_statuses_is_post_editing() { 522 | $retval = is_admin(); 523 | 524 | if ( ! $retval && defined( 'REST_REQUEST' ) && REST_REQUEST ) { 525 | $retval = false !== strpos( wp_get_referer(), admin_url() ); 526 | } 527 | 528 | return $retval; 529 | } 530 | 531 | /** 532 | * Adds a specific custom status property for the WP REST Response. 533 | * 534 | * @since 2.0.0 535 | * 536 | * @param WP_REST_Response $response The response object. 537 | * @param WP_Post $post Post object. 538 | * @param WP_REST_Request $request Request object. 539 | * @return WP_REST_Response The response object. 540 | */ 541 | function wp_statuses_rest_prepare_for_response( WP_REST_Response $response, WP_Post $post, WP_REST_Request $request ) { 542 | if ( 'edit' !== $request->get_param( 'context' ) ) { 543 | return $response; 544 | } 545 | 546 | $post_status = get_post_status( $post ); 547 | if ( 'trash' === $post_status ) { 548 | return $response; 549 | } 550 | 551 | $post_type = $response->get_data(); 552 | $post_type['custom_status'] = $post_status; 553 | 554 | // Use a specific status for password protected posts. 555 | if ( isset( $post->post_password ) && $post->post_password ) { 556 | $post_type['custom_status'] = 'password'; 557 | } 558 | 559 | // Always trick the Block Editor so that is uses the "Update" major action button. 560 | if ( wp_statuses_is_post_editing() ) { 561 | $post_type['status'] = 'private'; 562 | 563 | if ( isset( $post_type['title']['raw'] ) && __( 'Auto Draft', 'default' ) === $post_type['title']['raw'] ) { 564 | $post_type['title'] = array( 565 | 'raw' => '', 566 | 'rendered' => '', 567 | ); 568 | } 569 | } 570 | 571 | $response->set_data( $post_type ); 572 | 573 | return $response; 574 | } 575 | 576 | /** 577 | * Looks for a valid specific custom status property to use it when creating/updating post types. 578 | * 579 | * @since 2.0.0 580 | * 581 | * @param stdClass $prepared_post An object representing a single post prepared 582 | * for inserting or updating the database. 583 | * @param WP_REST_Request $request TheRequest object. 584 | * @return stdClass The object to save in database. 585 | */ 586 | function wp_statuses_rest_prepare_for_database( $prepared_post, WP_REST_Request $request ) { 587 | $custom_status = $request->get_param( 'custom_status' ); 588 | $status = $request->get_param( 'status' ); 589 | 590 | // Makes sure the custom status is preserved when updating the post content. 591 | if ( ! $custom_status && $status && 'private' === $status ) { 592 | $request_headers = $request->get_headers(); 593 | $edit_links = array( 594 | 'edit' => esc_url( get_edit_post_link( $prepared_post->ID ) ), 595 | 'new' => esc_url( add_query_arg( 'post_type', $prepared_post->post_type, admin_url( 'post-new.php' ) ) ), 596 | ); 597 | 598 | if ( 'post' === $prepared_post->post_type ) { 599 | $edit_links['new'] = remove_query_arg( 'post_type', $edit_links['new'] ); 600 | } 601 | 602 | if ( ! isset( $request_headers['referer'] ) ) { 603 | return $prepared_post; 604 | } 605 | 606 | $referer = $request_headers['referer']; 607 | if ( is_array( $referer ) ) { 608 | $referer = esc_url( reset( $referer ) ); 609 | } 610 | 611 | if ( ! in_array( $referer, $edit_links, true ) ) { 612 | return $prepared_post; 613 | } 614 | 615 | // Keep the current status, as updating the status is done thanks to the `custom_status`. 616 | $custom_status = get_post_status( $prepared_post->ID ); 617 | 618 | } elseif ( ! wp_statuses_get( $custom_status ) ) { 619 | return $prepared_post; 620 | } 621 | 622 | // Use the custom status. 623 | $prepared_post->post_status = $custom_status; 624 | 625 | // Use the publish status for password protected posts. 626 | if ( 'password' === $custom_status ) { 627 | $prepared_post->post_status = 'publish'; 628 | } 629 | 630 | return $prepared_post; 631 | } 632 | -------------------------------------------------------------------------------- /js/inline-script.js: -------------------------------------------------------------------------------- 1 | /* global wpStatusesInline */ 2 | ( function( $ ) { 3 | 4 | // Bail if not set 5 | if ( typeof wpStatusesInline === 'undefined' ) { 6 | return; 7 | } 8 | 9 | window.wpStatuses = { 10 | init: function() { 11 | var that = this; 12 | 13 | // Reset the status for the bulk-edit action. 14 | that.resetStatuses( $( '#bulk-edit' ).find( '[name="_status"]' ), '', 'bulk' ); 15 | 16 | $( '#the-list' ).on( 'click', '.editinline', function() { 17 | var Id = window.inlineEditPost.getId( this ), 18 | select = $( '#edit-' + Id ).find( '[name="_status"]' ) || null, 19 | password = $( '#edit-' + Id ).find( '[name="post_password"]' ) || null, 20 | privateCb = $( '#edit-' + Id ).find( '[name="keep_private"]' ) || null, 21 | sticky = $( '#edit-' + Id ).find( '[name="sticky"]' ) || null; 22 | 23 | if ( select && password && privateCb ) { 24 | var selectedStatus = $( '#inline_' + Id + ' ._status' ).html(); 25 | that.Id = Id; 26 | 27 | if ( $( password ).val() ) { 28 | selectedStatus = 'password'; 29 | } else { 30 | $( password ).prop( 'disabled', true ); 31 | } 32 | 33 | if ( ! wpStatusesInline.inline.publish || -1 === $.inArray( selectedStatus, [ 'draft', 'pending', 'publish', 'future'] ) ) { 34 | $( sticky ).prop( 'disabled', true ); 35 | } 36 | 37 | if ( 'undefined' === typeof wpStatusesInline.inline.password ) { 38 | $( password ).parents( 'label' ).first().remove(); 39 | } else { 40 | $( select ).parent().after( $( password ).parents( 'label' ).first() ); 41 | } 42 | 43 | // Remove Private checkbox 44 | $( privateCb ).parents( '.inline-edit-group' ).first().find( '.inline-edit-or' ).remove(); 45 | $( privateCb ).parent().remove(); 46 | 47 | // Reset the statuses select tag. 48 | that.resetStatuses( select, selectedStatus ); 49 | } 50 | } ); 51 | 52 | $( '#the-list' ).on( 'change', '[name="_status"]', function( event ) { 53 | var newStatus = $( event.currentTarget ).find( ':selected' ).data( 'status' ); 54 | 55 | if ( 'password' === newStatus ) { 56 | $( '#edit-' + that.Id ).find( '[name="sticky"]' ).prop( 'disabled', true ); 57 | $( '#edit-' + that.Id ).find( '[name="post_password"]' ).prop( 'disabled', false ).focus(); 58 | } else { 59 | $( '#edit-' + that.Id ).find( '[name="post_password"]' ).prop( 'disabled', true ); 60 | } 61 | 62 | if ( -1 !== $.inArray( newStatus, [ 'draft', 'pending', 'publish', 'future'] ) ) { 63 | $( '#edit-' + that.Id ).find( '[name="sticky"]' ).prop( 'disabled', false ); 64 | $( '#bulk-edit' ).find( '[name="sticky"]' ).prop( 'disabled', false ); 65 | } else { 66 | $( '#edit-' + that.Id ).find( '[name="sticky"]' ).prop( 'disabled', true ); 67 | $( '#bulk-edit' ).find( '[name="sticky"]' ).prop( 'disabled', true ); 68 | } 69 | } ); 70 | }, 71 | 72 | resetStatuses: function( tag, current, action ) { 73 | var type = action || 'inline'; 74 | 75 | // Reset options. 76 | tag.empty(); 77 | 78 | if ( 'bulk' === type ) { 79 | $( tag ).append( 80 | $( '' ).prop( 'value', '-1' ).html( wpStatusesInline.bulk_default ) 81 | ); 82 | } 83 | 84 | // Repopulate with WP Statuses statuses. 85 | $.each( wpStatusesInline[type], function( v, t ) { 86 | var s = v; 87 | if ( 'password' === v ) { 88 | s = 'publish'; 89 | } 90 | 91 | $( tag ).append( 92 | $( '' ).prop( 'value', s ).prop( 'selected', v === current ).data( 'status', v ).html( t ) 93 | ); 94 | } ); 95 | } 96 | }; 97 | 98 | $( document ).ready( function(){ window.wpStatuses.init(); } ); 99 | 100 | } )( jQuery ); 101 | -------------------------------------------------------------------------------- /js/inline-script.min.js: -------------------------------------------------------------------------------- 1 | !function(p){"undefined"!=typeof wpStatusesInline&&(window.wpStatuses={init:function(){var a=this;a.resetStatuses(p("#bulk-edit").find('[name="_status"]'),"","bulk"),p("#the-list").on("click",".editinline",function(){var e,t=window.inlineEditPost.getId(this),i=p("#edit-"+t).find('[name="_status"]')||null,n=p("#edit-"+t).find('[name="post_password"]')||null,s=p("#edit-"+t).find('[name="keep_private"]')||null,d=p("#edit-"+t).find('[name="sticky"]')||null;i&&n&&s&&(e=p("#inline_"+t+" ._status").html(),a.Id=t,p(n).val()?e="password":p(n).prop("disabled",!0),wpStatusesInline.inline.publish&&-1!==p.inArray(e,["draft","pending","publish","future"])||p(d).prop("disabled",!0),void 0===wpStatusesInline.inline.password?p(n).parents("label").first().remove():p(i).parent().after(p(n).parents("label").first()),p(s).parents(".inline-edit-group").first().find(".inline-edit-or").remove(),p(s).parent().remove(),a.resetStatuses(i,e))}),p("#the-list").on("change",'[name="_status"]',function(e){e=p(e.currentTarget).find(":selected").data("status");"password"===e?(p("#edit-"+a.Id).find('[name="sticky"]').prop("disabled",!0),p("#edit-"+a.Id).find('[name="post_password"]').prop("disabled",!1).focus()):p("#edit-"+a.Id).find('[name="post_password"]').prop("disabled",!0),-1!==p.inArray(e,["draft","pending","publish","future"])?(p("#edit-"+a.Id).find('[name="sticky"]').prop("disabled",!1),p("#bulk-edit").find('[name="sticky"]').prop("disabled",!1)):(p("#edit-"+a.Id).find('[name="sticky"]').prop("disabled",!0),p("#bulk-edit").find('[name="sticky"]').prop("disabled",!0))})},resetStatuses:function(n,s,e){e=e||"inline";n.empty(),"bulk"===e&&p(n).append(p("").prop("value","-1").html(wpStatusesInline.bulk_default)),p.each(wpStatusesInline[e],function(e,t){var i="password"===e?"publish":e;p(n).append(p("").prop("value",i).prop("selected",e===s).data("status",e).html(t))})}},p(document).ready(function(){window.wpStatuses.init()}))}(jQuery); -------------------------------------------------------------------------------- /js/press-this-script.js: -------------------------------------------------------------------------------- 1 | /* global wpStatusesPressThis */ 2 | ( function( $ ) { 3 | 4 | // Bail if not set 5 | if ( typeof wpStatusesPressThis === 'undefined' ) { 6 | return; 7 | } 8 | 9 | window.wpStatuses = { 10 | init: function() { 11 | if ( 'object' !== typeof wpStatusesPressThis.statuses ) { 12 | return; 13 | } 14 | 15 | $.each( wpStatusesPressThis.statuses, function( name, label ) { 16 | $( '.post-actions .split-button-body' ).prepend( 17 | $( '
  • ' ).html( 18 | $( '' ).prop( 'type', 'button' ).addClass( 19 | 'button-link publish-button split-button-option wp-statuses-button' 20 | ).data( 'status', name ).html( label ) 21 | ) 22 | ); 23 | } ); 24 | 25 | /** 26 | * window.wp.pressThis has no public method for submitPost() 27 | */ 28 | $( '.wp-statuses-button' ).on( 'click', function( event ) { 29 | var status = $( event.currentTarget ).data( 'status'); 30 | 31 | if ( 'undefined' !== typeof wpStatusesPressThis.statuses[status] ) { 32 | if ( $( '#pressthis-form [name="_wp_statuses_status"]' ).length ) { 33 | $( '#pressthis-form [name="_wp_statuses_status"]' ).val( status ); 34 | } else { 35 | $( '#pressthis-form' ).prepend( 36 | $( '' ).prop( 'name', '_wp_statuses_status' ).prop( 'type', 'hidden' ).val( status ) 37 | ); 38 | } 39 | 40 | $( '#pt-force-redirect' ).val( 'true' ); 41 | } 42 | } ); 43 | } 44 | }; 45 | 46 | $( document ).ready( function(){ window.wpStatuses.init(); } ); 47 | 48 | } )( jQuery ); 49 | -------------------------------------------------------------------------------- /js/press-this-script.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"undefined"!=typeof wpStatusesPressThis&&(window.wpStatuses={init:function(){"object"==typeof wpStatusesPressThis.statuses&&(e.each(wpStatusesPressThis.statuses,function(t,s){e(".post-actions .split-button-body").prepend(e("
  • ").html(e("").prop("type","button").addClass("button-link publish-button split-button-option wp-statuses-button").data("status",t).html(s)))}),e(".wp-statuses-button").on("click",function(t){t=e(t.currentTarget).data("status");void 0!==wpStatusesPressThis.statuses[t]&&(e('#pressthis-form [name="_wp_statuses_status"]').length?e('#pressthis-form [name="_wp_statuses_status"]').val(t):e("#pressthis-form").prepend(e("").prop("name","_wp_statuses_status").prop("type","hidden").val(t)),e("#pt-force-redirect").val("true"))}))}},e(document).ready(function(){window.wpStatuses.init()}))}(jQuery); -------------------------------------------------------------------------------- /js/script.js: -------------------------------------------------------------------------------- 1 | /* global wpStatuses, postL10n */ 2 | 3 | // Make sure the wp object exists. 4 | window.wp = window.wp || {}; 5 | 6 | ( function( $ ) { 7 | 8 | // Bail if not set 9 | if ( typeof wpStatuses === 'undefined' ) { 10 | return; 11 | } 12 | 13 | if ( typeof postL10n !== 'undefined' && typeof wp.deprecateL10nObject === 'undefined' ) { 14 | wpStatuses.L10n = postL10n; 15 | } else if ( typeof wp.i18n.__ !== 'undefined' ) { 16 | wpStatuses.L10n = { 17 | publishOnFuture: wp.i18n.__( 'Schedule for:' ), 18 | schedule: wp.i18n._x( 'Schedule', 'post action/button label' ), 19 | publishOn: wp.i18n.__( 'Publish on:' ), 20 | publish: wp.i18n.__( 'Publish' ), 21 | publishOnPast: wp.i18n.__( 'Published on:' ), 22 | update: wp.i18n.__( 'Update' ), 23 | dateFormat: wp.i18n.__( '%1$s %2$s, %3$s at %4$s:%5$s' ), 24 | savePending: wp.i18n.__( 'Save as Pending' ), 25 | saveDraft: wp.i18n.__( 'Save Draft' ) 26 | }; 27 | } else { 28 | return; 29 | } 30 | 31 | var wpStatusesBox = { 32 | 33 | init: function() { 34 | this.publishingBox = $( '#wp-statuses-publish-box' ); 35 | this.timeStampDiv = $( '#timestampdiv' ); 36 | this.majorSubmitName = $( '#publish' ).prop( 'name' ); 37 | 38 | this.setListeners(); 39 | }, 40 | 41 | setListeners: function() { 42 | // Status changed 43 | this.publishingBox.on( 'change', '#wp-statuses-dropdown', this.updateStatus.bind( this ) ); 44 | 45 | // Edit publish time click 46 | this.publishingBox.on( 'click', '.edit-timestamp, .cancel-timestamp, .save-timestamp', this.editTimestamp.bind( this ) ); 47 | 48 | // Submit form 49 | $( '#post' ).on( 'submit', this.submitForm.bind( this ) ); 50 | }, 51 | 52 | updateStatus: function( e ) { 53 | var newDashicon = $( e.currentTarget ).find( ':selected').data( 'dashicon' ), 54 | oldDashicon = $( e.currentTarget ).parent().find( '.dashicons' ), 55 | newStatus = $( e.currentTarget ).find( ':selected').data( 'status' ); 56 | 57 | if ( ! newDashicon ) { 58 | newDashicon = 'dashicons-post-status'; 59 | } 60 | 61 | // Reset Class 62 | oldDashicon.prop( 'class', '' ).addClass( 'dashicons' ); 63 | oldDashicon.addClass( newDashicon ); 64 | 65 | // Handle Status attributes 66 | this.setStatusAttributes( newStatus ); 67 | 68 | if ( 'password' === newStatus ) { 69 | newStatus = 'publish'; 70 | $( '#wp-statuses-dropdown :selected' ).prop( 'value', newStatus ); 71 | } 72 | 73 | $( '#wp-statuses-status' ).val( newStatus ); 74 | 75 | // Make sure UI texts are updated. 76 | this.updateText(); 77 | }, 78 | 79 | setStatusAttributes: function( status ) { 80 | // First reset attributes 81 | $.each( $( '#wp-statuses-attributes input' ), function( i, element ) { 82 | if ( 'checkbox' === element.type || 'radio' === element.type ) { 83 | $( element ).prop( 'checked', false ); 84 | 85 | } else if ( 'text' === element.type ) { 86 | $( element ).val( '' ); 87 | } 88 | 89 | $( element ).parent( '.wp-statuses-attribute-container' ).addClass( 'hide-if-js' ); 90 | } ); 91 | 92 | if ( 'password' === status || ( status === wpStatuses.status && wpStatuses.attributes.password ) ) { 93 | $( '#password-span' ).removeClass( 'hide-if-js' ); 94 | 95 | if ( wpStatuses.attributes.password ) { 96 | $( '#post_password' ).val( wpStatuses.attributes.password ); 97 | } 98 | } else if ( -1 !== $.inArray( status, wpStatuses.public_statuses ) ) { 99 | $( '#sticky-span' ).removeClass( 'hide-if-js' ); 100 | 101 | if ( wpStatuses.attributes.sticky ) { 102 | $( '#sticky' ).prop( 'checked', wpStatuses.attributes.sticky ); 103 | } 104 | } 105 | }, 106 | 107 | updateText: function() { 108 | var currentDate, formDate, originalDate, dateObject = { 109 | aa: parseInt( $('#aa').val(), 10 ), 110 | mm: parseInt( $('#mm').val(), 10 ) - 1, 111 | jj: parseInt( $('#jj').val(), 10 ), 112 | hh: parseInt( $('#hh').val(), 10 ), 113 | mn: parseInt( $('#mn').val(), 10 ) 114 | }, publishOn, dateDiff, status = $( '#wp-statuses-dropdown' ).val(), month, day, 115 | rStatus = $( '#wp-statuses-dropdown :selected' ).data( 'status' ), 116 | originalStatus = $( '#original_post_status' ).val(); 117 | 118 | if ( ! this.timeStampDiv.length ) { 119 | return true; 120 | } 121 | 122 | // Set dates 123 | formDate = new Date( dateObject.aa, dateObject.mm, dateObject.jj, dateObject.hh, dateObject.mn ); 124 | currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() - 1, $('#cur_jj').val(), $('#cur_hh').val(),$('#cur_mn').val() ); 125 | originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() - 1, $('#hidden_jj').val(), $('#hidden_hh').val(),$('#hidden_mn').val() ); 126 | 127 | // Catch unexpected date problems. 128 | if ( formDate.getFullYear() !== dateObject.aa || ( formDate.getMonth() ) !== dateObject.mm || formDate.getDate() !== dateObject.jj || formDate.getMinutes() !== dateObject.mn ) { 129 | this.timeStampDiv.find( '.timestamp-wrap' ).addClass( 'form-invalid' ); 130 | return false; 131 | } else { 132 | this.timeStampDiv.find( '.timestamp-wrap' ).removeClass( 'form-invalid' ); 133 | } 134 | 135 | // Reset the Major Publish name 136 | $('#publish').prop( 'name', this.majorSubmitName ); 137 | 138 | // Future, past or now ? 139 | dateDiff = formDate - currentDate; 140 | 141 | // Schedule action 142 | if ( dateDiff > 0 && -1 !== $.inArray( status, ['draft', 'pending', 'publish'] ) ) { 143 | publishOn = wpStatuses.L10n.publishOnFuture; 144 | $( '#publish' ).val( wpStatuses.L10n.schedule ); 145 | $( '#publish' ).prop( 'name', 'publish' ); 146 | 147 | if ( 'password' === rStatus ) { 148 | $( '#wp-statuses-dropdown :selected' ).prop( 'value', 'future' ); 149 | } 150 | 151 | // Publish action 152 | } else if ( dateDiff <= 0 && -1 !== $.inArray( status, ['draft', 'pending', 'publish', 'future'] ) && ( 'publish' !== originalStatus || ( 'publish' === originalStatus && -1 !== $.inArray( status, ['draft', 'pending'] ) ) ) ) { 153 | publishOn = wpStatuses.L10n.publishOn; 154 | $( '#publish' ).val( wpStatuses.L10n.publish ); 155 | $( '#publish' ).prop( 'name', 'publish' ); 156 | 157 | if ( 'password' === rStatus ) { 158 | $( '#wp-statuses-dropdown :selected' ).prop( 'value', 'publish' ); 159 | } 160 | 161 | // Update action 162 | } else { 163 | publishOn = wpStatuses.L10n.publishOnPast; 164 | $( '#publish' ).val( wpStatuses.L10n.update ); 165 | 166 | // Make sure the name property is 167 | if ( -1 === $.inArray( status, ['draft', 'pending', 'publish', 'future'] ) ) { 168 | $('#publish').prop( 'name', 'save' ); 169 | 170 | // Use customized labels. 171 | publishOn = wpStatuses.strings.labels[ rStatus ].metabox_save_on; 172 | $( '#publish' ).val( wpStatuses.strings.labels[ rStatus ].metabox_submit ); 173 | } 174 | } 175 | 176 | // If the date is the same, set a different label. 177 | if ( originalDate.toUTCString() === formDate.toUTCString() ) { 178 | publishOn = wpStatuses.strings.labels[ rStatus ].metabox_save_on; 179 | 180 | if ( dateDiff <= 0 || originalStatus === status ) { 181 | publishOn = wpStatuses.strings.labels[ rStatus ].metabox_saved_on; 182 | } 183 | 184 | if ( -1 !== $.inArray( originalStatus, ['draft', 'auto-draft'] ) ) { 185 | $( '#timestamp' ).html( '\n' + wpStatuses.strings.labels[ rStatus ].metabox_save_now ); 186 | publishOn = false; 187 | } 188 | } 189 | 190 | // Update the timestamp 191 | if ( publishOn ) { 192 | month = dateObject.mm + 1; 193 | day = dateObject.jj; 194 | 195 | if ( 1 === month.toString().length ) { 196 | month = '0' + month; 197 | } 198 | 199 | if ( 1 === day.toString().length ) { 200 | day = '0' + day; 201 | } 202 | 203 | $( '#timestamp' ).html( 204 | '\n' + publishOn + ' ' + 205 | wpStatuses.L10n.dateFormat 206 | .replace( '%1$s', $( 'option[value="' + month + '"]', '#mm' ).data( 'text' ) ) 207 | .replace( '%2$s', day ) 208 | .replace( '%3$s', dateObject.aa ) 209 | .replace( '%4$s', ( '00' + dateObject.hh.toString() ).slice( -2 ) ) 210 | .replace( '%5$s', ( '00' + dateObject.mn.toString() ).slice( -2 ) ) + 211 | ' ' 212 | ); 213 | } 214 | 215 | // Handle The minor publishing action button 216 | if ( 'pending' === status || 'draft' === status ) { 217 | var text = 'pending' === status ? wpStatuses.L10n.savePending : wpStatuses.L10n.saveDraft; 218 | 219 | if ( $( '#save-post' ).length ) { 220 | $( '#save-post' ).show().val( text ); 221 | } else { 222 | $( '#save-action' ).prepend( 223 | $( '' ).val( text ).prop( { 224 | type : 'submit', 225 | name : 'save', 226 | id : 'save-post' 227 | } ).addClass( 'button' ) 228 | ); 229 | } 230 | 231 | $( '#post-preview' ).html( wpStatuses.strings.preview ); 232 | 233 | } else { 234 | $( '#save-post' ).hide(); 235 | 236 | if ( 'publish' === originalStatus ) { 237 | $( '#post-preview' ).html( wpStatuses.strings.previewChanges ); 238 | } 239 | } 240 | 241 | return true; 242 | }, 243 | 244 | editTimestamp: function( e ) { 245 | var link = $( e.currentTarget ), timeStampDiv = this.timeStampDiv; 246 | 247 | e.preventDefault(); 248 | 249 | if ( timeStampDiv.hasClass( 'hide-if-js' ) ) { 250 | timeStampDiv.slideDown( 'fast', function() { 251 | $( 'input, select', timeStampDiv.find( '.timestamp-wrap' ) ).first().focus(); 252 | } ).removeClass( 'hide-if-js' ); 253 | 254 | link.hide(); 255 | 256 | // Handle Time Stamp Div links. 257 | } else { 258 | // Cancelling the Time Stamp edit. 259 | if ( link.hasClass( 'cancel-timestamp' ) ) { 260 | $.each( timeStampDiv.find( '[type="hidden"]' ), function( i, element ) { 261 | var id = $( element ).prop( 'id' ).replace( 'hidden_', '#' ); 262 | 263 | if ( 0 === id.indexOf( '#' ) ) { 264 | $( id ).val( $( element ).val() ); 265 | } 266 | } ); 267 | } 268 | 269 | // Validate texts 270 | var textUpdated = this.updateText(); 271 | 272 | /** 273 | * Do not restore the display if Validating the Time stamp 274 | * failed and the Save action was clicked 275 | */ 276 | if ( true !== textUpdated && link.hasClass( 'save-timestamp' ) ) { 277 | return; 278 | } 279 | 280 | // Restore display. 281 | timeStampDiv.slideUp( 'fast' ).siblings( 'a.edit-timestamp' ).show().focus(); 282 | timeStampDiv.addClass( 'hide-if-js' ); 283 | } 284 | }, 285 | 286 | submitForm: function( e ) { 287 | if ( true === this.updateText() ) { 288 | return e; 289 | } 290 | 291 | e.preventDefault(); 292 | 293 | this.timeStampDiv.show(); 294 | 295 | if ( wp.autosave ) { 296 | wp.autosave.enableButtons(); 297 | } 298 | 299 | $( '#publishing-action .spinner' ).removeClass( 'is-active' ); 300 | } 301 | }; 302 | 303 | $( document ).ready( function() { 304 | wpStatusesBox.init(); 305 | } ); 306 | 307 | } )( jQuery ); 308 | -------------------------------------------------------------------------------- /js/script.min.js: -------------------------------------------------------------------------------- 1 | window.wp=window.wp||{},function(r){if("undefined"!=typeof wpStatuses){if("undefined"!=typeof postL10n&&void 0===wp.deprecateL10nObject)wpStatuses.L10n=postL10n;else{if(void 0===wp.i18n.__)return;wpStatuses.L10n={publishOnFuture:wp.i18n.__("Schedule for:"),schedule:wp.i18n._x("Schedule","post action/button label"),publishOn:wp.i18n.__("Publish on:"),publish:wp.i18n.__("Publish"),publishOnPast:wp.i18n.__("Published on:"),update:wp.i18n.__("Update"),dateFormat:wp.i18n.__("%1$s %2$s, %3$s at %4$s:%5$s"),savePending:wp.i18n.__("Save as Pending"),saveDraft:wp.i18n.__("Save Draft")}}var t={init:function(){this.publishingBox=r("#wp-statuses-publish-box"),this.timeStampDiv=r("#timestampdiv"),this.majorSubmitName=r("#publish").prop("name"),this.setListeners()},setListeners:function(){this.publishingBox.on("change","#wp-statuses-dropdown",this.updateStatus.bind(this)),this.publishingBox.on("click",".edit-timestamp, .cancel-timestamp, .save-timestamp",this.editTimestamp.bind(this)),r("#post").on("submit",this.submitForm.bind(this))},updateStatus:function(t){var s=r(t.currentTarget).find(":selected").data("dashicon"),e=r(t.currentTarget).parent().find(".dashicons"),t=r(t.currentTarget).find(":selected").data("status"),s=s||"dashicons-post-status";e.prop("class","").addClass("dashicons"),e.addClass(s),this.setStatusAttributes(t),"password"===t&&(t="publish",r("#wp-statuses-dropdown :selected").prop("value",t)),r("#wp-statuses-status").val(t),this.updateText()},setStatusAttributes:function(t){r.each(r("#wp-statuses-attributes input"),function(t,s){"checkbox"===s.type||"radio"===s.type?r(s).prop("checked",!1):"text"===s.type&&r(s).val(""),r(s).parent(".wp-statuses-attribute-container").addClass("hide-if-js")}),"password"===t||t===wpStatuses.status&&wpStatuses.attributes.password?(r("#password-span").removeClass("hide-if-js"),wpStatuses.attributes.password&&r("#post_password").val(wpStatuses.attributes.password)):-1!==r.inArray(t,wpStatuses.public_statuses)&&(r("#sticky-span").removeClass("hide-if-js"),wpStatuses.attributes.sticky&&r("#sticky").prop("checked",wpStatuses.attributes.sticky))},updateText:function(){var t,s,e,a,i={aa:parseInt(r("#aa").val(),10),mm:parseInt(r("#mm").val(),10)-1,jj:parseInt(r("#jj").val(),10),hh:parseInt(r("#hh").val(),10),mn:parseInt(r("#mn").val(),10)},p=r("#wp-statuses-dropdown").val(),n=r("#wp-statuses-dropdown :selected").data("status"),u=r("#original_post_status").val();return!this.timeStampDiv.length||(t=new Date(i.aa,i.mm,i.jj,i.hh,i.mn),a=new Date(r("#cur_aa").val(),r("#cur_mm").val()-1,r("#cur_jj").val(),r("#cur_hh").val(),r("#cur_mn").val()),s=new Date(r("#hidden_aa").val(),r("#hidden_mm").val()-1,r("#hidden_jj").val(),r("#hidden_hh").val(),r("#hidden_mn").val()),t.getFullYear()!==i.aa||t.getMonth()!==i.mm||t.getDate()!==i.jj||t.getMinutes()!==i.mn?(this.timeStampDiv.find(".timestamp-wrap").addClass("form-invalid"),!1):(this.timeStampDiv.find(".timestamp-wrap").removeClass("form-invalid"),r("#publish").prop("name",this.majorSubmitName),0<(a=t-a)&&-1!==r.inArray(p,["draft","pending","publish"])?(e=wpStatuses.L10n.publishOnFuture,r("#publish").val(wpStatuses.L10n.schedule),r("#publish").prop("name","publish"),"password"===n&&r("#wp-statuses-dropdown :selected").prop("value","future")):a<=0&&-1!==r.inArray(p,["draft","pending","publish","future"])&&("publish"!==u||"publish"===u&&-1!==r.inArray(p,["draft","pending"]))?(e=wpStatuses.L10n.publishOn,r("#publish").val(wpStatuses.L10n.publish),r("#publish").prop("name","publish"),"password"===n&&r("#wp-statuses-dropdown :selected").prop("value","publish")):(e=wpStatuses.L10n.publishOnPast,r("#publish").val(wpStatuses.L10n.update),-1===r.inArray(p,["draft","pending","publish","future"])&&(r("#publish").prop("name","save"),e=wpStatuses.strings.labels[n].metabox_save_on,r("#publish").val(wpStatuses.strings.labels[n].metabox_submit))),s.toUTCString()===t.toUTCString()&&(e=wpStatuses.strings.labels[n].metabox_save_on,(a<=0||u===p)&&(e=wpStatuses.strings.labels[n].metabox_saved_on),-1!==r.inArray(u,["draft","auto-draft"])&&(r("#timestamp").html("\n"+wpStatuses.strings.labels[n].metabox_save_now),e=!1)),e&&(a=i.mm+1,n=i.jj,1===a.toString().length&&(a="0"+a),1===n.toString().length&&(n="0"+n),r("#timestamp").html("\n"+e+" "+wpStatuses.L10n.dateFormat.replace("%1$s",r('option[value="'+a+'"]',"#mm").data("text")).replace("%2$s",n).replace("%3$s",i.aa).replace("%4$s",("00"+i.hh.toString()).slice(-2)).replace("%5$s",("00"+i.mn.toString()).slice(-2))+" ")),"pending"===p||"draft"===p?(p="pending"===p?wpStatuses.L10n.savePending:wpStatuses.L10n.saveDraft,r("#save-post").length?r("#save-post").show().val(p):r("#save-action").prepend(r("").val(p).prop({type:"submit",name:"save",id:"save-post"}).addClass("button")),r("#post-preview").html(wpStatuses.strings.preview)):(r("#save-post").hide(),"publish"===u&&r("#post-preview").html(wpStatuses.strings.previewChanges)),!0))},editTimestamp:function(t){var s=r(t.currentTarget),e=this.timeStampDiv;t.preventDefault(),e.hasClass("hide-if-js")?(e.slideDown("fast",function(){r("input, select",e.find(".timestamp-wrap")).first().focus()}).removeClass("hide-if-js"),s.hide()):(s.hasClass("cancel-timestamp")&&r.each(e.find('[type="hidden"]'),function(t,s){var e=r(s).prop("id").replace("hidden_","#");0===e.indexOf("#")&&r(e).val(r(s).val())}),!0!==this.updateText()&&s.hasClass("save-timestamp")||(e.slideUp("fast").siblings("a.edit-timestamp").show().focus(),e.addClass("hide-if-js")))},submitForm:function(t){if(!0===this.updateText())return t;t.preventDefault(),this.timeStampDiv.show(),wp.autosave&&wp.autosave.enableButtons(),r("#publishing-action .spinner").removeClass("is-active")}};r(document).ready(function(){t.init()})}}(jQuery); -------------------------------------------------------------------------------- /js/sidebar.js: -------------------------------------------------------------------------------- 1 | !function(){const{apiFetch:t,blocks:{synchronizeBlocksWithTemplate:s},components:{SelectControl:e,TextControl:o},compose:{compose:a},data:{withSelect:r,withDispatch:i,registerStore:n},date:{isInTheFuture:u},editPost:{PluginPostStatusInfo:p},element:{createElement:c,Component:l},i18n:{__:d,sprintf:h},plugins:{registerPlugin:g}}=wp,{get:w,indexOf:S,forEach:f,map:m}=lodash,P={stati:{}},T={getStati:t=>({type:"GET_STATI",stati:t}),fetchFromAPI:t=>({type:"FETCH_FROM_API",path:t})};n("wp-statuses",{reducer:(t=P,s)=>"GET_STATI"===s.type?{...t,stati:s.stati}:t,actions:T,selectors:{getStati:t=>t.stati},controls:{FETCH_FROM_API:s=>t({path:s.path})},resolvers:{*getStati(){const t=yield T.fetchFromAPI("/wp/v2/statuses?context=edit");return T.getStati(t)}}});const b=a([r((t=>{const{getEditedPostAttribute:s,getCurrentPost:e}=t("core/editor"),{getPostType:o}=t("core"),a=s("type"),r=t("wp-statuses").getStati(),i=s("custom_status");return{postType:o(a),customStatus:i,currentStatus:i&&"auto-draft"!==i?i:"draft",currentPost:e(),stati:r,password:s("password"),settings:t("core/editor").getEditorSettings()}})),i((t=>{const{editPost:s,resetEditorBlocks:e}=t("core/editor");return{onUpdateStatus:(t,e="")=>{s({custom_status:t,password:e})},insertBlocks:t=>{e(t)}}}))])(class extends l{componentDidMount(){const{settings:t,currentPost:e,customStatus:o,insertBlocks:a,onUpdateStatus:r}=this.props,{isValid:i}=this.state;if(!i&&"auto-draft"===o&&!e.content){const e=s([],t.template);e&&e.length>=1&&a(e),this.setState({isValid:!0})}}render(){const{onUpdateStatus:t,postType:s,currentPost:a,stati:r,password:i,postTitle:n,customStatus:l}=this.props;let{currentStatus:g}=this.props;const m="password"===g,P=w(a,["_links","wp:action-publish"],!1);if(u(a.date)&&"future"!==g&&(g="future",t(g)),"future"===g&&r.publish)return c(p,{className:"wp-statuses-info"},h(d('Next status will be "%s" once the scheduled date will be reached.',"wp-statuses"),r.publish.label));n!==a.title&&"auto-draft"===l&&t(g);let T=[];return s&&s.slug&&f(r,(function(t){-1===S(t.post_type,s.slug)||!P&&-1===S(["draft","pending"],t.slug)||T.push({label:t.label,value:t.slug})})),c(p,{className:"wp-statuses-info"},c(e,{label:d("Status","wp-statuses"),value:g,onChange:s=>t(s),options:T}),m&&c(o,{label:d("Password","wp-statuses"),value:i,className:"wp-statuses-password",onChange:s=>t(g,s)}))}constructor(){super(...arguments),this.state={isValid:!1}}});g("wp-statuses-sidebar",{render:b})}(); 2 | //# sourceMappingURL=sidebar.js.map 3 | -------------------------------------------------------------------------------- /js/sidebar.js.map: -------------------------------------------------------------------------------- 1 | {"mappings":"YAGA,MAAMA,SACLA,EACAC,QAAQC,8BACPA,GAEDC,YAAYC,cACXA,EADWC,YAEXA,GAEDC,SAASA,QACRA,GAEDC,MAAMC,WACLA,EADKC,aAELA,EAFKC,cAGLA,GAEDC,MAAMC,cACLA,GAEDC,UAAUC,qBACTA,GAEDC,SAASC,cACRA,EADQC,UAERA,GAEDC,MAAMC,GACLA,EADKC,QAELA,GAEDC,SAASC,eACRA,IAEEC,IAKEC,IACLA,EADKC,QAELA,EAFKC,QAGLA,EAHKC,IAILA,GACGC,OAEEC,EAAgB,CAClBC,MAAO,IAGLC,EAAU,CACfC,SAAUF,IACF,CACNG,KAAM,Y,MACNH,IAIFI,aAAcC,IACN,CACNF,KAAM,iB,KACNE,KAKHzB,EAAe,cAAe,CAC7B0B,QAAO,CAAEC,EAAQR,EAAeS,IAC1B,cAAgBA,EAAOL,KACX,IACAI,EACHP,MAAOQ,EAAOR,OAIrBO,E,QAGRN,EAEAQ,UAAW,CACVP,SAAUK,GACFA,EAAMP,OAIfU,SAAU,CACTC,eAAgBH,GACRtC,EAAU,CAAEmC,KAAMG,EAAOH,QAIlCO,UAAW,CACVV,YACC,MACMF,QAAcC,EAAQG,aADf,gCAEb,OAAOH,EAAQC,SAAUF,E,KAmG5B,MAAMa,EAAiBrC,EAAS,CAC/BE,GAAcoC,IACb,MAAMC,uBAAEA,EAAFC,eAA0BA,GAAmBF,EAAQ,gBACrDG,YAAEA,GAAgBH,EAAQ,QAC1BI,EAAeH,EAAwB,QACvCf,EAAQc,EAAQ,eAAgBZ,WAChCiB,EAAeJ,EAAwB,iBAE7C,MAAO,CACNK,SAAUH,EAAaC,GACvBC,aAAcA,EACdE,cAAiBF,GAAgB,eAAiBA,EAAyBA,EAAV,QACjEG,YAAaN,IACbhB,MAAOA,EACPuB,SAAUR,EAAwB,YAClCS,SAAUV,EAAQ,eAAgBW,oBAPnC,IAUD9C,GAAgB+C,IACf,MAAM3C,SAAEA,EAAF4C,kBAAYA,GAAsBD,EAAU,eAElD,MAAO,CACNE,eAAgB,CAAEC,EAAkBN,EAAW,MAC9CxC,EAAU,CACT+C,cAAeD,EACfN,SAAUA,GAFX,EAKDQ,aAAgBC,IACfL,EAAmBK,EAAnB,EARF,KArBqBxD,CA9FvB,cAA8BW,EAS7B8C,oBACC,MAAMT,SAAEA,EAAFF,YAAYA,EAAZH,aAAyBA,EAAzBY,aAAuCA,EAAvCH,eAAqDA,GAAmBM,KAAKC,OAC7EC,QAAEA,GAAYF,KAAK3B,MAEzB,IAAO6B,GAAW,eAAiBjB,IAAkBG,EAAYe,QAAU,CAC1E,MAAML,EAAW5D,EAA+B,GAAIoD,EAASQ,UAExDA,GAAYA,EAASM,QAAU,GACnCP,EAAcC,GAGfE,KAAKK,SAAU,CAAEH,SAAS,G,EAI5BI,SACC,MAAMZ,eACLA,EADKR,SAELA,EAFKE,YAGLA,EAHKtB,MAILA,EACAuB,WALKkB,UAMLA,EANKtB,aAOLA,GACGe,KAAKC,MACT,IAAId,cAAEA,GAAkBa,KAAKC,MAE7B,MAAMO,EAAgB,aAAerB,EAC/BsB,EAAmBjD,EAAK4B,EAAa,CAAE,SAAU,sBAAuB,GAO9E,GALKxC,EAAewC,EAAYzC,OAAU,WAAawC,IACtDA,EAAgB,SAChBO,EAAgBP,IAGZ,WAAaA,GAAiBrB,EAAM4C,QACxC,OACCC,EAACC,EADF,CACuBC,UAAU,oBAE9BzD,EAECD,EAAI,oEAAqE,eACzEW,EAAM4C,QAAQI,QAQdP,IAAcnB,EAAY2B,OAAS,eAAiB9B,GACxDS,EAAgBP,GAGjB,IAAI6B,EAAU,GASd,OARK9B,GAAYA,EAAS+B,MACzBvD,EAASI,GAAO,SAAUvB,IACpB,IAAOkB,EAASlB,EAAK2E,UAAWhC,EAAS+B,QAAYR,IAAoB,IAAOhD,EAAS,CAAC,QAAS,WAAYlB,EAAK0E,OACxHD,EAAQG,KAAM,CAAEL,MAAOvE,EAAKuE,MAAOM,MAAO7E,EAAK0E,M,IAMjDN,EAACC,EADF,CACuBC,UAAU,oBAC/BF,EAACU,EADF,CAEEP,MAAQ3D,EAAI,SAAU,eACtBiE,MAAQjC,EACRmC,SAAaC,GAAY7B,EAAgB6B,GACzCP,QAAUA,IAGTR,GACDG,EAACa,EARF,CASEV,MAAQ3D,EAAI,WAAY,eACxBiE,MAAQ/B,EACRwB,UAAU,uBACVS,SAAajC,GAAcK,EAAgBP,EAAeE,K,CArF/DoC,cACCC,SAAUC,WAEV3B,KAAK3B,MAAQ,CACZ6B,SAAS,E,IA4HZ5C,EAAgB,sBAAuB,CACtCgD,OAAQ3B,G","sources":["src/sidebar/sidebar.js"],"sourcesContent":["/**\n * WordPress dependencies.\n */\nconst {\n\tapiFetch,\n\tblocks: {\n\t\tsynchronizeBlocksWithTemplate,\n\t},\n\tcomponents: {\n\t\tSelectControl,\n\t\tTextControl,\n\t},\n\tcompose: {\n\t\tcompose,\n\t},\n\tdata: {\n\t\twithSelect,\n\t\twithDispatch,\n\t\tregisterStore,\n\t},\n\tdate: {\n\t\tisInTheFuture,\n\t},\n\teditPost: {\n\t\tPluginPostStatusInfo,\n\t},\n\telement: {\n\t\tcreateElement,\n\t\tComponent,\n\t},\n\ti18n: {\n\t\t__,\n\t\tsprintf,\n\t},\n\tplugins: {\n\t\tregisterPlugin,\n\t},\n} = wp;\n\n/**\n * External dependencies.\n */\nconst {\n\tget,\n\tindexOf,\n\tforEach,\n\tmap,\n} = lodash;\n\nconst DEFAULT_STATE = {\n stati: {},\n}\n\nconst actions = {\n\tgetStati( stati ) {\n\t\treturn {\n\t\t\ttype: 'GET_STATI',\n\t\t\tstati,\n\t\t};\n\t},\n\n\tfetchFromAPI( path ) {\n\t\treturn {\n\t\t\ttype: 'FETCH_FROM_API',\n\t\t\tpath,\n\t\t};\n\t},\n};\n\nregisterStore( 'wp-statuses', {\n\treducer( state = DEFAULT_STATE, action ) {\n\t\tif ( 'GET_STATI' === action.type ) {\n return {\n ...state,\n stati: action.stati,\n };\n\t\t}\n\n\t\treturn state;\n\t},\n\n\tactions,\n\n\tselectors: {\n\t\tgetStati( state ) {\n\t\t\treturn state.stati;\n\t\t},\n\t},\n\n\tcontrols: {\n\t\tFETCH_FROM_API( action ) {\n\t\t\treturn apiFetch( { path: action.path } );\n\t\t},\n\t},\n\n\tresolvers: {\n\t\t* getStati() {\n\t\t\tconst path = '/wp/v2/statuses?context=edit';\n\t\t\tconst stati = yield actions.fetchFromAPI( path );\n\t\t\treturn actions.getStati( stati );\n\t\t},\n\t},\n} );\n\nclass WPStatusesPanel extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\tisValid: false,\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { settings, currentPost, customStatus, insertBlocks, onUpdateStatus } = this.props;\n\t\tconst { isValid } = this.state;\n\n\t\tif ( ! isValid && 'auto-draft' === customStatus && ! currentPost.content ) {\n\t\t\tconst template = synchronizeBlocksWithTemplate( [], settings.template );\n\n\t\t\tif ( template && template.length >= 1 ) {\n\t\t\t\tinsertBlocks( template );\n\t\t\t}\n\n\t\t\tthis.setState( { isValid: true } );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tonUpdateStatus,\n\t\t\tpostType,\n\t\t\tcurrentPost,\n\t\t\tstati,\n\t\t\tpassword,\n\t\t\tpostTitle,\n\t\t\tcustomStatus\n\t\t} = this.props;\n\t\tlet { currentStatus } = this.props;\n\n\t\tconst needsPassword = 'password' === currentStatus;\n\t\tconst hasPublishAction = get( currentPost, [ '_links', 'wp:action-publish' ], false );\n\n\t\tif ( isInTheFuture( currentPost.date ) && 'future' !== currentStatus ) {\n\t\t\tcurrentStatus = 'future';\n\t\t\tonUpdateStatus( currentStatus );\n\t\t}\n\n\t\tif ( 'future' === currentStatus && stati.publish ) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s is the label of the publish status. */\n\t\t\t\t\t\t\t__( 'Next status will be \"%s\" once the scheduled date will be reached.', 'wp-statuses' ),\n\t\t\t\t\t\t\tstati.publish.label\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\t// As the draft status is selected by default, let's avoid saving auto-drafts.\n\t\tif ( postTitle !== currentPost.title && 'auto-draft' === customStatus ) {\n\t\t\tonUpdateStatus( currentStatus );\n\t\t}\n\n\t\tlet options = [];\n\t\tif ( postType && postType.slug ) {\n\t\t\tforEach( stati, function( data ) {\n\t\t\t\tif ( -1 !== indexOf( data.post_type, postType.slug ) && ( hasPublishAction || -1 !== indexOf( ['draft', 'pending'], data.slug ) ) ) {\n\t\t\t\t\toptions.push( { label: data.label, value: data.slug } );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t onUpdateStatus( status ) }\n\t\t\t\t\toptions={ options }\n\t\t\t\t/>\n\n\t\t\t\t{ needsPassword &&\n\t\t\t\t\t onUpdateStatus( currentStatus, password ) }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\n\t\t);\n\t}\n}\n\nconst WPStatusesInfo = compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPost } = select( 'core/editor' );\n\t\tconst { getPostType } = select( 'core' );\n\t\tconst postTypeName = getEditedPostAttribute( 'type' );\n\t\tconst stati = select( 'wp-statuses' ).getStati();\n\t\tconst customStatus = getEditedPostAttribute( 'custom_status' );\n\n\t\treturn {\n\t\t\tpostType: getPostType( postTypeName ),\n\t\t\tcustomStatus: customStatus,\n\t\t\tcurrentStatus: ! customStatus || 'auto-draft' === customStatus ? 'draft' : customStatus,\n\t\t\tcurrentPost: getCurrentPost(),\n\t\t\tstati: stati,\n\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t\tsettings: select( 'core/editor' ).getEditorSettings(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, resetEditorBlocks } = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonUpdateStatus: ( WPStatusesStatus, password = '' ) => {\n\t\t\t\teditPost( {\n\t\t\t\t\tcustom_status: WPStatusesStatus,\n\t\t\t\t\tpassword: password,\n\t\t\t\t} );\n\t\t\t},\n\t\t\tinsertBlocks: ( template ) => {\n\t\t\t\tresetEditorBlocks( template );\n\t\t\t}\n\t\t};\n\t} ),\n] )( WPStatusesPanel );\n\nregisterPlugin( 'wp-statuses-sidebar', {\n\trender: WPStatusesInfo,\n} );\n"],"names":["apiFetch","blocks","synchronizeBlocksWithTemplate","components","SelectControl","TextControl","compose","data","withSelect","withDispatch","registerStore","date","isInTheFuture","editPost","PluginPostStatusInfo","element","createElement","Component","i18n","__","sprintf","plugins","registerPlugin","wp","get","indexOf","forEach","map","lodash","DEFAULT_STATE","stati","actions","getStati","type","fetchFromAPI","path","reducer","state","action","selectors","controls","FETCH_FROM_API","resolvers","WPStatusesInfo","select","getEditedPostAttribute","getCurrentPost","getPostType","postTypeName","customStatus","postType","currentStatus","currentPost","password","settings","getEditorSettings","dispatch","resetEditorBlocks","onUpdateStatus","WPStatusesStatus","custom_status","insertBlocks","template","componentDidMount","this","props","isValid","content","length","setState","render","postTitle","needsPassword","hasPublishAction","publish","$7ca38c7aab47a8d6$var$createElement","$7ca38c7aab47a8d6$var$PluginPostStatusInfo","className","label","title","options","slug","post_type","push","value","$7ca38c7aab47a8d6$var$SelectControl","onChange","status","$7ca38c7aab47a8d6$var$TextControl","constructor","super","arguments"],"version":3,"file":"sidebar.js.map"} -------------------------------------------------------------------------------- /languages/wp-statuses-de_DE.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imath/wp-statuses/891f1320b32642f85888fcf5ec7ee39bb8011bdc/languages/wp-statuses-de_DE.mo -------------------------------------------------------------------------------- /languages/wp-statuses-de_DE.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: WP Statuses 1.0.0\n" 4 | "Report-Msgid-Bugs-To: https://github.com/imath/wp-statuses/issues\n" 5 | "POT-Creation-Date: 2017-03-04 13:35:15+00:00\n" 6 | "PO-Revision-Date: 2017-05-05 10:21+0200\n" 7 | "Last-Translator: Michael Freund \n" 8 | "Language-Team: German\n" 9 | "Language: de_DE\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Generator: Poedit 2.0.1\n" 14 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 15 | 16 | #: inc/admin/classes/class-wp-statuses-admin.php:154 17 | msgid "— No Change —" 18 | msgstr "— Keine Änderugnen —" 19 | 20 | #: inc/admin/classes/class-wp-statuses-admin.php:205 21 | msgid "Publishing" 22 | msgstr "Veröffentlichung" 23 | 24 | #: inc/admin/classes/class-wp-statuses-admin.php:266 25 | #: inc/admin/classes/class-wp-statuses-admin.php:349 26 | msgid "Preview Changes" 27 | msgstr "Vorschau Änderungen" 28 | 29 | #: inc/admin/classes/class-wp-statuses-admin.php:267 30 | #: inc/admin/classes/class-wp-statuses-admin.php:349 31 | msgid "Preview" 32 | msgstr "Vorschau" 33 | 34 | #: inc/admin/classes/class-wp-statuses-admin.php:323 inc/core/custom.php:31 35 | msgid "Save" 36 | msgstr "Speichern" 37 | 38 | #: inc/admin/classes/class-wp-statuses-admin.php:331 39 | msgid "Save Draft" 40 | msgstr "Entwurf speichern" 41 | 42 | #: inc/admin/classes/class-wp-statuses-admin.php:335 43 | msgid "Save as Pending" 44 | msgstr "Als ausstehend speichern" 45 | 46 | #: inc/admin/classes/class-wp-statuses-admin.php:435 47 | msgid "Set status" 48 | msgstr "Status setzen" 49 | 50 | #: inc/admin/classes/class-wp-statuses-admin.php:486 51 | msgid "Stick this post to the front page" 52 | msgstr "Diesen Eintrag auf der Startseite anstecken" 53 | 54 | #: inc/admin/classes/class-wp-statuses-admin.php:493 55 | msgid "Password:" 56 | msgstr "Passwort:" 57 | 58 | #. translators: Publish box date format, see https:secure.php.net/date 59 | #: inc/admin/classes/class-wp-statuses-admin.php:530 60 | msgid "M j, Y @ H:i" 61 | msgstr "j F Y \\u\\m G:i \\U\\h\\r" 62 | 63 | #. translators: Post revisions heading. 1: The number of available revisions 64 | #: inc/admin/classes/class-wp-statuses-admin.php:567 65 | msgid "Revisions: %s" 66 | msgstr "Revisionen: %s" 67 | 68 | #: inc/admin/classes/class-wp-statuses-admin.php:571 69 | msgid "Browse revisions" 70 | msgstr "Revisionen anzeigen" 71 | 72 | #: inc/admin/classes/class-wp-statuses-admin.php:582 73 | msgid "Edit" 74 | msgstr "Bearbeiten" 75 | 76 | #: inc/admin/classes/class-wp-statuses-admin.php:583 77 | msgid "Edit date and time" 78 | msgstr "Datum und Zeit bearbeiten" 79 | 80 | #: inc/admin/classes/class-wp-statuses-admin.php:587 81 | msgid "Date and time" 82 | msgstr "Datum und Zeit" 83 | 84 | #: inc/admin/classes/class-wp-statuses-admin.php:629 85 | msgid "Submit for Review" 86 | msgstr "Zur Überprüfung einreichen" 87 | 88 | #: inc/admin/classes/class-wp-statuses-admin.php:634 89 | #: inc/core/classes/class-wp-statuses-core-status.php:179 90 | msgid "Publish" 91 | msgstr "Veröffentlichen" 92 | 93 | #: inc/admin/classes/class-wp-statuses-admin.php:637 94 | msgid "Schedule" 95 | msgstr "Planen" 96 | 97 | #: inc/admin/classes/class-wp-statuses-admin.php:652 98 | msgid "Delete Permanently" 99 | msgstr "Permanent löschen" 100 | 101 | #: inc/admin/classes/class-wp-statuses-admin.php:652 102 | msgid "Move to Trash" 103 | msgstr "In den Papierkorb legen" 104 | 105 | #: inc/core/classes/class-wp-statuses-core-status.php:180 106 | msgid "Update" 107 | msgstr "Aktualisieren" 108 | 109 | #: inc/core/classes/class-wp-statuses-core-status.php:181 110 | msgid "Publish on:" 111 | msgstr "Veröffentlichen am:" 112 | 113 | #. translators: Post date information. 1: Date on which the post is to be 114 | #. published 115 | #: inc/core/classes/class-wp-statuses-core-status.php:183 116 | msgid "Publish on: %1$s" 117 | msgstr "Veröffentlichen am: %1$s" 118 | 119 | #: inc/core/classes/class-wp-statuses-core-status.php:184 120 | msgid "Published on:" 121 | msgstr "Veröffentlicht am:" 122 | 123 | #. translators: Post date information. 1: Date on which the post was published 124 | #: inc/core/classes/class-wp-statuses-core-status.php:186 125 | msgid "Published on: %1$s" 126 | msgstr "Veröffentlicht am: %1$s" 127 | 128 | #: inc/core/classes/class-wp-statuses-core-status.php:187 129 | msgid "Publish immediately" 130 | msgstr "Jetzt veröffentlichen" 131 | 132 | #. translators: Post date information. 1: Date on which the post is to be 133 | #. published 134 | #: inc/core/classes/class-wp-statuses-core-status.php:189 135 | msgid "Schedule for: %1$s" 136 | msgstr "Geplant für: %1$s" 137 | 138 | #: inc/core/classes/class-wp-statuses-core-status.php:206 139 | msgid "Publicly published" 140 | msgstr "Öffentlich veröffentlicht" 141 | 142 | #: inc/core/classes/class-wp-statuses-core-status.php:207 143 | msgid "Published" 144 | msgstr "Veröffentlicht" 145 | 146 | #: inc/core/classes/class-wp-statuses-core-status.php:213 147 | msgid "Privately Published" 148 | msgstr "Privat veröffentlicht" 149 | 150 | #: inc/core/classes/class-wp-statuses-core-status.php:214 151 | msgid "Save as Private" 152 | msgstr "Als privat speichern" 153 | 154 | #: inc/core/classes/class-wp-statuses-core-status.php:215 155 | msgid "Save as Private on:" 156 | msgstr "Als private speichern am:" 157 | 158 | #. translators: Post date information. 1: Date on which the post is to be saved 159 | #. privately 160 | #: inc/core/classes/class-wp-statuses-core-status.php:217 161 | msgid "Save as Private on: %1$s" 162 | msgstr "Als private speichert am: %1$s" 163 | 164 | #: inc/core/classes/class-wp-statuses-core-status.php:218 165 | msgid "Saved as Private on:" 166 | msgstr "Als private gespeichert am:" 167 | 168 | #. translators: Post date information. 1: Date on which the post was saved 169 | #. privately 170 | #: inc/core/classes/class-wp-statuses-core-status.php:220 171 | msgid "Saved as Private on: %1$s" 172 | msgstr "Als private gespeichert am: %1$s" 173 | 174 | #: inc/core/classes/class-wp-statuses-core-status.php:221 175 | msgid "Save as private now" 176 | msgstr "Jetzt als privat speichern" 177 | 178 | #: inc/core/classes/class-wp-statuses-core-status.php:222 179 | msgid "Private" 180 | msgstr "Privat" 181 | 182 | #: inc/core/classes/class-wp-statuses-core-status.php:228 183 | msgid "Pending Review" 184 | msgstr "Ausstehende Prüfung" 185 | 186 | #: inc/core/classes/class-wp-statuses-core-status.php:234 187 | msgid "Draft" 188 | msgstr "Entwurf" 189 | 190 | #: inc/core/custom.php:24 191 | msgid "Restricted to members (%s)" 192 | msgid_plural "Restricted to members (%s)" 193 | msgstr[0] "Für Mitglieder eingeschränkt (%s)" 194 | msgstr[1] "Für Mitglieder eingeschränkt (%s)" 195 | 196 | #: inc/core/custom.php:32 197 | msgid "Restricted" 198 | msgstr "Eingeschränkt" 199 | 200 | #: inc/core/custom.php:57 201 | msgid "Please %s to view this content." 202 | msgstr "Bitte %s um diesen Inhalt anzuzeigen." 203 | 204 | #: inc/core/custom.php:60 205 | msgid "log in" 206 | msgstr "anmelden" 207 | 208 | #: inc/core/custom.php:72 inc/core/custom.php:83 209 | msgid "Archive" 210 | msgstr "Archivieren" 211 | 212 | #: inc/core/custom.php:73 213 | msgid "Archived (%s)" 214 | msgid_plural "Archived (%s)" 215 | msgstr[0] "Archiviert (%s)" 216 | msgstr[1] "Archiviert (%s)" 217 | 218 | #: inc/core/custom.php:82 inc/core/custom.php:91 219 | msgid "Archived" 220 | msgstr "Archiviert" 221 | 222 | #: inc/core/custom.php:84 223 | msgid "Archive on:" 224 | msgstr "Archivieren am:" 225 | 226 | #. translators: Post date information. 1: Date on which the post is to be 227 | #. archived 228 | #: inc/core/custom.php:86 229 | msgid "Archive on: %1$s" 230 | msgstr "Archivieren am: %1$s" 231 | 232 | #: inc/core/custom.php:87 233 | msgid "Archived on:" 234 | msgstr "Archiviert am:" 235 | 236 | #. translators: Post date information. 1: Date on which the post was archived 237 | #: inc/core/custom.php:89 238 | msgid "Archived on: %1$s" 239 | msgstr "Archiviert am: %1$s" 240 | 241 | #: inc/core/custom.php:90 242 | msgid "Archive now" 243 | msgstr "Jetzt archivieren" 244 | 245 | #: inc/core/custom.php:92 246 | msgid "Add to archives" 247 | msgstr "Dem Archiv hinzufügen" 248 | 249 | #: inc/core/functions.php:128 250 | msgid "Password Protected (%s)" 251 | msgid_plural "Password Protected (%s)" 252 | msgstr[0] "Passwortgeschützt (%s)" 253 | msgstr[1] "Passwortgeschützt (%s)" 254 | 255 | #: inc/core/functions.php:135 256 | msgid "Password Protected" 257 | msgstr "Passwortgeschützt" 258 | 259 | #: inc/core/functions.php:136 260 | msgid "Password" 261 | msgstr "Password" 262 | 263 | #. Plugin Name of the plugin/theme 264 | msgid "WP Statuses" 265 | msgstr "WP Statuses" 266 | 267 | #. Plugin URI of the plugin/theme 268 | msgid "https://imathi.eu/tag/wp-statuses/" 269 | msgstr "https://imathi.eu/tag/wp-statuses/" 270 | 271 | #. Description of the plugin/theme 272 | msgid "Suggestions to improve the WordPress Post statuses API." 273 | msgstr "Vorschläge um die WordPress API für den Status von Einträgen zu verbessern." 274 | 275 | #. Author of the plugin/theme 276 | msgid "imath" 277 | msgstr "imath" 278 | 279 | #. Author URI of the plugin/theme 280 | msgid "https://imathi.eu/" 281 | msgstr "https://imathi.eu/" 282 | 283 | #: inc/admin/classes/class-wp-statuses-admin.php:570 284 | msgctxt "revisions" 285 | msgid "Browse" 286 | msgstr "Durchsuchen" 287 | 288 | #: inc/core/custom.php:22 289 | msgctxt "post status" 290 | msgid "Restricted to members" 291 | msgstr "Eingeschränkt für Mitglieder" 292 | 293 | #: inc/core/functions.php:126 294 | msgctxt "post status" 295 | msgid "Password Protected" 296 | msgstr "Passwortgeschützt" 297 | -------------------------------------------------------------------------------- /languages/wp-statuses-de_DE_formal.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imath/wp-statuses/891f1320b32642f85888fcf5ec7ee39bb8011bdc/languages/wp-statuses-de_DE_formal.mo -------------------------------------------------------------------------------- /languages/wp-statuses-de_DE_formal.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: WP Statuses 1.0.0\n" 4 | "Report-Msgid-Bugs-To: https://github.com/imath/wp-statuses/issues\n" 5 | "POT-Creation-Date: 2017-03-04 13:35:15+00:00\n" 6 | "PO-Revision-Date: 2017-05-05 10:20+0200\n" 7 | "Last-Translator: Michael Freund \n" 8 | "Language-Team: German (Formal)\n" 9 | "Language: de_DE@formal\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Generator: Poedit 2.0.1\n" 14 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 15 | 16 | #: inc/admin/classes/class-wp-statuses-admin.php:154 17 | msgid "— No Change —" 18 | msgstr "— Keine Änderugnen —" 19 | 20 | #: inc/admin/classes/class-wp-statuses-admin.php:205 21 | msgid "Publishing" 22 | msgstr "Veröffentlichung" 23 | 24 | #: inc/admin/classes/class-wp-statuses-admin.php:266 25 | #: inc/admin/classes/class-wp-statuses-admin.php:349 26 | msgid "Preview Changes" 27 | msgstr "Vorschau Änderungen" 28 | 29 | #: inc/admin/classes/class-wp-statuses-admin.php:267 30 | #: inc/admin/classes/class-wp-statuses-admin.php:349 31 | msgid "Preview" 32 | msgstr "Vorschau" 33 | 34 | #: inc/admin/classes/class-wp-statuses-admin.php:323 inc/core/custom.php:31 35 | msgid "Save" 36 | msgstr "Speichern" 37 | 38 | #: inc/admin/classes/class-wp-statuses-admin.php:331 39 | msgid "Save Draft" 40 | msgstr "Entwurf speichern" 41 | 42 | #: inc/admin/classes/class-wp-statuses-admin.php:335 43 | msgid "Save as Pending" 44 | msgstr "Als ausstehend speichern" 45 | 46 | #: inc/admin/classes/class-wp-statuses-admin.php:435 47 | msgid "Set status" 48 | msgstr "Status setzen" 49 | 50 | #: inc/admin/classes/class-wp-statuses-admin.php:486 51 | msgid "Stick this post to the front page" 52 | msgstr "Diesen Eintrag auf der Startseite anstecken" 53 | 54 | #: inc/admin/classes/class-wp-statuses-admin.php:493 55 | msgid "Password:" 56 | msgstr "Passwort:" 57 | 58 | #. translators: Publish box date format, see https:secure.php.net/date 59 | #: inc/admin/classes/class-wp-statuses-admin.php:530 60 | msgid "M j, Y @ H:i" 61 | msgstr "j F Y \\u\\m G:i \\U\\h\\r" 62 | 63 | #. translators: Post revisions heading. 1: The number of available revisions 64 | #: inc/admin/classes/class-wp-statuses-admin.php:567 65 | msgid "Revisions: %s" 66 | msgstr "Revisionen: %s" 67 | 68 | #: inc/admin/classes/class-wp-statuses-admin.php:571 69 | msgid "Browse revisions" 70 | msgstr "Revisionen anzeigen" 71 | 72 | #: inc/admin/classes/class-wp-statuses-admin.php:582 73 | msgid "Edit" 74 | msgstr "Bearbeiten" 75 | 76 | #: inc/admin/classes/class-wp-statuses-admin.php:583 77 | msgid "Edit date and time" 78 | msgstr "Datum und Zeit bearbeiten" 79 | 80 | #: inc/admin/classes/class-wp-statuses-admin.php:587 81 | msgid "Date and time" 82 | msgstr "Datum und Zeit" 83 | 84 | #: inc/admin/classes/class-wp-statuses-admin.php:629 85 | msgid "Submit for Review" 86 | msgstr "Zur Überprüfung einreichen" 87 | 88 | #: inc/admin/classes/class-wp-statuses-admin.php:634 89 | #: inc/core/classes/class-wp-statuses-core-status.php:179 90 | msgid "Publish" 91 | msgstr "Veröffentlichen" 92 | 93 | #: inc/admin/classes/class-wp-statuses-admin.php:637 94 | msgid "Schedule" 95 | msgstr "Planen" 96 | 97 | #: inc/admin/classes/class-wp-statuses-admin.php:652 98 | msgid "Delete Permanently" 99 | msgstr "Permanent löschen" 100 | 101 | #: inc/admin/classes/class-wp-statuses-admin.php:652 102 | msgid "Move to Trash" 103 | msgstr "In den Papierkorb legen" 104 | 105 | #: inc/core/classes/class-wp-statuses-core-status.php:180 106 | msgid "Update" 107 | msgstr "Aktualisieren" 108 | 109 | #: inc/core/classes/class-wp-statuses-core-status.php:181 110 | msgid "Publish on:" 111 | msgstr "Veröffentlichen am:" 112 | 113 | #. translators: Post date information. 1: Date on which the post is to be 114 | #. published 115 | #: inc/core/classes/class-wp-statuses-core-status.php:183 116 | msgid "Publish on: %1$s" 117 | msgstr "Veröffentlichen am: %1$s" 118 | 119 | #: inc/core/classes/class-wp-statuses-core-status.php:184 120 | msgid "Published on:" 121 | msgstr "Veröffentlicht am:" 122 | 123 | #. translators: Post date information. 1: Date on which the post was published 124 | #: inc/core/classes/class-wp-statuses-core-status.php:186 125 | msgid "Published on: %1$s" 126 | msgstr "Veröffentlicht am: %1$s" 127 | 128 | #: inc/core/classes/class-wp-statuses-core-status.php:187 129 | msgid "Publish immediately" 130 | msgstr "Jetzt veröffentlichen" 131 | 132 | #. translators: Post date information. 1: Date on which the post is to be 133 | #. published 134 | #: inc/core/classes/class-wp-statuses-core-status.php:189 135 | msgid "Schedule for: %1$s" 136 | msgstr "Geplant für: %1$s" 137 | 138 | #: inc/core/classes/class-wp-statuses-core-status.php:206 139 | msgid "Publicly published" 140 | msgstr "Öffentlich veröffentlicht" 141 | 142 | #: inc/core/classes/class-wp-statuses-core-status.php:207 143 | msgid "Published" 144 | msgstr "Veröffentlicht" 145 | 146 | #: inc/core/classes/class-wp-statuses-core-status.php:213 147 | msgid "Privately Published" 148 | msgstr "Privat veröffentlicht" 149 | 150 | #: inc/core/classes/class-wp-statuses-core-status.php:214 151 | msgid "Save as Private" 152 | msgstr "Als privat speichern" 153 | 154 | #: inc/core/classes/class-wp-statuses-core-status.php:215 155 | msgid "Save as Private on:" 156 | msgstr "Als private speichern am:" 157 | 158 | #. translators: Post date information. 1: Date on which the post is to be saved 159 | #. privately 160 | #: inc/core/classes/class-wp-statuses-core-status.php:217 161 | msgid "Save as Private on: %1$s" 162 | msgstr "Als private speichert am: %1$s" 163 | 164 | #: inc/core/classes/class-wp-statuses-core-status.php:218 165 | msgid "Saved as Private on:" 166 | msgstr "Als private gespeichert am:" 167 | 168 | #. translators: Post date information. 1: Date on which the post was saved 169 | #. privately 170 | #: inc/core/classes/class-wp-statuses-core-status.php:220 171 | msgid "Saved as Private on: %1$s" 172 | msgstr "Als private gespeichert am: %1$s" 173 | 174 | #: inc/core/classes/class-wp-statuses-core-status.php:221 175 | msgid "Save as private now" 176 | msgstr "Jetzt als privat speichern" 177 | 178 | #: inc/core/classes/class-wp-statuses-core-status.php:222 179 | msgid "Private" 180 | msgstr "Privat" 181 | 182 | #: inc/core/classes/class-wp-statuses-core-status.php:228 183 | msgid "Pending Review" 184 | msgstr "Ausstehende Prüfung" 185 | 186 | #: inc/core/classes/class-wp-statuses-core-status.php:234 187 | msgid "Draft" 188 | msgstr "Entwurf" 189 | 190 | #: inc/core/custom.php:24 191 | msgid "Restricted to members (%s)" 192 | msgid_plural "Restricted to members (%s)" 193 | msgstr[0] "Für Mitglieder eingeschränkt (%s)" 194 | msgstr[1] "Für Mitglieder eingeschränkt (%s)" 195 | 196 | #: inc/core/custom.php:32 197 | msgid "Restricted" 198 | msgstr "Eingeschränkt" 199 | 200 | #: inc/core/custom.php:57 201 | msgid "Please %s to view this content." 202 | msgstr "Bitte %s um diesen Inhalt anzuzeigen." 203 | 204 | #: inc/core/custom.php:60 205 | msgid "log in" 206 | msgstr "anmelden" 207 | 208 | #: inc/core/custom.php:72 inc/core/custom.php:83 209 | msgid "Archive" 210 | msgstr "Archivieren" 211 | 212 | #: inc/core/custom.php:73 213 | msgid "Archived (%s)" 214 | msgid_plural "Archived (%s)" 215 | msgstr[0] "Archiviert (%s)" 216 | msgstr[1] "Archiviert (%s)" 217 | 218 | #: inc/core/custom.php:82 inc/core/custom.php:91 219 | msgid "Archived" 220 | msgstr "Archiviert" 221 | 222 | #: inc/core/custom.php:84 223 | msgid "Archive on:" 224 | msgstr "Archivieren am:" 225 | 226 | #. translators: Post date information. 1: Date on which the post is to be 227 | #. archived 228 | #: inc/core/custom.php:86 229 | msgid "Archive on: %1$s" 230 | msgstr "Archivieren am: %1$s" 231 | 232 | #: inc/core/custom.php:87 233 | msgid "Archived on:" 234 | msgstr "Archiviert am:" 235 | 236 | #. translators: Post date information. 1: Date on which the post was archived 237 | #: inc/core/custom.php:89 238 | msgid "Archived on: %1$s" 239 | msgstr "Archiviert am: %1$s" 240 | 241 | #: inc/core/custom.php:90 242 | msgid "Archive now" 243 | msgstr "Jetzt archivieren" 244 | 245 | #: inc/core/custom.php:92 246 | msgid "Add to archives" 247 | msgstr "Dem Archiv hinzufügen" 248 | 249 | #: inc/core/functions.php:128 250 | msgid "Password Protected (%s)" 251 | msgid_plural "Password Protected (%s)" 252 | msgstr[0] "Passwortgeschützt (%s)" 253 | msgstr[1] "Passwortgeschützt (%s)" 254 | 255 | #: inc/core/functions.php:135 256 | msgid "Password Protected" 257 | msgstr "Passwortgeschützt" 258 | 259 | #: inc/core/functions.php:136 260 | msgid "Password" 261 | msgstr "Password" 262 | 263 | #. Plugin Name of the plugin/theme 264 | msgid "WP Statuses" 265 | msgstr "WP Statuses" 266 | 267 | #. Plugin URI of the plugin/theme 268 | msgid "https://imathi.eu/tag/wp-statuses/" 269 | msgstr "https://imathi.eu/tag/wp-statuses/" 270 | 271 | #. Description of the plugin/theme 272 | msgid "Suggestions to improve the WordPress Post statuses API." 273 | msgstr "Vorschläge um die WordPress API für den Status von Einträgen zu verbessern." 274 | 275 | #. Author of the plugin/theme 276 | msgid "imath" 277 | msgstr "imath" 278 | 279 | #. Author URI of the plugin/theme 280 | msgid "https://imathi.eu/" 281 | msgstr "https://imathi.eu/" 282 | 283 | #: inc/admin/classes/class-wp-statuses-admin.php:570 284 | msgctxt "revisions" 285 | msgid "Browse" 286 | msgstr "Durchsuchen" 287 | 288 | #: inc/core/custom.php:22 289 | msgctxt "post status" 290 | msgid "Restricted to members" 291 | msgstr "Eingeschränkt für Mitglieder" 292 | 293 | #: inc/core/functions.php:126 294 | msgctxt "post status" 295 | msgid "Password Protected" 296 | msgstr "Passwortgeschützt" 297 | -------------------------------------------------------------------------------- /languages/wp-statuses-es_ES.mo: -------------------------------------------------------------------------------- 1 | de12 0495 0000 0000 3c00 0000 1c00 0000 2 | fc01 0000 5300 0000 dc03 0000 0000 0000 3 | 2805 0000 1900 0000 2905 0000 0f00 0000 4 | 4305 0000 0700 0000 5305 0000 1200 0000 5 | 5b05 0000 0b00 0000 6e05 0000 1700 0000 6 | 7a05 0000 0800 0000 9205 0000 5100 0000 7 | 9b05 0000 0c00 0000 ed05 0000 1800 0000 8 | fa05 0000 1000 0000 1306 0000 0d00 0000 9 | 2406 0000 1200 0000 3206 0000 0500 0000 10 | 4506 0000 0400 0000 4b06 0000 1200 0000 11 | 5006 0000 0c00 0000 6306 0000 0d00 0000 12 | 7006 0000 0800 0000 7e06 0000 1200 0000 13 | 8706 0000 6500 0000 9a06 0000 0900 0000 14 | 0007 0000 0e00 0000 0a07 0000 1f00 0000 15 | 1907 0000 0700 0000 3907 0000 0f00 0000 16 | 4107 0000 0700 0000 5107 0000 1300 0000 17 | 5907 0000 1200 0000 6d07 0000 0700 0000 18 | 8007 0000 1a00 0000 8807 0000 0b00 0000 19 | a307 0000 1700 0000 af07 0000 0900 0000 20 | c707 0000 0d00 0000 d107 0000 1900 0000 21 | df07 0000 0a00 0000 f907 0000 0a00 0000 22 | 0408 0000 6b00 0000 0f08 0000 0d00 0000 23 | 7b08 0000 0400 0000 8908 0000 0a00 0000 24 | 8e08 0000 0f00 0000 9908 0000 0f00 0000 25 | a908 0000 1300 0000 b908 0000 1f00 0000 26 | cd08 0000 1a00 0000 ed08 0000 1400 0000 27 | 0809 0000 2000 0000 1d09 0000 0800 0000 28 | 3e09 0000 1900 0000 4709 0000 0a00 0000 29 | 6109 0000 2100 0000 6c09 0000 1100 0000 30 | 8e09 0000 3700 0000 a009 0000 0600 0000 31 | d809 0000 0600 0000 df09 0000 1e00 0000 32 | e609 0000 2100 0000 050a 0000 a301 0000 33 | 270a 0000 1b00 0000 cb0b 0000 1200 0000 34 | e70b 0000 0700 0000 fa0b 0000 1300 0000 35 | 020c 0000 0c00 0000 160c 0000 1800 0000 36 | 230c 0000 0900 0000 3c0c 0000 5300 0000 37 | 460c 0000 0d00 0000 9a0c 0000 1900 0000 38 | a80c 0000 1300 0000 c20c 0000 0c00 0000 39 | d60c 0000 1300 0000 e30c 0000 0800 0000 40 | f70c 0000 0600 0000 000d 0000 1300 0000 41 | 070d 0000 0c00 0000 1b0d 0000 1400 0000 42 | 280d 0000 0b00 0000 3d0d 0000 1900 0000 43 | 490d 0000 7300 0000 630d 0000 0c00 0000 44 | d70d 0000 1300 0000 e40d 0000 2500 0000 45 | f80d 0000 0d00 0000 1e0e 0000 1500 0000 46 | 2c0e 0000 0700 0000 420e 0000 1400 0000 47 | 4a0e 0000 1500 0000 5f0e 0000 0800 0000 48 | 750e 0000 1500 0000 7e0e 0000 0c00 0000 49 | 940e 0000 1800 0000 a10e 0000 0900 0000 50 | ba0e 0000 0d00 0000 c40e 0000 1900 0000 51 | d20e 0000 0a00 0000 ec0e 0000 0b00 0000 52 | f70e 0000 6d00 0000 030f 0000 0e00 0000 53 | 710f 0000 0700 0000 800f 0000 1000 0000 54 | 880f 0000 1400 0000 990f 0000 1400 0000 55 | ae0f 0000 1800 0000 c30f 0000 2400 0000 56 | dc0f 0000 2100 0000 0110 0000 1900 0000 57 | 2310 0000 2500 0000 3d10 0000 0900 0000 58 | 6310 0000 1c00 0000 6d10 0000 1100 0000 59 | 8a10 0000 2500 0000 9c10 0000 1500 0000 60 | c210 0000 4900 0000 d810 0000 0a00 0000 61 | 2211 0000 0700 0000 2d11 0000 1900 0000 62 | 3511 0000 1600 0000 4f11 0000 0100 0000 63 | 3100 0000 0000 0000 3c00 0000 2e00 0000 64 | 2f00 0000 0000 0000 0000 0000 1500 0000 65 | 3000 0000 0700 0000 0000 0000 2a00 0000 66 | 3300 0000 0000 0000 1000 0000 0000 0000 67 | 1300 0000 0300 0000 0800 0000 1100 0000 68 | 0000 0000 1600 0000 2400 0000 1700 0000 69 | 0000 0000 1400 0000 1d00 0000 0000 0000 70 | 2200 0000 0c00 0000 2700 0000 3400 0000 71 | 0000 0000 1e00 0000 0000 0000 3600 0000 72 | 0000 0000 0000 0000 3700 0000 0000 0000 73 | 0a00 0000 0000 0000 2100 0000 2300 0000 74 | 0000 0000 0000 0000 0d00 0000 0600 0000 75 | 0000 0000 1f00 0000 0000 0000 1200 0000 76 | 2600 0000 0000 0000 0000 0000 0900 0000 77 | 0b00 0000 1900 0000 1800 0000 0500 0000 78 | 0f00 0000 2000 0000 1c00 0000 0200 0000 79 | 0400 0000 0000 0000 2800 0000 0000 0000 80 | 2b00 0000 1b00 0000 1a00 0000 2900 0000 81 | 2d00 0000 3500 0000 2c00 0000 2500 0000 82 | 3a00 0000 3900 0000 3200 0000 3800 0000 83 | 0e00 0000 3b00 0000 0026 6d64 6173 683b 84 | 204e 6f20 4368 616e 6765 2026 6d64 6173 85 | 683b 0041 6464 2074 6f20 6172 6368 6976 86 | 6573 0041 7263 6869 7665 0041 7263 6869 87 | 7665 203c 623e 6e6f 773c 2f62 3e00 4172 88 | 6368 6976 6520 6f6e 3a00 4172 6368 6976 89 | 6520 6f6e 3a20 3c62 3e25 3124 733c 2f62 90 | 3e00 4172 6368 6976 6564 0041 7263 6869 91 | 7665 6420 3c73 7061 6e20 636c 6173 733d 92 | 2263 6f75 6e74 223e 2825 7329 3c2f 7370 93 | 616e 3e00 4172 6368 6976 6564 203c 7370 94 | 616e 2063 6c61 7373 3d22 636f 756e 7422 95 | 3e28 2573 293c 2f73 7061 6e3e 0041 7263 96 | 6869 7665 6420 6f6e 3a00 4172 6368 6976 97 | 6564 206f 6e3a 203c 623e 2531 2473 3c2f 98 | 623e 0042 726f 7773 6520 7265 7669 7369 99 | 6f6e 7300 4461 7465 2061 6e64 2074 696d 100 | 6500 4465 6c65 7465 2050 6572 6d61 6e65 101 | 6e74 6c79 0044 7261 6674 0045 6469 7400 102 | 4564 6974 2064 6174 6520 616e 6420 7469 103 | 6d65 004d 206a 2c20 5920 4020 483a 6900 104 | 4d6f 7665 2074 6f20 5472 6173 6800 5061 105 | 7373 776f 7264 0050 6173 7377 6f72 6420 106 | 5072 6f74 6563 7465 6400 5061 7373 776f 107 | 7264 2050 726f 7465 6374 6564 203c 7370 108 | 616e 2063 6c61 7373 3d22 636f 756e 7422 109 | 3e28 2573 293c 2f73 7061 6e3e 0050 6173 110 | 7377 6f72 6420 5072 6f74 6563 7465 6420 111 | 3c73 7061 6e20 636c 6173 733d 2263 6f75 112 | 6e74 223e 2825 7329 3c2f 7370 616e 3e00 113 | 5061 7373 776f 7264 3a00 5065 6e64 696e 114 | 6720 5265 7669 6577 0050 6c65 6173 6520 115 | 2573 2074 6f20 7669 6577 2074 6869 7320 116 | 636f 6e74 656e 742e 0050 7265 7669 6577 117 | 0050 7265 7669 6577 2043 6861 6e67 6573 118 | 0050 7269 7661 7465 0050 7269 7661 7465 119 | 6c79 2050 7562 6c69 7368 6564 0050 7562 120 | 6c69 636c 7920 7075 626c 6973 6865 6400 121 | 5075 626c 6973 6800 5075 626c 6973 6820 122 | 3c62 3e69 6d6d 6564 6961 7465 6c79 3c2f 123 | 623e 0050 7562 6c69 7368 206f 6e3a 0050 124 | 7562 6c69 7368 206f 6e3a 203c 623e 2531 125 | 2473 3c2f 623e 0050 7562 6c69 7368 6564 126 | 0050 7562 6c69 7368 6564 206f 6e3a 0050 127 | 7562 6c69 7368 6564 206f 6e3a 203c 623e 128 | 2531 2473 3c2f 623e 0050 7562 6c69 7368 129 | 696e 6700 5265 7374 7269 6374 6564 0052 130 | 6573 7472 6963 7465 6420 746f 206d 656d 131 | 6265 7273 203c 7370 616e 2063 6c61 7373 132 | 3d22 636f 756e 7422 3e28 2573 293c 2f73 133 | 7061 6e3e 0052 6573 7472 6963 7465 6420 134 | 746f 206d 656d 6265 7273 203c 7370 616e 135 | 2063 6c61 7373 3d22 636f 756e 7422 3e28 136 | 2573 293c 2f73 7061 6e3e 0052 6576 6973 137 | 696f 6e73 3a20 2573 0053 6176 6500 5361 138 | 7665 2044 7261 6674 0053 6176 6520 6173 139 | 2050 656e 6469 6e67 0053 6176 6520 6173 140 | 2050 7269 7661 7465 0053 6176 6520 6173 141 | 2050 7269 7661 7465 206f 6e3a 0053 6176 142 | 6520 6173 2050 7269 7661 7465 206f 6e3a 143 | 203c 623e 2531 2473 3c2f 623e 0053 6176 144 | 6520 6173 2070 7269 7661 7465 203c 623e 145 | 6e6f 773c 2f62 3e00 5361 7665 6420 6173 146 | 2050 7269 7661 7465 206f 6e3a 0053 6176 147 | 6564 2061 7320 5072 6976 6174 6520 6f6e 148 | 3a20 3c62 3e25 3124 733c 2f62 3e00 5363 149 | 6865 6475 6c65 0053 6368 6564 756c 6520 150 | 666f 723a 203c 623e 2531 2473 3c2f 623e 151 | 0053 6574 2073 7461 7475 7300 5374 6963 152 | 6b20 7468 6973 2070 6f73 7420 746f 2074 153 | 6865 2066 726f 6e74 2070 6167 6500 5375 154 | 626d 6974 2066 6f72 2052 6576 6965 7700 155 | 5375 6767 6573 7469 6f6e 7320 746f 2069 156 | 6d70 726f 7665 2074 6865 2057 6f72 6450 157 | 7265 7373 2050 6f73 7420 7374 6174 7573 158 | 6573 2041 5049 2e00 5570 6461 7465 006c 159 | 6f67 2069 6e00 706f 7374 2073 7461 7475 160 | 7304 5061 7373 776f 7264 2050 726f 7465 161 | 6374 6564 0070 6f73 7420 7374 6174 7573 162 | 0452 6573 7472 6963 7465 6420 746f 206d 163 | 656d 6265 7273 0050 726f 6a65 6374 2d49 164 | 642d 5665 7273 696f 6e3a 2057 5020 5374 165 | 6174 7573 6573 2031 2e32 2e32 0a52 6570 166 | 6f72 742d 4d73 6769 642d 4275 6773 2d54 167 | 6f3a 2068 7474 7073 3a2f 2f67 6974 6875 168 | 622e 636f 6d2f 696d 6174 682f 7770 2d73 169 | 7461 7475 7365 732f 6973 7375 6573 0a50 170 | 4f54 2d43 7265 6174 696f 6e2d 4461 7465 171 | 3a20 3230 3137 2d30 372d 3231 2032 323a 172 | 3431 2d30 3330 300a 4d49 4d45 2d56 6572 173 | 7369 6f6e 3a20 312e 300a 436f 6e74 656e 174 | 742d 5479 7065 3a20 7465 7874 2f70 6c61 175 | 696e 3b20 6368 6172 7365 743d 5554 462d 176 | 380a 436f 6e74 656e 742d 5472 616e 7366 177 | 6572 2d45 6e63 6f64 696e 673a 2038 6269 178 | 740a 504f 2d52 6576 6973 696f 6e2d 4461 179 | 7465 3a20 3230 3137 2d30 372d 3231 2032 180 | 333a 3531 2d30 3330 300a 4c61 6e67 7561 181 | 6765 2d54 6561 6d3a 2046 5245 4e43 4820 182 | 3c69 6d61 7468 4063 6c75 7374 6572 2e70 183 | 7265 7373 3e0a 582d 4765 6e65 7261 746f 184 | 723a 2050 6f65 6469 7420 322e 302e 320a 185 | 4c61 7374 2d54 7261 6e73 6c61 746f 723a 186 | 200a 506c 7572 616c 2d46 6f72 6d73 3a20 187 | 6e70 6c75 7261 6c73 3d32 3b20 706c 7572 188 | 616c 3d28 6e20 213d 2031 293b 0a4c 616e 189 | 6775 6167 653a 2065 730a 0026 6d64 6173 190 | 683b 2053 696e 2043 616d 6269 6f73 2026 191 | 6d64 6173 683b 0041 c3b1 6164 6972 2061 192 | 2061 7263 6869 766f 7300 4172 6368 6976 193 | 6f00 4172 6368 6976 6172 203c 623e 6e6f 194 | 773c 2f62 3e00 4172 6368 6976 6172 2065 195 | 6c3a 0041 7263 6869 7661 7220 656c 3a20 196 | 3c62 3e25 3124 733c 2f62 3e00 4172 6368 197 | 6976 6164 6f00 4172 6368 6976 6164 6f20 198 | 3c73 7061 6e20 636c 6173 733d 2263 6f75 199 | 6e74 223e 2825 7329 3c2f 7370 616e 3e00 200 | 4172 6368 6976 6164 6f20 3c73 7061 6e20 201 | 636c 6173 733d 2263 6f75 6e74 223e 2825 202 | 7329 3c2f 7370 616e 3e00 4172 6368 6976 203 | 6164 6f20 656c 3a00 4172 6368 6976 6164 204 | 6f20 656c 3a20 3c62 3e25 3124 733c 2f62 205 | 3e00 4578 616d 696e 6172 2072 6576 6973 206 | 696f 6e65 7300 4665 6368 6120 7920 686f 207 | 7261 0045 6c69 6d69 6e61 7220 7065 726d 208 | 616e 656e 7465 0042 6f72 7261 646f 7200 209 | 4564 6974 6172 0045 6469 7461 7220 6665 210 | 6368 6120 7920 686f 7261 006a 204d 2c20 211 | 5920 4020 483a 6900 456e 7669 6172 2061 212 | 206c 6120 7061 7065 6c65 7261 0043 6f6e 213 | 7472 6173 65c3 b161 0050 726f 7465 6769 214 | 646f 2063 6f6e 2063 6f6e 7472 6173 65c3 215 | b161 0050 726f 7465 6769 646f 2063 6f6e 216 | 2063 6f6e 7472 6173 65c3 b161 203c 7370 217 | 616e 2063 6c61 7373 3d22 636f 756e 7422 218 | 3e28 2573 293c 2f73 7061 6e3e 0050 726f 219 | 7465 6769 646f 2063 6f6e 2063 6f6e 7472 220 | 6173 65c3 b161 203c 7370 616e 2063 6c61 221 | 7373 3d22 636f 756e 7422 3e28 2573 293c 222 | 2f73 7061 6e3e 0043 6f6e 7472 6173 65c3 223 | b161 3a00 5265 7669 7369 c3b3 6e20 7065 224 | 6e64 6965 6e74 6500 506f 7220 6661 766f 225 | 7220 2573 2070 6172 6120 7665 7220 6573 226 | 7465 2063 6f6e 7465 6e69 646f 2e00 5072 227 | 6576 6973 7561 6c69 7a61 7200 5072 6576 228 | 6973 7561 6c69 7a61 7220 6361 6d62 696f 229 | 7300 5072 6976 6164 6f00 5075 626c 6963 230 | 6163 69c3 b36e 2070 7269 7661 6461 0050 231 | 7562 6c69 6361 6369 c3b3 6e20 70c3 ba62 232 | 6c69 6361 0050 7562 6c69 6361 7200 5075 233 | 626c 6963 6172 203c 623e 6168 6f72 613c 234 | 2f62 3e00 5075 626c 6963 6172 2065 6c3a 235 | 0050 7562 6c69 6361 7220 656c 3a20 3c62 236 | 3e25 3124 733c 2f62 3e00 5075 626c 6963 237 | 6164 6f00 5075 626c 6963 6164 6f20 656c 238 | 3a00 5075 626c 6963 6164 6f20 656c 3a20 239 | 3c62 3e25 3124 733c 2f62 3e00 5075 626c 240 | 6963 616e 646f 0052 6573 7472 696e 6769 241 | 646f 0052 6573 7472 696e 6769 646f 2061 242 | 206d 6965 6d62 726f 7320 3c73 7061 6e20 243 | 636c 6173 733d 2263 6f75 6e74 223e 2825 244 | 7329 3c2f 7370 616e 3e00 5265 7374 7269 245 | 6e67 6964 6f20 6120 6d69 656d 6272 6f73 246 | 203c 7370 616e 2063 6c61 7373 3d22 636f 247 | 756e 7422 3e28 2573 293c 2f73 7061 6e3e 248 | 0052 6576 6973 696f 6e65 733a 2025 7300 249 | 4775 6172 6461 7200 4775 6172 6461 7220 250 | 626f 7272 6164 6f72 0047 7561 7264 6172 251 | 2065 6e20 7065 6e64 6965 6e74 6500 4775 252 | 6172 6461 7220 636f 6d6f 2070 7269 7661 253 | 646f 0047 7561 7264 6172 2063 6f6d 6f20 254 | 7072 6976 6164 6f20 656c 3a00 4775 6172 255 | 6461 7220 636f 6d6f 2070 7269 7661 646f 256 | 2065 6c3a 203c 623e 2531 2473 3c2f 623e 257 | 0047 7561 7264 6172 2063 6f6d 6f20 7072 258 | 6976 6164 6f20 3c62 3e61 686f 7261 3c2f 259 | 623e 0047 7561 7264 6164 6f20 636f 6d6f 260 | 2070 7269 7661 646f 2065 6c3a 0047 7561 261 | 7264 6164 6f20 636f 6d6f 2070 7269 7661 262 | 646f 2065 6c3a 203c 623e 2531 2473 3c2f 263 | 623e 0050 726f 6772 616d 6172 0050 726f 264 | 6772 616d 6164 6f20 7061 7261 3a20 3c62 265 | 3e25 3124 733c 2f62 3e00 4573 7461 626c 266 | 6563 6572 2065 7374 6164 6f00 4669 6a61 267 | 7220 6573 7461 2070 7562 6c69 6361 6369 268 | c3b3 6e20 656e 206c 6120 706f 7274 6164 269 | 6100 456e 7669 6172 2070 6172 6120 7265 270 | 7669 7369 c3b3 6e00 5375 6765 7265 6e63 271 | 6961 7320 7061 7261 206d 656a 6f72 6172 272 | 206c 6120 4150 4920 6465 2065 7374 6164 273 | 6f73 2064 6520 7075 626c 6963 6163 696f 274 | 6e65 7320 656e 2057 6f72 6450 7265 7373 275 | 2e00 4163 7475 616c 697a 6172 0069 6e67 276 | 7265 7361 0050 726f 7465 6769 646f 2063 277 | 6f6e 2063 6f6e 7472 6173 65c3 b161 0052 278 | 6573 7472 696e 6769 646f 2061 206d 6965 279 | 6d62 726f 7300 280 | -------------------------------------------------------------------------------- /languages/wp-statuses-es_ES.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017 imath 2 | # This file is distributed under the GNU/GPL 2. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: WP Statuses 1.2.2\n" 6 | "Report-Msgid-Bugs-To: https://github.com/imath/wp-statuses/issues\n" 7 | "POT-Creation-Date: 2017-07-21 22:41-0300\n" 8 | "MIME-Version: 1.0\n" 9 | "Content-Type: text/plain; charset=UTF-8\n" 10 | "Content-Transfer-Encoding: 8bit\n" 11 | "PO-Revision-Date: 2017-07-21 23:51-0300\n" 12 | "Language-Team: FRENCH \n" 13 | "X-Generator: Poedit 2.0.2\n" 14 | "Last-Translator: \n" 15 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 16 | "Language: es\n" 17 | 18 | #: inc/admin/classes/class-wp-statuses-admin.php:159 19 | msgid "— No Change —" 20 | msgstr "— Sin Cambios —" 21 | 22 | #: inc/admin/classes/class-wp-statuses-admin.php:215 23 | msgid "Publishing" 24 | msgstr "Publicando" 25 | 26 | #: inc/admin/classes/class-wp-statuses-admin.php:276 27 | #: inc/admin/classes/class-wp-statuses-admin.php:359 28 | msgid "Preview Changes" 29 | msgstr "Previsualizar cambios" 30 | 31 | #: inc/admin/classes/class-wp-statuses-admin.php:277 32 | #: inc/admin/classes/class-wp-statuses-admin.php:359 33 | msgid "Preview" 34 | msgstr "Previsualizar" 35 | 36 | #: inc/admin/classes/class-wp-statuses-admin.php:333 inc/core/custom.php:31 37 | msgid "Save" 38 | msgstr "Guardar" 39 | 40 | #: inc/admin/classes/class-wp-statuses-admin.php:341 41 | msgid "Save Draft" 42 | msgstr "Guardar borrador" 43 | 44 | #: inc/admin/classes/class-wp-statuses-admin.php:345 45 | msgid "Save as Pending" 46 | msgstr "Guardar en pendiente" 47 | 48 | #: inc/admin/classes/class-wp-statuses-admin.php:445 49 | msgid "Set status" 50 | msgstr "Establecer estado" 51 | 52 | #: inc/admin/classes/class-wp-statuses-admin.php:496 53 | msgid "Stick this post to the front page" 54 | msgstr "Fijar esta publicación en la portada" 55 | 56 | #: inc/admin/classes/class-wp-statuses-admin.php:503 57 | msgid "Password:" 58 | msgstr "Contraseña:" 59 | 60 | #. translators: Publish box date format, see https:secure.php.net/date 61 | #: inc/admin/classes/class-wp-statuses-admin.php:540 62 | msgid "M j, Y @ H:i" 63 | msgstr "j M, Y @ H:i" 64 | 65 | #. translators: Post revisions heading. 1: The number of available revisions 66 | #: inc/admin/classes/class-wp-statuses-admin.php:577 67 | msgid "Revisions: %s" 68 | msgstr "Revisiones: %s" 69 | 70 | #: inc/admin/classes/class-wp-statuses-admin.php:581 71 | msgid "Browse revisions" 72 | msgstr "Examinar revisiones" 73 | 74 | #: inc/admin/classes/class-wp-statuses-admin.php:592 75 | msgid "Edit" 76 | msgstr "Editar" 77 | 78 | #: inc/admin/classes/class-wp-statuses-admin.php:593 79 | msgid "Edit date and time" 80 | msgstr "Editar fecha y hora" 81 | 82 | #: inc/admin/classes/class-wp-statuses-admin.php:597 83 | msgid "Date and time" 84 | msgstr "Fecha y hora" 85 | 86 | #: inc/admin/classes/class-wp-statuses-admin.php:639 87 | msgid "Submit for Review" 88 | msgstr "Enviar para revisión" 89 | 90 | #: inc/admin/classes/class-wp-statuses-admin.php:644 91 | #: inc/core/classes/class-wp-statuses-core-status.php:179 92 | msgid "Publish" 93 | msgstr "Publicar" 94 | 95 | #: inc/admin/classes/class-wp-statuses-admin.php:647 96 | msgid "Schedule" 97 | msgstr "Programar" 98 | 99 | #: inc/admin/classes/class-wp-statuses-admin.php:662 100 | msgid "Delete Permanently" 101 | msgstr "Eliminar permanente" 102 | 103 | #: inc/admin/classes/class-wp-statuses-admin.php:662 104 | msgid "Move to Trash" 105 | msgstr "Enviar a la papelera" 106 | 107 | #: inc/core/classes/class-wp-statuses-core-status.php:180 108 | msgid "Update" 109 | msgstr "Actualizar" 110 | 111 | #: inc/core/classes/class-wp-statuses-core-status.php:181 112 | msgid "Publish on:" 113 | msgstr "Publicar el:" 114 | 115 | #. translators: Post date information. 1: Date on which the post is to be 116 | #. published 117 | #: inc/core/classes/class-wp-statuses-core-status.php:183 118 | msgid "Publish on: %1$s" 119 | msgstr "Publicar el: %1$s" 120 | 121 | #: inc/core/classes/class-wp-statuses-core-status.php:184 122 | msgid "Published on:" 123 | msgstr "Publicado el:" 124 | 125 | #. translators: Post date information. 1: Date on which the post was published 126 | #: inc/core/classes/class-wp-statuses-core-status.php:186 127 | msgid "Published on: %1$s" 128 | msgstr "Publicado el: %1$s" 129 | 130 | #: inc/core/classes/class-wp-statuses-core-status.php:187 131 | msgid "Publish immediately" 132 | msgstr "Publicar ahora" 133 | 134 | #. translators: Post date information. 1: Date on which the post is to be 135 | #. published 136 | #: inc/core/classes/class-wp-statuses-core-status.php:189 137 | msgid "Schedule for: %1$s" 138 | msgstr "Programado para: %1$s" 139 | 140 | #: inc/core/classes/class-wp-statuses-core-status.php:206 141 | msgid "Publicly published" 142 | msgstr "Publicación pública" 143 | 144 | #: inc/core/classes/class-wp-statuses-core-status.php:207 145 | msgid "Published" 146 | msgstr "Publicado" 147 | 148 | #: inc/core/classes/class-wp-statuses-core-status.php:213 149 | msgid "Privately Published" 150 | msgstr "Publicación privada" 151 | 152 | #: inc/core/classes/class-wp-statuses-core-status.php:214 153 | msgid "Save as Private" 154 | msgstr "Guardar como privado" 155 | 156 | #: inc/core/classes/class-wp-statuses-core-status.php:215 157 | msgid "Save as Private on:" 158 | msgstr "Guardar como privado el:" 159 | 160 | #. translators: Post date information. 1: Date on which the post is to be saved 161 | #. privately 162 | #: inc/core/classes/class-wp-statuses-core-status.php:217 163 | msgid "Save as Private on: %1$s" 164 | msgstr "Guardar como privado el: %1$s" 165 | 166 | #: inc/core/classes/class-wp-statuses-core-status.php:218 167 | msgid "Saved as Private on:" 168 | msgstr "Guardado como privado el:" 169 | 170 | #. translators: Post date information. 1: Date on which the post was saved 171 | #. privately 172 | #: inc/core/classes/class-wp-statuses-core-status.php:220 173 | msgid "Saved as Private on: %1$s" 174 | msgstr "Guardado como privado el: %1$s" 175 | 176 | #: inc/core/classes/class-wp-statuses-core-status.php:221 177 | msgid "Save as private now" 178 | msgstr "Guardar como privado ahora" 179 | 180 | #: inc/core/classes/class-wp-statuses-core-status.php:222 181 | msgid "Private" 182 | msgstr "Privado" 183 | 184 | #: inc/core/classes/class-wp-statuses-core-status.php:228 185 | msgid "Pending Review" 186 | msgstr "Revisión pendiente" 187 | 188 | #: inc/core/classes/class-wp-statuses-core-status.php:234 189 | msgid "Draft" 190 | msgstr "Borrador" 191 | 192 | #: inc/core/custom.php:24 193 | msgid "Restricted to members (%s)" 194 | msgid_plural "Restricted to members (%s)" 195 | msgstr[0] "Restringido a miembros (%s)" 196 | msgstr[1] "Restringido a miembros (%s)" 197 | 198 | #: inc/core/custom.php:32 199 | msgid "Restricted" 200 | msgstr "Restringido" 201 | 202 | #: inc/core/custom.php:57 203 | msgid "Please %s to view this content." 204 | msgstr "Por favor %s para ver este contenido." 205 | 206 | #: inc/core/custom.php:60 207 | msgid "log in" 208 | msgstr "ingresa" 209 | 210 | #: inc/core/custom.php:72 inc/core/custom.php:83 211 | msgid "Archive" 212 | msgstr "Archivo" 213 | 214 | #: inc/core/custom.php:73 215 | msgid "Archived (%s)" 216 | msgid_plural "Archived (%s)" 217 | msgstr[0] "Archivado (%s)" 218 | msgstr[1] "Archivado (%s)" 219 | 220 | #: inc/core/custom.php:82 inc/core/custom.php:91 221 | msgid "Archived" 222 | msgstr "Archivado" 223 | 224 | #: inc/core/custom.php:84 225 | msgid "Archive on:" 226 | msgstr "Archivar el:" 227 | 228 | #. translators: Post date information. 1: Date on which the post is to be 229 | #. archived 230 | #: inc/core/custom.php:86 231 | msgid "Archive on: %1$s" 232 | msgstr "Archivar el: %1$s" 233 | 234 | #: inc/core/custom.php:87 235 | msgid "Archived on:" 236 | msgstr "Archivado el:" 237 | 238 | #. translators: Post date information. 1: Date on which the post was archived 239 | #: inc/core/custom.php:89 240 | msgid "Archived on: %1$s" 241 | msgstr "Archivado el: %1$s" 242 | 243 | #: inc/core/custom.php:90 244 | msgid "Archive now" 245 | msgstr "Archivar now" 246 | 247 | #: inc/core/custom.php:92 248 | msgid "Add to archives" 249 | msgstr "Añadir a archivos" 250 | 251 | #: inc/core/functions.php:165 252 | msgid "Password Protected (%s)" 253 | msgid_plural "Password Protected (%s)" 254 | msgstr[0] "Protegido con contraseña (%s)" 255 | msgstr[1] "Protegido con contraseña (%s)" 256 | 257 | #: inc/core/functions.php:172 258 | msgid "Password Protected" 259 | msgstr "Protegido con contraseña" 260 | 261 | #: inc/core/functions.php:173 262 | msgid "Password" 263 | msgstr "Contraseña" 264 | 265 | #. Plugin Name of the plugin/theme 266 | msgid "WP Statuses" 267 | msgstr "" 268 | 269 | #. Plugin URI of the plugin/theme 270 | msgid "https://imathi.eu/tag/wp-statuses/" 271 | msgstr "" 272 | 273 | #. Description of the plugin/theme 274 | msgid "Suggestions to improve the WordPress Post statuses API." 275 | msgstr "Sugerencias para mejorar la API de estados de publicaciones en WordPress." 276 | 277 | #. Author of the plugin/theme 278 | msgid "imath" 279 | msgstr "" 280 | 281 | #. Author URI of the plugin/theme 282 | msgid "https://imathi.eu/" 283 | msgstr "" 284 | 285 | #: inc/admin/classes/class-wp-statuses-admin.php:580 286 | msgctxt "revisions" 287 | msgid "Browse" 288 | msgstr "" 289 | 290 | #: inc/core/custom.php:22 291 | msgctxt "post status" 292 | msgid "Restricted to members" 293 | msgstr "Restringido a miembros" 294 | 295 | #: inc/core/functions.php:163 296 | msgctxt "post status" 297 | msgid "Password Protected" 298 | msgstr "Protegido con contraseña" 299 | -------------------------------------------------------------------------------- /languages/wp-statuses-fr_FR-1e7dd3b279d4fa91096bb7844e3fb538.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2023-10-08 17:47+0100","generator":"WP-CLI\/2.5.0","source":"js\/sidebar.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=(n > 1);"},"Password":["Mot de passe"],"Next status will be \"%s\" once the scheduled date will be reached.":["Le prochain statut sera \u00ab %s \u00bb une fois que la date planifi\u00e9e sera atteinte."],"Status":["Statut"]}}} -------------------------------------------------------------------------------- /languages/wp-statuses-fr_FR-3c73bf895687c547c13b854e06c1e266.json: -------------------------------------------------------------------------------- 1 | {"translation-revision-date":"2023-10-08 17:47+0100","generator":"WP-CLI\/2.5.0","source":"src\/sidebar\/sidebar.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr","plural-forms":"nplurals=2; plural=(n > 1);"},"Password":["Mot de passe"],"Next status will be \"%s\" once the scheduled date will be reached.":["Le prochain statut sera \u00ab %s \u00bb une fois que la date planifi\u00e9e sera atteinte."],"Status":["Statut"]}}} -------------------------------------------------------------------------------- /languages/wp-statuses-fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imath/wp-statuses/891f1320b32642f85888fcf5ec7ee39bb8011bdc/languages/wp-statuses-fr_FR.mo -------------------------------------------------------------------------------- /languages/wp-statuses-fr_FR.po: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017 imath 2 | # This file is distributed under the GNU/GPL 2. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: WP Statuses 2.1.6\n" 6 | "Report-Msgid-Bugs-To: https://github.com/imath/wp-statuses/issues\n" 7 | "POT-Creation-Date: 2023-10-08T15:44:45+00:00\n" 8 | "PO-Revision-Date: 2023-10-08 17:47+0100\n" 9 | "Last-Translator: imath \n" 10 | "Language-Team: FRENCH \n" 11 | "Language: fr\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 16 | "X-Generator: Poedit 1.7.4\n" 17 | 18 | #. Plugin Name of the plugin 19 | msgid "WP Statuses" 20 | msgstr "WP Statuses" 21 | 22 | #. Plugin URI of the plugin 23 | msgid "https://imathi.eu/tag/wp-statuses/" 24 | msgstr "https://imathi.eu/tag/wp-statuses/" 25 | 26 | #. Description of the plugin 27 | msgid "Suggestions to improve the WordPress Post statuses API." 28 | msgstr "" 29 | "Mes suggestions pour améliorer la "Post Status API" de WordPress." 30 | 31 | #. Author of the plugin 32 | msgid "imath" 33 | msgstr "imath" 34 | 35 | #. Author URI of the plugin 36 | msgid "https://imathi.eu/" 37 | msgstr "https://imathi.eu/" 38 | 39 | #: inc/admin/classes/class-wp-statuses-admin.php:170 40 | msgid "— No Change —" 41 | msgstr "— Aucun changement —" 42 | 43 | #: inc/admin/classes/class-wp-statuses-admin.php:239 44 | msgid "Publishing" 45 | msgstr "Publication" 46 | 47 | #: inc/admin/classes/class-wp-statuses-admin.php:300 48 | #: inc/admin/classes/class-wp-statuses-admin.php:383 49 | msgid "Preview Changes" 50 | msgstr "Prévisualiser les modifications" 51 | 52 | #: inc/admin/classes/class-wp-statuses-admin.php:301 53 | #: inc/admin/classes/class-wp-statuses-admin.php:383 54 | msgid "Preview" 55 | msgstr "Aperçu" 56 | 57 | #: inc/admin/classes/class-wp-statuses-admin.php:357 58 | #: inc/admin/classes/class-wp-statuses-admin.php:688 inc/core/custom.php:32 59 | msgid "Save" 60 | msgstr "Enregistrer" 61 | 62 | #: inc/admin/classes/class-wp-statuses-admin.php:365 63 | msgid "Save Draft" 64 | msgstr "Enregistrer le brouillon" 65 | 66 | #: inc/admin/classes/class-wp-statuses-admin.php:369 67 | msgid "Save as Pending" 68 | msgstr "Mettre à relire" 69 | 70 | #: inc/admin/classes/class-wp-statuses-admin.php:469 71 | msgid "Set status" 72 | msgstr "État" 73 | 74 | #: inc/admin/classes/class-wp-statuses-admin.php:520 75 | msgid "Stick this post to the front page" 76 | msgstr "Mettre cet article en avant sur la page d’accueil" 77 | 78 | #: inc/admin/classes/class-wp-statuses-admin.php:527 79 | msgid "Password:" 80 | msgstr "Mot de passe :" 81 | 82 | #. translators: Publish box date format, see https://secure.php.net/date 83 | #: inc/admin/classes/class-wp-statuses-admin.php:564 84 | msgid "M j, Y @ H:i" 85 | msgstr "j F Y \\à G \\h i \\m\\i\\n" 86 | 87 | #. translators: 1: the scheduled date for the post. 88 | #: inc/admin/classes/class-wp-statuses-admin.php:569 89 | #: inc/core/classes/class-wp-statuses-core-status.php:190 90 | msgid "Schedule for: %1$s" 91 | msgstr "Planifier pour : %1$s" 92 | 93 | #. translators: 1: the post’s saved date. 94 | #: inc/admin/classes/class-wp-statuses-admin.php:571 95 | msgid "Saved on: %1$s" 96 | msgstr "Enregistré le : %1$s" 97 | 98 | #: inc/admin/classes/class-wp-statuses-admin.php:572 99 | msgid "Save now" 100 | msgstr "Enregistrer maintenant" 101 | 102 | #. translators: 1: the date to save the post on. 103 | #: inc/admin/classes/class-wp-statuses-admin.php:574 104 | msgid "Save on: %1$s" 105 | msgstr "Enregistrer le : %1$s" 106 | 107 | #. translators: Post revisions heading. 1: The number of available revisions 108 | #: inc/admin/classes/class-wp-statuses-admin.php:616 109 | msgid "Revisions: %s" 110 | msgstr "Révisions : %s" 111 | 112 | #: inc/admin/classes/class-wp-statuses-admin.php:619 113 | msgctxt "revisions" 114 | msgid "Browse" 115 | msgstr "Parcourir" 116 | 117 | #: inc/admin/classes/class-wp-statuses-admin.php:620 118 | msgid "Browse revisions" 119 | msgstr "Parcourir les révisions" 120 | 121 | #: inc/admin/classes/class-wp-statuses-admin.php:631 122 | msgid "Edit" 123 | msgstr "Modifier" 124 | 125 | #: inc/admin/classes/class-wp-statuses-admin.php:632 126 | msgid "Edit date and time" 127 | msgstr "Modifier la date et l’heure" 128 | 129 | #: inc/admin/classes/class-wp-statuses-admin.php:636 130 | msgid "Date and time" 131 | msgstr "Date et heure" 132 | 133 | #: inc/admin/classes/class-wp-statuses-admin.php:697 134 | msgid "Submit for Review" 135 | msgstr "Soumettre à relecture" 136 | 137 | #: inc/admin/classes/class-wp-statuses-admin.php:702 138 | #: inc/core/classes/class-wp-statuses-core-status.php:180 139 | msgid "Publish" 140 | msgstr "Publier" 141 | 142 | #: inc/admin/classes/class-wp-statuses-admin.php:705 143 | msgid "Schedule" 144 | msgstr "Planifier" 145 | 146 | #: inc/admin/classes/class-wp-statuses-admin.php:716 147 | msgid "Delete Permanently" 148 | msgstr "Supprimer définitivement" 149 | 150 | #: inc/admin/classes/class-wp-statuses-admin.php:716 151 | msgid "Move to Trash" 152 | msgstr "Déplacer dans la corbeille" 153 | 154 | #: inc/core/classes/class-wp-statuses-core-status.php:181 155 | msgid "Update" 156 | msgstr "Mettre à jour" 157 | 158 | #: inc/core/classes/class-wp-statuses-core-status.php:182 159 | msgid "Publish on:" 160 | msgstr "Publier le :" 161 | 162 | #. translators: 1: the date on which the post is to be published 163 | #: inc/core/classes/class-wp-statuses-core-status.php:184 164 | msgid "Publish on: %1$s" 165 | msgstr "Publier le : %1$s" 166 | 167 | #: inc/core/classes/class-wp-statuses-core-status.php:185 168 | msgid "Published on:" 169 | msgstr "Publié le :" 170 | 171 | #. translators: 1: the date on which the post was published 172 | #: inc/core/classes/class-wp-statuses-core-status.php:187 173 | msgid "Published on: %1$s" 174 | msgstr "Publié le : %1$s" 175 | 176 | #: inc/core/classes/class-wp-statuses-core-status.php:188 177 | msgid "Publish immediately" 178 | msgstr "Publier tout de suite" 179 | 180 | #: inc/core/classes/class-wp-statuses-core-status.php:214 181 | msgid "Publicly published" 182 | msgstr "Publier publiquement" 183 | 184 | #: inc/core/classes/class-wp-statuses-core-status.php:215 185 | msgid "Published" 186 | msgstr "Publié" 187 | 188 | #: inc/core/classes/class-wp-statuses-core-status.php:221 189 | msgid "Privately Published" 190 | msgstr "Publier en privé" 191 | 192 | #: inc/core/classes/class-wp-statuses-core-status.php:222 193 | msgid "Save as Private" 194 | msgstr "Enregistrer en Privé" 195 | 196 | #: inc/core/classes/class-wp-statuses-core-status.php:223 197 | msgid "Save as Private on:" 198 | msgstr "Enregistrer en Privé le :" 199 | 200 | #. translators: Post date information. 1: Date on which the post is to be saved privately 201 | #: inc/core/classes/class-wp-statuses-core-status.php:225 202 | msgid "Save as Private on: %1$s" 203 | msgstr "Enregistrer en Privé le : %1$s" 204 | 205 | #: inc/core/classes/class-wp-statuses-core-status.php:226 206 | msgid "Saved as Private on:" 207 | msgstr "Enregistré en Privé le :" 208 | 209 | #. translators: Post date information. 1: Date on which the post was saved privately 210 | #: inc/core/classes/class-wp-statuses-core-status.php:228 211 | msgid "Saved as Private on: %1$s" 212 | msgstr "Enregistré en Privé le : %1$s" 213 | 214 | #: inc/core/classes/class-wp-statuses-core-status.php:229 215 | msgid "Save as private now" 216 | msgstr "Enregistrer en Privé maintenant" 217 | 218 | #: inc/core/classes/class-wp-statuses-core-status.php:230 219 | msgid "Private" 220 | msgstr "Privé" 221 | 222 | #: inc/core/classes/class-wp-statuses-core-status.php:236 223 | msgid "Pending Review" 224 | msgstr "En attente de relecture" 225 | 226 | #: inc/core/classes/class-wp-statuses-core-status.php:242 227 | msgid "Draft" 228 | msgstr "Brouillon" 229 | 230 | #: inc/core/custom.php:22 231 | msgctxt "post status" 232 | msgid "Restricted to members" 233 | msgstr "Restreint aux membres" 234 | 235 | #. translators: %s is the number of restricted to members pages. 236 | #: inc/core/custom.php:25 237 | msgid "Restricted to members (%s)" 238 | msgid_plural "Restricted to members (%s)" 239 | msgstr[0] "Restreint aux membres (%s)" 240 | msgstr[1] "Restreints aux membres (%s)" 241 | 242 | #: inc/core/custom.php:33 243 | msgid "Restricted" 244 | msgstr "Restreint" 245 | 246 | #. translators: %s is the login link. 247 | #: inc/core/custom.php:59 248 | msgid "Please %s to view this content." 249 | msgstr "Merci de vous %s pour voir ce contenu." 250 | 251 | #: inc/core/custom.php:62 252 | msgid "log in" 253 | msgstr "connecter" 254 | 255 | #: inc/core/custom.php:74 inc/core/custom.php:86 256 | msgid "Archive" 257 | msgstr "Archive" 258 | 259 | #. translators: %s is the number of archived posts. 260 | #: inc/core/custom.php:76 261 | msgid "Archived (%s)" 262 | msgid_plural "Archived (%s)" 263 | msgstr[0] "Archivé (%s)" 264 | msgstr[1] "Archivés (%s)" 265 | 266 | #: inc/core/custom.php:85 inc/core/custom.php:94 267 | msgid "Archived" 268 | msgstr "Archivé" 269 | 270 | #: inc/core/custom.php:87 271 | msgid "Archive on:" 272 | msgstr "Archiver le :" 273 | 274 | #. translators: Post date information. 1: Date on which the post is to be archived 275 | #: inc/core/custom.php:89 276 | msgid "Archive on: %1$s" 277 | msgstr "Archiver le : %1$s" 278 | 279 | #: inc/core/custom.php:90 280 | msgid "Archived on:" 281 | msgstr "Archivé le :" 282 | 283 | #. translators: Post date information. 1: Date on which the post was archived 284 | #: inc/core/custom.php:92 285 | msgid "Archived on: %1$s" 286 | msgstr "Archivé le : %1$s" 287 | 288 | #: inc/core/custom.php:93 289 | msgid "Archive now" 290 | msgstr "Archiver maintenant" 291 | 292 | #: inc/core/custom.php:95 293 | msgid "Add to archives" 294 | msgstr "Ajouter aux archives" 295 | 296 | #: inc/core/functions.php:163 297 | msgctxt "post status" 298 | msgid "Password Protected" 299 | msgstr "Protéger avec un mot de passe" 300 | 301 | #. translators: %s is the number of password protected posts. 302 | #: inc/core/functions.php:166 303 | msgid "Password Protected (%s)" 304 | msgid_plural "Password Protected (%s)" 305 | msgstr[0] "Protégé par mot de passe (%s)" 306 | msgstr[1] "Protégés par mot de passe (%s)" 307 | 308 | #: inc/core/functions.php:173 309 | msgid "Password Protected" 310 | msgstr "Protégé par mot de passe" 311 | 312 | #: inc/core/functions.php:174 src/sidebar/sidebar.js:188 js/sidebar.js:188 313 | msgid "Password" 314 | msgstr "Mot de passe" 315 | 316 | #: inc/core/functions.php:237 317 | msgid "You need to preserve keys to customize the order." 318 | msgstr "" 319 | "Vous devez préserver les index pour être en mesure de personnaliser l‘ordre." 320 | 321 | #: inc/core/functions.php:361 322 | msgid "" 323 | "You need to hook to the wp_statuses_registered action to unregister a status " 324 | "for one or more post type." 325 | msgstr "" 326 | "Vous devez vous accrocher à l‘action wp_statuses_registered pour neutraliser " 327 | "un statut pour un ou plusieurs types de publication." 328 | 329 | #: inc/core/functions.php:485 330 | msgid "The list of post types the status applies to." 331 | msgstr "La liste des types de publication pour le statut personnalisé." 332 | 333 | #: inc/core/functions.php:495 334 | msgid "The label to use into the Block editor." 335 | msgstr "Le label à utiliser dans l‘éditeur de blocs." 336 | 337 | #. translators: %s is the label of the publish status. 338 | #: src/sidebar/sidebar.js:155 js/sidebar.js:155 339 | msgid "Next status will be \"%s\" once the scheduled date will be reached." 340 | msgstr "" 341 | "Le prochain statut sera « %s » une fois que la date planifiée sera atteinte." 342 | 343 | #: src/sidebar/sidebar.js:180 js/sidebar.js:180 344 | msgid "Status" 345 | msgstr "Statut" 346 | -------------------------------------------------------------------------------- /languages/wp-statuses-it_IT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imath/wp-statuses/891f1320b32642f85888fcf5ec7ee39bb8011bdc/languages/wp-statuses-it_IT.mo -------------------------------------------------------------------------------- /languages/wp-statuses-ja.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imath/wp-statuses/891f1320b32642f85888fcf5ec7ee39bb8011bdc/languages/wp-statuses-ja.mo -------------------------------------------------------------------------------- /languages/wp-statuses-ja.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: \n" 4 | "Report-Msgid-Bugs-To: https://github.com/imath/wp-statuses/issues\n" 5 | "POT-Creation-Date: 2017-12-01 16:44+0900\n" 6 | "PO-Revision-Date: 2017-12-01 16:51+0900\n" 7 | "Last-Translator: \n" 8 | "Language-Team: \n" 9 | "Language: ja\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "X-Generator: Poedit 2.0.1\n" 14 | "X-Poedit-Basepath: .\n" 15 | "Plural-Forms: nplurals=1; plural=0;\n" 16 | 17 | #: inc/admin/classes/class-wp-statuses-admin.php:159 18 | msgid "— No Change —" 19 | msgstr "" 20 | 21 | #: inc/admin/classes/class-wp-statuses-admin.php:215 22 | msgid "Publishing" 23 | msgstr "公開中" 24 | 25 | #: inc/admin/classes/class-wp-statuses-admin.php:276 26 | #: inc/admin/classes/class-wp-statuses-admin.php:359 27 | msgid "Preview Changes" 28 | msgstr "変更のプレビュー" 29 | 30 | #: inc/admin/classes/class-wp-statuses-admin.php:277 31 | #: inc/admin/classes/class-wp-statuses-admin.php:359 32 | msgid "Preview" 33 | msgstr "プレビュー" 34 | 35 | #: inc/admin/classes/class-wp-statuses-admin.php:333 inc/core/custom.php:31 36 | msgid "Save" 37 | msgstr "保存" 38 | 39 | #: inc/admin/classes/class-wp-statuses-admin.php:341 40 | msgid "Save Draft" 41 | msgstr "下書きを保存" 42 | 43 | #: inc/admin/classes/class-wp-statuses-admin.php:345 44 | msgid "Save as Pending" 45 | msgstr "保留中として保存します" 46 | 47 | #: inc/admin/classes/class-wp-statuses-admin.php:445 48 | msgid "Set status" 49 | msgstr "状態を設定" 50 | 51 | #: inc/admin/classes/class-wp-statuses-admin.php:496 52 | msgid "Stick this post to the front page" 53 | msgstr "このポストをフロントページに貼り付ける" 54 | 55 | #: inc/admin/classes/class-wp-statuses-admin.php:503 56 | msgid "Password:" 57 | msgstr "パスワード:" 58 | 59 | #. translators: Publish box date format, see https:secure.php.net/date 60 | #: inc/admin/classes/class-wp-statuses-admin.php:540 61 | msgid "M j, Y @ H:i" 62 | msgstr "Y年n月j日 @ H:i" 63 | 64 | #. translators: Post revisions heading. 1: The number of available revisions 65 | #: inc/admin/classes/class-wp-statuses-admin.php:577 66 | msgid "Revisions: %s" 67 | msgstr "リビジョン: %s" 68 | 69 | #: inc/admin/classes/class-wp-statuses-admin.php:581 70 | msgid "Browse revisions" 71 | msgstr "リビジョンを表示" 72 | 73 | #: inc/admin/classes/class-wp-statuses-admin.php:592 74 | msgid "Edit" 75 | msgstr "編集" 76 | 77 | #: inc/admin/classes/class-wp-statuses-admin.php:593 78 | msgid "Edit date and time" 79 | msgstr "日時を編集" 80 | 81 | #: inc/admin/classes/class-wp-statuses-admin.php:597 82 | msgid "Date and time" 83 | msgstr "日付と時刻" 84 | 85 | #: inc/admin/classes/class-wp-statuses-admin.php:639 86 | msgid "Submit for Review" 87 | msgstr "レビュー待ちとして送信" 88 | 89 | #: inc/admin/classes/class-wp-statuses-admin.php:644 90 | #: inc/core/classes/class-wp-statuses-core-status.php:179 91 | msgid "Publish" 92 | msgstr "公開" 93 | 94 | #: inc/admin/classes/class-wp-statuses-admin.php:647 95 | msgid "Schedule" 96 | msgstr "予約投稿" 97 | 98 | #: inc/admin/classes/class-wp-statuses-admin.php:662 99 | msgid "Delete Permanently" 100 | msgstr "完全に削除する" 101 | 102 | #: inc/admin/classes/class-wp-statuses-admin.php:662 103 | msgid "Move to Trash" 104 | msgstr "ゴミ箱へ移動" 105 | 106 | #: inc/core/classes/class-wp-statuses-core-status.php:180 107 | msgid "Update" 108 | msgstr "更新" 109 | 110 | #: inc/core/classes/class-wp-statuses-core-status.php:181 111 | msgid "Publish on:" 112 | msgstr "公開日:" 113 | 114 | #. translators: Post date information. 1: Date on which the post is to be 115 | #. published 116 | #: inc/core/classes/class-wp-statuses-core-status.php:183 117 | msgid "Publish on: %1$s" 118 | msgstr "公開日時: %1$s" 119 | 120 | #: inc/core/classes/class-wp-statuses-core-status.php:184 121 | msgid "Published on:" 122 | msgstr "公開日時:" 123 | 124 | #. translators: Post date information. 1: Date on which the post was published 125 | #: inc/core/classes/class-wp-statuses-core-status.php:186 126 | msgid "Published on: %1$s" 127 | msgstr "公開日時: %1$s" 128 | 129 | #: inc/core/classes/class-wp-statuses-core-status.php:187 130 | msgid "Publish immediately" 131 | msgstr "すぐに公開する" 132 | 133 | #. translators: Post date information. 1: Date on which the post is to be 134 | #. published 135 | #: inc/core/classes/class-wp-statuses-core-status.php:189 136 | msgid "Schedule for: %1$s" 137 | msgstr "すぐに公開する" 138 | 139 | #: inc/core/classes/class-wp-statuses-core-status.php:206 140 | msgid "Publicly published" 141 | msgstr "公開済み" 142 | 143 | #: inc/core/classes/class-wp-statuses-core-status.php:207 144 | msgid "Published" 145 | msgstr "公開済み" 146 | 147 | #: inc/core/classes/class-wp-statuses-core-status.php:213 148 | msgid "Privately Published" 149 | msgstr "非公開" 150 | 151 | #: inc/core/classes/class-wp-statuses-core-status.php:214 152 | msgid "Save as Private" 153 | msgstr "" 154 | 155 | #: inc/core/classes/class-wp-statuses-core-status.php:215 156 | msgid "Save as Private on:" 157 | msgstr "" 158 | 159 | #. translators: Post date information. 1: Date on which the post is to be saved 160 | #. privately 161 | #: inc/core/classes/class-wp-statuses-core-status.php:217 162 | msgid "Save as Private on: %1$s" 163 | msgstr "" 164 | 165 | #: inc/core/classes/class-wp-statuses-core-status.php:218 166 | msgid "Saved as Private on:" 167 | msgstr "" 168 | 169 | #. translators: Post date information. 1: Date on which the post was saved 170 | #. privately 171 | #: inc/core/classes/class-wp-statuses-core-status.php:220 172 | msgid "Saved as Private on: %1$s" 173 | msgstr "" 174 | 175 | #: inc/core/classes/class-wp-statuses-core-status.php:221 176 | msgid "Save as private now" 177 | msgstr "" 178 | 179 | #: inc/core/classes/class-wp-statuses-core-status.php:222 180 | msgid "Private" 181 | msgstr "非公開" 182 | 183 | #: inc/core/classes/class-wp-statuses-core-status.php:228 184 | msgid "Pending Review" 185 | msgstr "レビュー待ち" 186 | 187 | #: inc/core/classes/class-wp-statuses-core-status.php:234 188 | msgid "Draft" 189 | msgstr "下書き" 190 | 191 | #: inc/core/custom.php:24 192 | msgid "Restricted to members (%s)" 193 | msgid_plural "Restricted to members (%s)" 194 | msgstr[0] "" 195 | 196 | #: inc/core/custom.php:32 197 | msgid "Restricted" 198 | msgstr "" 199 | 200 | #: inc/core/custom.php:57 201 | msgid "Please %s to view this content." 202 | msgstr "" 203 | 204 | #: inc/core/custom.php:60 205 | msgid "log in" 206 | msgstr "ログイン" 207 | 208 | #: inc/core/custom.php:72 inc/core/custom.php:83 209 | msgid "Archive" 210 | msgstr "" 211 | 212 | #: inc/core/custom.php:73 213 | msgid "Archived (%s)" 214 | msgid_plural "Archived (%s)" 215 | msgstr[0] "" 216 | 217 | #: inc/core/custom.php:82 inc/core/custom.php:91 218 | msgid "Archived" 219 | msgstr "" 220 | 221 | #: inc/core/custom.php:84 222 | msgid "Archive on:" 223 | msgstr "" 224 | 225 | #. translators: Post date information. 1: Date on which the post is to be 226 | #. archived 227 | #: inc/core/custom.php:86 228 | msgid "Archive on: %1$s" 229 | msgstr "" 230 | 231 | #: inc/core/custom.php:87 232 | msgid "Archived on:" 233 | msgstr "" 234 | 235 | #. translators: Post date information. 1: Date on which the post was archived 236 | #: inc/core/custom.php:89 237 | msgid "Archived on: %1$s" 238 | msgstr "" 239 | 240 | #: inc/core/custom.php:90 241 | msgid "Archive now" 242 | msgstr "" 243 | 244 | #: inc/core/custom.php:92 245 | msgid "Add to archives" 246 | msgstr "" 247 | 248 | #: inc/core/functions.php:165 249 | msgid "Password Protected (%s)" 250 | msgid_plural "Password Protected (%s)" 251 | msgstr[0] "" 252 | 253 | #: inc/core/functions.php:172 254 | msgid "Password Protected" 255 | msgstr "パスワードで保護されています" 256 | 257 | #: inc/core/functions.php:173 258 | msgid "Password" 259 | msgstr "パスワード" 260 | 261 | #. Plugin Name of the plugin/theme 262 | msgid "WP Statuses" 263 | msgstr "" 264 | 265 | #. Plugin URI of the plugin/theme 266 | msgid "https://imathi.eu/tag/wp-statuses/" 267 | msgstr "" 268 | 269 | #. Description of the plugin/theme 270 | msgid "Suggestions to improve the WordPress Post statuses API." 271 | msgstr "" 272 | 273 | #. Author of the plugin/theme 274 | msgid "imath" 275 | msgstr "" 276 | 277 | #. Author URI of the plugin/theme 278 | msgid "https://imathi.eu/" 279 | msgstr "" 280 | 281 | #: inc/admin/classes/class-wp-statuses-admin.php:580 282 | msgctxt "revisions" 283 | msgid "Browse" 284 | msgstr "" 285 | 286 | #: inc/core/custom.php:22 287 | msgctxt "post status" 288 | msgid "Restricted to members" 289 | msgstr "" 290 | 291 | #: inc/core/functions.php:163 292 | msgctxt "post status" 293 | msgid "Password Protected" 294 | msgstr "" 295 | -------------------------------------------------------------------------------- /languages/wp-statuses.pot: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 imath 2 | # This file is distributed under the GNU/GPL 2. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: WP Statuses\n" 6 | "Report-Msgid-Bugs-To: https://github.com/imath/wp-statuses/issues\n" 7 | "Last-Translator: imath \n" 8 | "Language-Team: FRENCH \n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "POT-Creation-Date: 2023-10-08T15:44:45+00:00\n" 13 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 | "X-Generator: WP-CLI 2.5.0\n" 15 | "X-Domain: wp-statuses\n" 16 | 17 | #. Plugin Name of the plugin 18 | msgid "WP Statuses" 19 | msgstr "" 20 | 21 | #. Plugin URI of the plugin 22 | msgid "https://imathi.eu/tag/wp-statuses/" 23 | msgstr "" 24 | 25 | #. Description of the plugin 26 | msgid "Suggestions to improve the WordPress Post statuses API." 27 | msgstr "" 28 | 29 | #. Author of the plugin 30 | msgid "imath" 31 | msgstr "" 32 | 33 | #. Author URI of the plugin 34 | msgid "https://imathi.eu/" 35 | msgstr "" 36 | 37 | #: inc/admin/classes/class-wp-statuses-admin.php:170 38 | msgid "— No Change —" 39 | msgstr "" 40 | 41 | #: inc/admin/classes/class-wp-statuses-admin.php:239 42 | msgid "Publishing" 43 | msgstr "" 44 | 45 | #: inc/admin/classes/class-wp-statuses-admin.php:300 46 | #: inc/admin/classes/class-wp-statuses-admin.php:383 47 | msgid "Preview Changes" 48 | msgstr "" 49 | 50 | #: inc/admin/classes/class-wp-statuses-admin.php:301 51 | #: inc/admin/classes/class-wp-statuses-admin.php:383 52 | msgid "Preview" 53 | msgstr "" 54 | 55 | #: inc/admin/classes/class-wp-statuses-admin.php:357 56 | #: inc/admin/classes/class-wp-statuses-admin.php:688 57 | #: inc/core/custom.php:32 58 | msgid "Save" 59 | msgstr "" 60 | 61 | #: inc/admin/classes/class-wp-statuses-admin.php:365 62 | msgid "Save Draft" 63 | msgstr "" 64 | 65 | #: inc/admin/classes/class-wp-statuses-admin.php:369 66 | msgid "Save as Pending" 67 | msgstr "" 68 | 69 | #: inc/admin/classes/class-wp-statuses-admin.php:469 70 | msgid "Set status" 71 | msgstr "" 72 | 73 | #: inc/admin/classes/class-wp-statuses-admin.php:520 74 | msgid "Stick this post to the front page" 75 | msgstr "" 76 | 77 | #: inc/admin/classes/class-wp-statuses-admin.php:527 78 | msgid "Password:" 79 | msgstr "" 80 | 81 | #. translators: Publish box date format, see https://secure.php.net/date 82 | #: inc/admin/classes/class-wp-statuses-admin.php:564 83 | msgid "M j, Y @ H:i" 84 | msgstr "" 85 | 86 | #. translators: 1: the scheduled date for the post. 87 | #: inc/admin/classes/class-wp-statuses-admin.php:569 88 | #: inc/core/classes/class-wp-statuses-core-status.php:190 89 | msgid "Schedule for: %1$s" 90 | msgstr "" 91 | 92 | #. translators: 1: the post’s saved date. 93 | #: inc/admin/classes/class-wp-statuses-admin.php:571 94 | msgid "Saved on: %1$s" 95 | msgstr "" 96 | 97 | #: inc/admin/classes/class-wp-statuses-admin.php:572 98 | msgid "Save now" 99 | msgstr "" 100 | 101 | #. translators: 1: the date to save the post on. 102 | #: inc/admin/classes/class-wp-statuses-admin.php:574 103 | msgid "Save on: %1$s" 104 | msgstr "" 105 | 106 | #. translators: Post revisions heading. 1: The number of available revisions 107 | #: inc/admin/classes/class-wp-statuses-admin.php:616 108 | msgid "Revisions: %s" 109 | msgstr "" 110 | 111 | #: inc/admin/classes/class-wp-statuses-admin.php:619 112 | msgctxt "revisions" 113 | msgid "Browse" 114 | msgstr "" 115 | 116 | #: inc/admin/classes/class-wp-statuses-admin.php:620 117 | msgid "Browse revisions" 118 | msgstr "" 119 | 120 | #: inc/admin/classes/class-wp-statuses-admin.php:631 121 | msgid "Edit" 122 | msgstr "" 123 | 124 | #: inc/admin/classes/class-wp-statuses-admin.php:632 125 | msgid "Edit date and time" 126 | msgstr "" 127 | 128 | #: inc/admin/classes/class-wp-statuses-admin.php:636 129 | msgid "Date and time" 130 | msgstr "" 131 | 132 | #: inc/admin/classes/class-wp-statuses-admin.php:697 133 | msgid "Submit for Review" 134 | msgstr "" 135 | 136 | #: inc/admin/classes/class-wp-statuses-admin.php:702 137 | #: inc/core/classes/class-wp-statuses-core-status.php:180 138 | msgid "Publish" 139 | msgstr "" 140 | 141 | #: inc/admin/classes/class-wp-statuses-admin.php:705 142 | msgid "Schedule" 143 | msgstr "" 144 | 145 | #: inc/admin/classes/class-wp-statuses-admin.php:716 146 | msgid "Delete Permanently" 147 | msgstr "" 148 | 149 | #: inc/admin/classes/class-wp-statuses-admin.php:716 150 | msgid "Move to Trash" 151 | msgstr "" 152 | 153 | #: inc/core/classes/class-wp-statuses-core-status.php:181 154 | msgid "Update" 155 | msgstr "" 156 | 157 | #: inc/core/classes/class-wp-statuses-core-status.php:182 158 | msgid "Publish on:" 159 | msgstr "" 160 | 161 | #. translators: 1: the date on which the post is to be published 162 | #: inc/core/classes/class-wp-statuses-core-status.php:184 163 | msgid "Publish on: %1$s" 164 | msgstr "" 165 | 166 | #: inc/core/classes/class-wp-statuses-core-status.php:185 167 | msgid "Published on:" 168 | msgstr "" 169 | 170 | #. translators: 1: the date on which the post was published 171 | #: inc/core/classes/class-wp-statuses-core-status.php:187 172 | msgid "Published on: %1$s" 173 | msgstr "" 174 | 175 | #: inc/core/classes/class-wp-statuses-core-status.php:188 176 | msgid "Publish immediately" 177 | msgstr "" 178 | 179 | #: inc/core/classes/class-wp-statuses-core-status.php:214 180 | msgid "Publicly published" 181 | msgstr "" 182 | 183 | #: inc/core/classes/class-wp-statuses-core-status.php:215 184 | msgid "Published" 185 | msgstr "" 186 | 187 | #: inc/core/classes/class-wp-statuses-core-status.php:221 188 | msgid "Privately Published" 189 | msgstr "" 190 | 191 | #: inc/core/classes/class-wp-statuses-core-status.php:222 192 | msgid "Save as Private" 193 | msgstr "" 194 | 195 | #: inc/core/classes/class-wp-statuses-core-status.php:223 196 | msgid "Save as Private on:" 197 | msgstr "" 198 | 199 | #. translators: Post date information. 1: Date on which the post is to be saved privately 200 | #: inc/core/classes/class-wp-statuses-core-status.php:225 201 | msgid "Save as Private on: %1$s" 202 | msgstr "" 203 | 204 | #: inc/core/classes/class-wp-statuses-core-status.php:226 205 | msgid "Saved as Private on:" 206 | msgstr "" 207 | 208 | #. translators: Post date information. 1: Date on which the post was saved privately 209 | #: inc/core/classes/class-wp-statuses-core-status.php:228 210 | msgid "Saved as Private on: %1$s" 211 | msgstr "" 212 | 213 | #: inc/core/classes/class-wp-statuses-core-status.php:229 214 | msgid "Save as private now" 215 | msgstr "" 216 | 217 | #: inc/core/classes/class-wp-statuses-core-status.php:230 218 | msgid "Private" 219 | msgstr "" 220 | 221 | #: inc/core/classes/class-wp-statuses-core-status.php:236 222 | msgid "Pending Review" 223 | msgstr "" 224 | 225 | #: inc/core/classes/class-wp-statuses-core-status.php:242 226 | msgid "Draft" 227 | msgstr "" 228 | 229 | #: inc/core/custom.php:22 230 | msgctxt "post status" 231 | msgid "Restricted to members" 232 | msgstr "" 233 | 234 | #. translators: %s is the number of restricted to members pages. 235 | #: inc/core/custom.php:25 236 | msgid "Restricted to members (%s)" 237 | msgid_plural "Restricted to members (%s)" 238 | msgstr[0] "" 239 | msgstr[1] "" 240 | 241 | #: inc/core/custom.php:33 242 | msgid "Restricted" 243 | msgstr "" 244 | 245 | #. translators: %s is the login link. 246 | #: inc/core/custom.php:59 247 | msgid "Please %s to view this content." 248 | msgstr "" 249 | 250 | #: inc/core/custom.php:62 251 | msgid "log in" 252 | msgstr "" 253 | 254 | #: inc/core/custom.php:74 255 | #: inc/core/custom.php:86 256 | msgid "Archive" 257 | msgstr "" 258 | 259 | #. translators: %s is the number of archived posts. 260 | #: inc/core/custom.php:76 261 | msgid "Archived (%s)" 262 | msgid_plural "Archived (%s)" 263 | msgstr[0] "" 264 | msgstr[1] "" 265 | 266 | #: inc/core/custom.php:85 267 | #: inc/core/custom.php:94 268 | msgid "Archived" 269 | msgstr "" 270 | 271 | #: inc/core/custom.php:87 272 | msgid "Archive on:" 273 | msgstr "" 274 | 275 | #. translators: Post date information. 1: Date on which the post is to be archived 276 | #: inc/core/custom.php:89 277 | msgid "Archive on: %1$s" 278 | msgstr "" 279 | 280 | #: inc/core/custom.php:90 281 | msgid "Archived on:" 282 | msgstr "" 283 | 284 | #. translators: Post date information. 1: Date on which the post was archived 285 | #: inc/core/custom.php:92 286 | msgid "Archived on: %1$s" 287 | msgstr "" 288 | 289 | #: inc/core/custom.php:93 290 | msgid "Archive now" 291 | msgstr "" 292 | 293 | #: inc/core/custom.php:95 294 | msgid "Add to archives" 295 | msgstr "" 296 | 297 | #: inc/core/functions.php:163 298 | msgctxt "post status" 299 | msgid "Password Protected" 300 | msgstr "" 301 | 302 | #. translators: %s is the number of password protected posts. 303 | #: inc/core/functions.php:166 304 | msgid "Password Protected (%s)" 305 | msgid_plural "Password Protected (%s)" 306 | msgstr[0] "" 307 | msgstr[1] "" 308 | 309 | #: inc/core/functions.php:173 310 | msgid "Password Protected" 311 | msgstr "" 312 | 313 | #: inc/core/functions.php:174 314 | #: src/sidebar/sidebar.js:188 315 | #: js/sidebar.js:188 316 | msgid "Password" 317 | msgstr "" 318 | 319 | #: inc/core/functions.php:237 320 | msgid "You need to preserve keys to customize the order." 321 | msgstr "" 322 | 323 | #: inc/core/functions.php:361 324 | msgid "You need to hook to the wp_statuses_registered action to unregister a status for one or more post type." 325 | msgstr "" 326 | 327 | #: inc/core/functions.php:485 328 | msgid "The list of post types the status applies to." 329 | msgstr "" 330 | 331 | #: inc/core/functions.php:495 332 | msgid "The label to use into the Block editor." 333 | msgstr "" 334 | 335 | #. translators: %s is the label of the publish status. 336 | #: src/sidebar/sidebar.js:155 337 | #: js/sidebar.js:155 338 | msgid "Next status will be \"%s\" once the scheduled date will be reached." 339 | msgstr "" 340 | 341 | #: src/sidebar/sidebar.js:180 342 | #: js/sidebar.js:180 343 | msgid "Status" 344 | msgstr "" 345 | -------------------------------------------------------------------------------- /wp-statuses.php: -------------------------------------------------------------------------------- 1 | setup_globals(); 51 | $this->inc(); 52 | $this->setup_hooks(); 53 | } 54 | 55 | /** 56 | * Magic method for checking the existence of a plugin global variable. 57 | * 58 | * @since 2.1.6 59 | * 60 | * @param string $key Key to check the set status for. 61 | * @return bool 62 | */ 63 | public function __isset( $key ) { 64 | return isset( $this->data[ $key ] ); 65 | } 66 | 67 | /** 68 | * Magic method for getting a plugin global variable. 69 | * 70 | * @since 2.1.6 71 | * 72 | * @param string $key Key to return the value for. 73 | * @return mixed 74 | */ 75 | public function __get( $key ) { 76 | $retval = null; 77 | if ( isset( $this->data[ $key ] ) ) { 78 | $retval = $this->data[ $key ]; 79 | } 80 | 81 | return $retval; 82 | } 83 | 84 | /** 85 | * Magic method for setting a plugin global variable. 86 | * 87 | * @since 2.1.6 88 | * 89 | * @param string $key Key to set a value for. 90 | * @param mixed $value Value to set. 91 | */ 92 | public function __set( $key, $value ) { 93 | $this->data[ $key ] = $value; 94 | } 95 | 96 | /** 97 | * Magic method for unsetting a plugin global variable. 98 | * 99 | * @since 2.1.6 100 | * 101 | * @param string $key Key to unset a value for. 102 | */ 103 | public function __unset( $key ) { 104 | if ( isset( $this->data[ $key ] ) ) { 105 | unset( $this->data[ $key ] ); 106 | } 107 | } 108 | 109 | /** 110 | * Return an instance of this class. 111 | * 112 | * @since 1.0.0 113 | * 114 | * @return object A single instance of this class. 115 | */ 116 | public static function start() { 117 | 118 | // If the single instance hasn't been set, set it now. 119 | if ( null == self::$instance ) { 120 | self::$instance = new self; 121 | } 122 | 123 | return self::$instance; 124 | } 125 | 126 | /** 127 | * Setups plugin's globals 128 | * 129 | * @since 1.0.0 130 | */ 131 | private function setup_globals() { 132 | // Version 133 | $this->version = '2.1.9'; 134 | 135 | // Domain 136 | $this->domain = 'wp-statuses'; 137 | 138 | // Base name 139 | $this->file = __FILE__; 140 | $this->basename = plugin_basename( $this->file ); 141 | 142 | // Path and URL 143 | $this->dir = plugin_dir_path( $this->file ); 144 | $this->url = plugin_dir_url ( $this->file ); 145 | $this->js_url = trailingslashit( $this->url . 'js' ); 146 | $this->inc_dir = trailingslashit( $this->dir . 'inc' ); 147 | } 148 | 149 | /** 150 | * Includes plugin's needed files 151 | * 152 | * @since 1.0.0 153 | */ 154 | private function inc() { 155 | spl_autoload_register( array( $this, 'autoload' ) ); 156 | 157 | require $this->inc_dir . 'core/functions.php'; 158 | 159 | /** 160 | * Filter here to have a preview about how custom statuses 161 | * are managed by the plugin using: 162 | * add_filter( 'wp_statuses_use_custom_status', '__return_true' ); 163 | * 164 | * @since 1.0.0 165 | * 166 | * @param bool $value True to have a demo of the custom status. 167 | * False otherwise. 168 | */ 169 | if ( apply_filters( 'wp_statuses_use_custom_status', false ) ) { 170 | require $this->inc_dir . 'core/custom.php'; 171 | } 172 | } 173 | 174 | /** 175 | * Setups hooks to register post statuses & load the Administration. 176 | * 177 | * @since 1.0.0 178 | */ 179 | private function setup_hooks() { 180 | add_action( 'init', 'wp_statuses_register_password_protected', 10 ); 181 | add_action( 'init', 'wp_statuses_register', 1000 ); 182 | add_action( 'change_locale', 'wp_statuses_register', 10 ); 183 | 184 | // Boot the Admin 185 | if ( is_admin() ) { 186 | add_action( 'plugins_loaded', array( 'WP_Statuses_Admin', 'start' ), 10 ); 187 | } 188 | 189 | // Load translations 190 | add_action( 'init', array( $this, 'load_textdomain' ), 9 ); 191 | } 192 | 193 | /** 194 | * Loads the translation files 195 | * 196 | * @since 1.0.0 197 | */ 198 | public function load_textdomain() { 199 | load_plugin_textdomain( $this->domain, false, trailingslashit( basename( $this->dir ) ) . 'languages' ); 200 | } 201 | 202 | /** 203 | * Class Autoload function 204 | * 205 | * @since 1.0.0 206 | * 207 | * @param string $class The class name. 208 | */ 209 | public function autoload( $class ) { 210 | $name = str_replace( '_', '-', strtolower( $class ) ); 211 | 212 | if ( false === strpos( $name, $this->domain ) ) { 213 | return; 214 | } 215 | 216 | $folder = null; 217 | $parts = explode( '-', $name ); 218 | 219 | if ( isset( $parts[2] ) ) { 220 | $folder = $parts[2]; 221 | } 222 | 223 | $path = $this->inc_dir . "{$folder}/classes/class-{$name}.php"; 224 | 225 | // Sanity check. 226 | if ( ! file_exists( $path ) ) { 227 | return; 228 | } 229 | 230 | require $path; 231 | } 232 | } 233 | 234 | endif; 235 | 236 | /** 237 | * Boot the plugin. 238 | * 239 | * @since 1.0.0 240 | */ 241 | function wp_statuses() { 242 | return WP_Statuses::start(); 243 | } 244 | add_action( 'plugins_loaded', 'wp_statuses', 5 ); 245 | --------------------------------------------------------------------------------