/** * Add default fields */ public function add_default_fields() { $fields = array(new WPSEO_Config_Field_Upsell_Configuration_Service(), new WPSEO_Config_Field_Upsell_Site_Review(), new WPSEO_Config_Field_Success_Message(), new WPSEO_Config_Field_Mailchimp_Signup(), new WPSEO_Config_Field_Environment(), new WPSEO_Config_Field_Site_Type(), new WPSEO_Config_Field_Multiple_Authors(), new WPSEO_Config_Field_Site_Name(), new WPSEO_Config_Field_Separator(), new WPSEO_Config_Field_Social_Profiles_Intro(), new WPSEO_Config_Field_Profile_URL_Facebook(), new WPSEO_Config_Field_Profile_URL_Twitter(), new WPSEO_Config_Field_Profile_URL_Instagram(), new WPSEO_Config_Field_Profile_URL_LinkedIn(), new WPSEO_Config_Field_Profile_URL_MySpace(), new WPSEO_Config_Field_Profile_URL_Pinterest(), new WPSEO_Config_Field_Profile_URL_YouTube(), new WPSEO_Config_Field_Profile_URL_GooglePlus(), new WPSEO_Config_Field_Company_Or_Person(), new WPSEO_Config_Field_Company_Name(), new WPSEO_Config_Field_Company_Logo(), new WPSEO_Config_Field_Person_Name(), new WPSEO_Config_Field_Post_Type_Visibility()); $post_type_factory = new WPSEO_Config_Factory_Post_Type(); $fields = array_merge($fields, $post_type_factory->get_fields()); foreach ($fields as $field) { $this->add_field($field); } }
/** * WPSEO_Configuration_Structure constructor. */ public function __construct() { $this->add_step('intro', __('Welcome!', 'wordpress-seo'), array('upsellConfigurationService', 'mailchimpSignup')); $this->add_step('environment_type', __('Environment', 'wordpress-seo'), array('environment_type')); $this->add_step('siteType', __('Site type', 'wordpress-seo'), array('siteType')); $this->add_step('publishingEntity', __('Company or person', 'wordpress-seo'), array('publishingEntity', 'publishingEntityType', 'publishingEntityCompanyName', 'publishingEntityCompanyLogo', 'publishingEntityPersonName')); $this->add_step('profileUrls', __('Social profiles', 'wordpress-seo'), array('socialProfilesIntro', 'profileUrlFacebook', 'profileUrlTwitter', 'profileUrlInstagram', 'profileUrlLinkedIn', 'profileUrlMySpace', 'profileUrlPinterest', 'profileUrlYouTube', 'profileUrlGooglePlus')); $fields = array('postTypeVisibility'); $post_type_factory = new WPSEO_Config_Factory_Post_Type(); foreach ($post_type_factory->get_fields() as $post_type_field) { $fields[] = $post_type_field->get_identifier(); } $this->add_step('postTypeVisibility', __('Post type visibility', 'wordpress-seo'), $fields); $this->add_step('multipleAuthors', __('Multiple authors', 'wordpress-seo'), array('multipleAuthors')); $this->add_step('connectGoogleSearchConsole', __('Google Search Console', 'wordpress-seo'), array('connectGoogleSearchConsole')); $this->add_step('titleTemplate', __('Title settings', 'wordpress-seo'), array('siteName', 'separator')); $this->add_step('success', __('Success!', 'wordpress-seo'), array('successMessage', 'upsellSiteReview', 'mailchimpSignup')); }