[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentytwenty/inc/ -> starter-content.php (source)

   1  <?php
   2  /**
   3   * Twenty Twenty Starter Content
   4   *
   5   * @link https://make.wordpress.org/core/2016/11/30/starter-content-for-themes-in-4-7/
   6   *
   7   * @package WordPress
   8   * @subpackage Twenty_Twenty
   9   * @since Twenty Twenty 1.0
  10   */
  11  
  12  /**
  13   * Function to return the array of starter content for the theme.
  14   *
  15   * Passes it through the `twentytwenty_starter_content` filter before returning.
  16   *
  17   * @since Twenty Twenty 1.0
  18   *
  19   * @return array A filtered array of args for the starter_content.
  20   */
  21  function twentytwenty_get_starter_content() {
  22  
  23      // Define and register starter content to showcase the theme on new sites.
  24      $starter_content = array(
  25          'widgets'     => array(
  26              // Place one core-defined widgets in the first footer widget area.
  27              'sidebar-1' => array(
  28                  'text_about',
  29              ),
  30              // Place one core-defined widgets in the second footer widget area.
  31              'sidebar-2' => array(
  32                  'text_business_info',
  33              ),
  34          ),
  35  
  36          // Create the custom image attachments used as post thumbnails for pages.
  37          'attachments' => array(
  38              'image-opening' => array(
  39                  'post_title' => _x( 'The New UMoMA Opens its Doors', 'Theme starter content', 'twentytwenty' ),
  40                  'file'       => 'assets/images/2020-landscape-1.png', // URL relative to the template directory.
  41              ),
  42          ),
  43  
  44          // Specify the core-defined pages to create and add custom thumbnails to some of them.
  45          'posts'       => array(
  46              'front' => array(
  47                  'post_type'    => 'page',
  48                  'post_title'   => __( 'The New UMoMA Opens its Doors', 'twentytwenty' ),
  49                  // Use the above featured image with the predefined about page.
  50                  'thumbnail'    => '{{image-opening}}',
  51                  'post_content' => implode(
  52                      '',
  53                      array(
  54                          '<!-- wp:group {"align":"wide"} -->',
  55                          '<div class="wp-block-group alignwide"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
  56                          '<h2 class="has-text-align-center">' . __( 'The premier destination for modern art in Northern Sweden. Open from 10 AM to 6 PM every day during the summer months.', 'twentytwenty' ) . '</h2>',
  57                          '<!-- /wp:heading --></div></div>',
  58                          '<!-- /wp:group -->',
  59                          '<!-- wp:columns {"align":"wide"} -->',
  60                          '<div class="wp-block-columns alignwide"><!-- wp:column -->',
  61                          '<div class="wp-block-column"><!-- wp:group -->',
  62                          '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
  63                          '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
  64                          '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-1.png" alt="" class="wp-image-37"/></figure>',
  65                          '<!-- /wp:image -->',
  66                          '<!-- wp:heading {"level":3} -->',
  67                          '<h3>' . __( 'Works and Days', 'twentytwenty' ) . '</h3>',
  68                          '<!-- /wp:heading -->',
  69                          '<!-- wp:paragraph -->',
  70                          '<p>' . __( 'August 1 -- December 1', 'twentytwenty' ) . '</p>',
  71                          '<!-- /wp:paragraph -->',
  72                          '<!-- wp:button {"className":"is-style-outline"} -->',
  73                          '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link" href="https://make.wordpress.org/core/2019/09/27/block-editor-theme-related-updates-in-wordpress-5-3/">' . __( 'Read More', 'twentytwenty' ) . '</a></div>',
  74                          '<!-- /wp:button --></div></div>',
  75                          '<!-- /wp:group -->',
  76                          '<!-- wp:group -->',
  77                          '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
  78                          '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
  79                          '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-3.png" alt="" class="wp-image-37"/></figure>',
  80                          '<!-- /wp:image -->',
  81                          '<!-- wp:heading {"level":3} -->',
  82                          '<h3>' . __( 'Theatre of Operations', 'twentytwenty' ) . '</h3>',
  83                          '<!-- /wp:heading -->',
  84                          '<!-- wp:paragraph -->',
  85                          '<p>' . __( 'October 1 -- December 1', 'twentytwenty' ) . '</p>',
  86                          '<!-- /wp:paragraph -->',
  87                          '<!-- wp:button {"className":"is-style-outline"} -->',
  88                          '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link" href="https://make.wordpress.org/core/2019/09/27/block-editor-theme-related-updates-in-wordpress-5-3/">' . __( 'Read More', 'twentytwenty' ) . '</a></div>',
  89                          '<!-- /wp:button --></div></div>',
  90                          '<!-- /wp:group --></div>',
  91                          '<!-- /wp:column -->',
  92                          '<!-- wp:column -->',
  93                          '<div class="wp-block-column"><!-- wp:group -->',
  94                          '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
  95                          '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
  96                          '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-2.png" alt="" class="wp-image-37"/></figure>',
  97                          '<!-- /wp:image -->',
  98                          '<!-- wp:heading {"level":3} -->',
  99                          '<h3>' . __( 'The Life I Deserve', 'twentytwenty' ) . '</h3>',
 100                          '<!-- /wp:heading -->',
 101                          '<!-- wp:paragraph -->',
 102                          '<p>' . __( 'August 1 -- December 1', 'twentytwenty' ) . '</p>',
 103                          '<!-- /wp:paragraph -->',
 104                          '<!-- wp:button {"className":"is-style-outline"} -->',
 105                          '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link" href="https://make.wordpress.org/core/2019/09/27/block-editor-theme-related-updates-in-wordpress-5-3/">' . __( 'Read More', 'twentytwenty' ) . '</a></div>',
 106                          '<!-- /wp:button --></div></div>',
 107                          '<!-- /wp:group -->',
 108                          '<!-- wp:group -->',
 109                          '<div class="wp-block-group"><div class="wp-block-group__inner-container">',
 110                          '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
 111                          '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-three-quarters-4.png" alt="" class="wp-image-37"/></figure>',
 112                          '<!-- /wp:image -->',
 113                          '<!-- wp:heading {"level":3} -->',
 114                          '<h3>' . __( 'From Signac to Matisse', 'twentytwenty' ) . '</h3>',
 115                          '<!-- /wp:heading -->',
 116                          '<!-- wp:paragraph -->',
 117                          '<p>' . __( 'October 1 -- December 1', 'twentytwenty' ) . '</p>',
 118                          '<!-- /wp:paragraph -->',
 119                          '<!-- wp:button {"className":"is-style-outline"} -->',
 120                          '<div class="wp-block-button is-style-outline"><a class="wp-block-button__link" href="https://make.wordpress.org/core/2019/09/27/block-editor-theme-related-updates-in-wordpress-5-3/">' . __( 'Read More', 'twentytwenty' ) . '</a></div>',
 121                          '<!-- /wp:button --></div></div>',
 122                          '<!-- /wp:group --></div>',
 123                          '<!-- /wp:column --></div>',
 124                          '<!-- /wp:columns -->',
 125                          '<!-- wp:image {"align":"full","id":37,"sizeSlug":"full"} -->',
 126                          '<figure class="wp-block-image alignfull size-full"><img src="' . get_theme_file_uri() . '/assets/images/2020-landscape-2.png" alt="" class="wp-image-37"/></figure>',
 127                          '<!-- /wp:image -->',
 128                          '<!-- wp:group {"align":"wide"} -->',
 129                          '<div class="wp-block-group alignwide"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center","textColor":"accent"} -->',
 130                          '<h2 class="has-accent-color has-text-align-center">' . __( '&#8220;Cyborgs, as the philosopher Donna Haraway established, are not reverent. They do not remember the cosmos.&#8221;', 'twentytwenty' ) . '</h2>',
 131                          '<!-- /wp:heading --></div></div>',
 132                          '<!-- /wp:group -->',
 133                          '<!-- wp:paragraph {"dropCap":true} -->',
 134                          '<p class="has-drop-cap">' . __( 'With seven floors of striking architecture, UMoMA shows exhibitions of international contemporary art, sometimes along with art historical retrospectives. Existential, political and philosophical issues are intrinsic to our programme. As visitor you are invited to guided tours artist talks, lectures, film screenings and other events with free admission', 'twentytwenty' ) . '</p>',
 135                          '<!-- /wp:paragraph -->',
 136                          '<!-- wp:paragraph -->',
 137                          '<p>' . __( 'The exhibitions are produced by UMoMA in collaboration with artists and museums around the world and they often attract international attention. UMoMA has received a Special Commendation from the European Museum of the Year, and was among the top candidates for the Swedish Museum of the Year Award as well as for the Council of Europe Museum Prize.', 'twentytwenty' ) . '</p>',
 138                          '<!-- /wp:paragraph -->',
 139                          '<!-- wp:paragraph -->',
 140                          '<p></p>',
 141                          '<!-- /wp:paragraph -->',
 142                          '<!-- wp:group {"customBackgroundColor":"#ffffff","align":"wide"} -->',
 143                          '<div class="wp-block-group alignwide has-background" style="background-color:#ffffff"><div class="wp-block-group__inner-container"><!-- wp:group -->',
 144                          '<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:heading {"align":"center"} -->',
 145                          '<h2 class="has-text-align-center">' . __( 'Become a Member and Get Exclusive Offers!', 'twentytwenty' ) . '</h2>',
 146                          '<!-- /wp:heading -->',
 147                          '<!-- wp:paragraph {"align":"center"} -->',
 148                          '<p class="has-text-align-center">' . __( 'Members get access to exclusive exhibits and sales. Our memberships cost $99.99 and are billed annually.', 'twentytwenty' ) . '</p>',
 149                          '<!-- /wp:paragraph -->',
 150                          '<!-- wp:button {"align":"center"} -->',
 151                          '<div class="wp-block-button aligncenter"><a class="wp-block-button__link" href="https://make.wordpress.org/core/2019/09/27/block-editor-theme-related-updates-in-wordpress-5-3/">' . __( 'Join the Club', 'twentytwenty' ) . '</a></div>',
 152                          '<!-- /wp:button --></div></div>',
 153                          '<!-- /wp:group --></div></div>',
 154                          '<!-- /wp:group -->',
 155                          '<!-- wp:gallery {"ids":[39,38],"align":"wide"} -->',
 156                          '<figure class="wp-block-gallery alignwide columns-2 is-cropped"><ul class="blocks-gallery-grid"><li class="blocks-gallery-item"><figure><img src="' . get_theme_file_uri() . '/assets/images/2020-square-2.png" alt="" data-id="39" data-full-url="' . get_theme_file_uri() . '/assets/images/2020-square-2.png" data-link="assets/images/2020-square-2/" class="wp-image-39"/></figure></li><li class="blocks-gallery-item"><figure><img src="' . get_theme_file_uri() . '/assets/images/2020-square-1.png" alt="" data-id="38" data-full-url="' . get_theme_file_uri() . '/assets/images/2020-square-1.png" data-link="' . get_theme_file_uri() . '/assets/images/2020-square-1/" class="wp-image-38"/></figure></li></ul></figure>',
 157                          '<!-- /wp:gallery -->',
 158                      )
 159                  ),
 160              ),
 161              'about',
 162              'contact',
 163              'blog',
 164          ),
 165  
 166          // Default to a static front page and assign the front and posts pages.
 167          'options'     => array(
 168              'show_on_front'  => 'page',
 169              'page_on_front'  => '{{front}}',
 170              'page_for_posts' => '{{blog}}',
 171          ),
 172  
 173          // Set up nav menus for each of the two areas registered in the theme.
 174          'nav_menus'   => array(
 175              // Assign a menu to the "primary" location.
 176              'primary'  => array(
 177                  'name'  => __( 'Primary', 'twentytwenty' ),
 178                  'items' => array(
 179                      'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
 180                      'page_about',
 181                      'page_blog',
 182                      'page_contact',
 183                  ),
 184              ),
 185              // This replicates primary just to demonstrate the expanded menu.
 186              'expanded' => array(
 187                  'name'  => __( 'Primary', 'twentytwenty' ),
 188                  'items' => array(
 189                      'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
 190                      'page_about',
 191                      'page_blog',
 192                      'page_contact',
 193                  ),
 194              ),
 195              // Assign a menu to the "social" location.
 196              'social'   => array(
 197                  'name'  => __( 'Social Links Menu', 'twentytwenty' ),
 198                  'items' => array(
 199                      'link_yelp',
 200                      'link_facebook',
 201                      'link_twitter',
 202                      'link_instagram',
 203                      'link_email',
 204                  ),
 205              ),
 206          ),
 207      );
 208  
 209      /**
 210       * Filters Twenty Twenty array of starter content.
 211       *
 212       * @since Twenty Twenty 1.0
 213       *
 214       * @param array $starter_content Array of starter content.
 215       */
 216      return apply_filters( 'twentytwenty_starter_content', $starter_content );
 217  }


Generated : Fri Nov 15 08:20:01 2024 Cross-referenced by PHPXref