Changeset 8384 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
- Timestamp:
- 03/01/2019 07:26:16 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-new-site.php
r8375 r8384 492 492 */ 493 493 protected function get_stub_pages( $wordcamp, $meta ) { 494 // todo remove the to field from all contact forms and notes, just let it default to the admin email495 496 494 $pages = array( 497 495 array( 498 496 'title' => __( 'Schedule', 'wordcamporg' ), 499 'content' => 500 '<p>' . __( '<em>Organizers note:</em> You can enter content for this page in the Sessions menu item in the sidebar.', 'wordcamporg' ) . '</p> ' . 501 '<h1>' . __( 'Saturday, January 1st', 'wordcamporg' ) . '</h1> ' . 502 '<p>[schedule date="YYYY-MM-DD" tracks="example-track,another-example-track,yet-another-example-track"]</p>', 497 'content' => $this->get_stub_content( 'page', 'schedule' ), 503 498 'status' => 'publish', 504 499 'type' => 'page', … … 507 502 array( 508 503 'title' => __( 'Speakers', 'wordcamporg' ), 509 'content' => 510 '<p>' . __( '<em>Organizers note:</em> You can enter content for this page in the Speakers menu item in the sidebar.', 'wordcamporg' ) . '</p> ' . 511 '<p>[speakers]</p>', 504 'content' => $this->get_stub_content( 'page', 'speakers' ), 512 505 'status' => 'publish', 513 506 'type' => 'page', … … 516 509 array( 517 510 'title' => __( 'Sessions', 'wordcamporg' ), 518 'content' => 519 '<p>' . __( '<em>Organizers note:</em> You can enter content for this page in the Sessions menu item in the sidebar.', 'wordcamporg' ) . '</p> ' . 520 '<p>[sessions orderby="session_time" order="asc"]</p>', 511 'content' => $this->get_stub_content( 'page', 'sessions' ), 521 512 'status' => 'publish', 522 513 'type' => 'page', … … 525 516 array( 526 517 'title' => __( 'Sponsors', 'wordcamporg' ), 527 'content' => 528 '<p>' . sprintf( 529 /* translators: %s: Global Community Sponsorship page URL */ 530 __( "<em>Organizers note:</em> Multi-event sponsors have been automatically created in the Sponsors menu, but you'll need to remove the ones that don't apply to your specific event. To find out which ones apply, please visit the <a href=\"%s\">Global Community Sponsorship</a> handbook page. After that, you should add the sponsors that are specific to your event. For non-English sites, make sure the URL below matches the Call for Sponsors page.", 'wordcamporg' ), 531 'https://make.wordpress.org/community/handbook/wordcamp-organizer/planning-details/fundraising/global-community-sponsorship-for-event-organizers/' 532 ) . '</p> ' . 533 '<h3>' . __( 'Our Sponsors', 'wordcamporg' ) . '</h3> ' . 534 '<p>' . __( 'Blurb thanking sponsors', 'wordcamporg' ) . '</p> ' . 535 '<p>[sponsors]</p> ' . 536 '<h3>' . __( 'Interested in sponsoring WordCamp this year?', 'wordcamporg' ) . '</h3> ' . 537 '<p>' . __( 'Check out our <a href="/call-for-sponsors">Call for Sponsors</a> post for details on how you can help make this year\'s WordCamp the best it can be!</p>', 'wordcamporg' ), 518 'content' => $this->get_stub_content( 'page', 'sponsors' ), 538 519 'status' => 'publish', 539 520 'type' => 'page', … … 549 530 array( 550 531 'title' => __( 'Organizers', 'wordcamporg' ), 551 'content' => 552 '<p>' . __( '<em>Organizers note:</em> You can enter content for this page in the Organizers menu item in the sidebar.', 'wordcamporg' ) . '</p> ' . 553 '<p>[organizers]</p>', 532 'content' => $this->get_stub_content( 'page', 'organizers' ), 554 533 'status' => 'publish', 555 534 'type' => 'page', … … 558 537 array( 559 538 'title' => __( 'Tickets', 'wordcamporg' ), 560 'content' => 561 '<p>' . __( "<em>Organizers note:</em> If you'd like to change the slug for this page, please make sure you do that before opening ticket sales. Changing the page slug after tickets have started selling will break the link that users receive in their receipt e-mail.", 'wordcamporg' ) . '</p> ' . 562 '<p>[camptix]</p>', 539 'content' => $this->get_stub_content( 'page', 'tickets' ), 563 540 'status' => 'draft', 564 541 'type' => 'page', … … 567 544 array( 568 545 'title' => __( 'Attendees', 'wordcamporg' ), 569 'content' => '[camptix_attendees columns="3"]',546 'content' => $this->get_stub_content( 'page', 'attendees' ), 570 547 'status' => 'draft', 571 548 'type' => 'page', … … 574 551 array( 575 552 'title' => __( 'Videos', 'wordcamporg' ), 576 'content' => 577 '<p>' . __( '<em>Organizers note:</em> After your WordCamp is over and the sessions are published to WordPress.tv, you can embed them here. Just enter the event slug into the shortcode below, and hit the <em>Publish</em> button.', 'wordcamporg' ) . '</p> ' . 578 '<p>[wptv event="enter-event-slug-here"]</p>', 553 'content' => $this->get_stub_content( 'page', 'videos' ), 579 554 'status' => 'draft', 580 555 'type' => 'page', … … 583 558 array( 584 559 'title' => __( 'Slideshow', 'wordcamporg' ), 585 'content' => 586 '<p>' . __( "<em>Organizers note:</em> Upload photos to this page and they'll automagically appear in a slideshow!", 'wordcamporg' ) . '</p> ' . 587 '<p>[slideshow]</p>', 560 // todo Update this one when Jetpack's Slideshow block becomes available. 561 'content' => $this->get_stub_content( 'page', 'slideshow' ), 588 562 'status' => 'draft', 589 563 'type' => 'page', … … 592 566 array( 593 567 'title' => __( 'Contact', 'wordcamporg' ), 594 'content' => sprintf( 595 '<p>' . 596 '[contact-form to="%s" subject="%s"]' . 597 '[contact-field label="%s" type="name" required="1" /]' . 598 '[contact-field label="%s" type="email" required="1" /]' . 599 '[contact-field label="%s" type="textarea" required="1" /]' . 600 '[/contact-form]' . 601 '</p>', 602 get_option( 'admin_email' ), 603 __( 'WordCamp Contact Request', 'wordcamporg' ), 604 __( 'Name', 'wordcamporg' ), 605 __( 'Email', 'wordcamporg' ), 606 __( 'Message', 'wordcamporg' ) 607 ), 568 'content' => $this->get_stub_content( 'page', 'contact' ), 608 569 'status' => 'publish', 609 570 'type' => 'page', … … 612 573 array( 613 574 'title' => __( 'Social Media Stream', 'wordcamporg' ), 614 'content' => 615 '<p>' . __( '<em>Organizers note:</em> The [[tagregator]] shortcode will pull in a stream of social media posts and display them. In order to use it, you\'ll need to follow the setup instructions at http://wordpress.org/plugins/tagregator/installation, and then update "#wcxyz" below with your hashtag.', 'wordcamporg' ) . '</p> ' . 616 '<p>[tagregator hashtag="#wcxzy"]</p>', 575 'content' => $this->get_stub_content( 'page', 'social-media-stream' ), 617 576 'status' => 'publish', 618 577 'type' => 'page', … … 621 580 array( 622 581 'title' => __( 'Code of Conduct', 'wordcamporg' ), 623 'content' => 624 '<p>' . 625 sprintf( 626 // translators: %s: URL for code of conduct policy 627 __( '<em>Organizers note:</em> Below is a boilerplate code of conduct that you can customize; another great example is the Ada Initiative <a href="%s">anti-harassment policy.</a>', 'wordcamporg' ), 628 'http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy' 629 ) . 630 '</p> ' . 631 632 '<p>' . 633 sprintf( 634 // translators: %s: URL for article about harassment reports 635 __( 'We also recommend the organizing team read this article on <a href="%s">how to take a harassment report</a>', 'wordcamporg' ), 636 'http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Responding_to_reports' 637 ) . 638 '</p> ' . 639 640 '<p>' . __( 'Please update the portions <span style="color: red; text-decoration: underline;">with red text</span>. You can use the "Remove Formatting" button on the toolbar (the eraser icon on the second line) to remove the color and underline.', 'wordcamporg' ) . 641 $this->get_code_of_conduct(), 582 'content' => $this->get_stub_content( 'page', 'code-of-conduct' ), 642 583 'status' => 'publish', 643 584 'type' => 'page', … … 661 602 // translators: %s: site title 662 603 'title' => sprintf( __( 'Welcome to %s', 'wordcamporg' ), get_option( 'blogname' ) ), 663 'content' => 664 '<p>' . __( '<em>Organizers note:</em> Please update the portions <span style="color: red; text-decoration: underline;">with red text</span>.', 'wordcamporg' ) . '</p> ' . 665 '<p>' . __( 'We\'re happy to announce that <span style="color: red; text-decoration: underline;">WordCamp YourCityName</span> is officially on the calendar!', 'wordcamporg' ) . '</p> ' . 666 '<p>' . __( '<span style="color: red; text-decoration: underline;">WordCamp YourCityName</span> will be <span style="color: red; text-decoration: underline;">DATE(S)</span> at <span style="color: red; text-decoration: underline;">LOCATION</span>.', 'wordcamporg' ) . '</p> ' . 667 '<p>' . __( '<span style="color: red; text-decoration: underline;">Subscribe using the form in the sidebar</span> to stay up to date on the most recent news. We’ll be keeping you posted on all the details over the coming months, including speaker submissions, ticket sales and more!', 'wordcamporg' ) . '</p> ', 604 'content' => $this->get_stub_content( 'post', 'welcome' ), 668 605 'status' => 'publish', 669 606 'type' => 'post', … … 672 609 array( 673 610 'title' => __( 'Call for Sponsors', 'wordcamporg' ), 674 'content' => 675 '<p>' . __( 'Blurb with information for potential sponsors.', 'wordcamporg' ) . '</p> ' . 676 '<p>' . 677 sprintf( ' 678 [contact-form to="%s" subject="%s"] 679 [contact-field label="%s" type="text" required="1" /] 680 [contact-field label="%s" type="name" required="1" /] 681 [contact-field label="%s" type="email" required="1" /] 682 [contact-field label="%s" type="text" /] 683 [contact-field label="%s" type="text" /] 684 [contact-field label="%s" type="textarea" required="1" /] 685 [contact-field label="%s" type="textarea" /] 686 [/contact-form]', 687 get_option( 'admin_email' ), 688 __( 'WordCamp Sponsor Request', 'wordcamporg' ), 689 __( 'Contact Name', 'wordcamporg' ), 690 __( 'Company Name', 'wordcamporg' ), 691 __( 'Email', 'wordcamporg' ), 692 __( 'Phone Number', 'wordcamporg' ), 693 __( 'Sponsorship Level', 'wordcamporg' ), 694 __( 'Why Would you Like to Sponsor WordCamp?', 'wordcamporg' ), 695 __( 'Questions / Comments', 'wordcamporg' ) 696 ) . 697 '</p>', 611 'content' => $this->get_stub_content( 'post', 'call-for-sponsors' ), 698 612 'status' => 'draft', 699 613 'type' => 'post', … … 702 616 array( 703 617 'title' => __( 'Call for Speakers', 'wordcamporg' ), 704 'content' => 705 '<p>' . __( '<em>Organizers note:</em> Submissions to this form will automatically create draft posts for the Speaker and Session post types. Feel free to customize the form, but deleting or renaming the following fields will break the automation: Name, Email, WordPress.org Username, Your Bio, Session Title, Session Description.', 'wordcamporg' ) . '</p>' . 706 '<p>' . __( "If you'd like to propose multiple topics, please submit the form multiple times, once for each topic. [Other speaker instructions/info goes here.]", 'wordcamporg' ) . '</p>' . 707 '<p>' . 708 sprintf( ' 709 [contact-form to="%s" subject="%s"] 710 [contact-field label="%s" type="name" required="1" /] 711 [contact-field label="%s" type="email" required="1" /] 712 [contact-field label="%s" type="text" required="1" /] 713 [contact-field label="%s" type="textarea" required="1" /] 714 [contact-field label="%s" type="text" required="1" /] 715 [contact-field label="%s" type="textarea" required="1" /] 716 [contact-field label="%s" type="text" required="1" /] 717 [contact-field label="%s" type="textarea" /] 718 [/contact-form]', 719 get_option( 'admin_email' ), 720 __( 'WordCamp Speaker Request', 'wordcamporg' ), 721 __( 'Name', 'wordcamporg' ), 722 __( 'Email Address', 'wordcamporg' ), 723 __( 'WordPress.org Username', 'wordcamporg' ), 724 __( 'Your Bio', 'wordcamporg' ), 725 __( 'Topic Title', 'wordcamporg' ), 726 __( 'Topic Description', 'wordcamporg' ), 727 __( 'Intended Audience', 'wordcamporg' ), 728 __( 'Past Speaking Experience (not necessary to apply)', 'wordcamporg' ) 729 ) . 730 '</p>', 618 'content' => $this->get_stub_content( 'post', 'call-for-speakers' ), 731 619 'status' => 'draft', 732 620 'type' => 'post', … … 738 626 array( 739 627 'title' => __( 'Call for Volunteers', 'wordcamporg' ), 740 'content' => 741 '<p>' . __( 'Blurb with information for potential volunteers.', 'wordcamporg' ) . '</p> ' . 742 '<p>' . 743 sprintf( ' 744 [contact-form to="%s" subject="%s"] 745 [contact-field label="%s" type="text" required="1" /] 746 [contact-field label="%s" type="email" required="1" /] 747 [contact-field label="%s" type="textarea" required="1" /] 748 [contact-field label="%s" type="text" required="1" /] 749 [contact-field label="%s" type="textarea" /] 750 [/contact-form]', 751 get_option( 'admin_email' ), 752 __( 'WordCamp Volunteer Application', 'wordcamporg' ), 753 __( 'Name', 'wordcamporg' ), 754 __( 'Email', 'wordcamporg' ), 755 __( 'Skills / Interests / Experience (not necessary to volunteer)', 'wordcamporg' ), 756 __( 'Number of Hours Available', 'wordcamporg' ), 757 __( 'Questions / Comments', 'wordcamporg' ) 758 ) . 759 '</p>', 628 'content' => $this->get_stub_content( 'post', 'call-for-volunteers' ), 760 629 'status' => 'draft', 761 630 'type' => 'post', … … 764 633 765 634 return $posts; 635 } 636 637 /** 638 * Load the content for a stub from an include file. 639 * 640 * @param string $post_type 641 * @param string $stub_name 642 * 643 * @return string 644 */ 645 protected function get_stub_content( $post_type, $stub_name ) { 646 $content = ''; 647 $stub_file = WCPT_DIR . "stubs/$post_type/$stub_name.php"; 648 649 if ( is_readable( $stub_file ) ) { 650 ob_start(); 651 require $stub_file; 652 $content = ob_get_clean(); 653 } 654 655 return $content; 766 656 } 767 657
Note: See TracChangeset
for help on using the changeset viewer.