Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
rami-elementor committed Sep 29, 2023
1 parent 738c430 commit 5d9f15d
Show file tree
Hide file tree
Showing 4 changed files with 394 additions and 403 deletions.
30 changes: 12 additions & 18 deletions assets/dev/js/admin/pages/main-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const MainPage = () => {
help={
sprintf(
/* translators: %s: The <head> tag. */
__( 'Meta tag containing the post/page excerpt, in the %s.', 'hello-elementor' ),
__( 'A meta tag that contains the post/page excerpt, in the %s.', 'hello-elementor' ),
'<head>',
)
}
Expand Down Expand Up @@ -188,61 +188,55 @@ export const MainPage = () => {

<ToggleControl
label={ __( 'Remove generator tag', 'hello-elementor' ) }
help={ __( 'Links to the websites internal URLs with a short format.', 'hello-elementor' ) }
help={ __( 'A meta tag that contains the WordPress version.', 'hello-elementor' ) }
checked={ settingsData._generator || false }
onChange={ ( value ) => updateSettings( '_generator', value ) }
/>
<code className="code-example"> &lt;meta name=&quot;generator&quot; content=&quot;WordPress x.x.x&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove WordPress shortlink', 'hello-elementor' ) }
help={ __( 'Links to the websites internal URLs with a short format.', 'hello-elementor' ) }
help={ __( 'A link tag that contains the page URL in a short format.', 'hello-elementor' ) }
checked={ settingsData._shortlink || false }
onChange={ ( value ) => updateSettings( '_shortlink', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;shortlink&quot; href=&quot;https://example.com/?p=1&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove WLW link', 'hello-elementor' ) }
help={ __( 'WLW links provide access to external systems to publish content to your website.', 'hello-elementor' ) }
help={ __( 'A link tag that contains the WLW endpoint which provides access to external systems to publish content on the website.', 'hello-elementor' ) }
checked={ settingsData._wlw || false }
onChange={ ( value ) => updateSettings( '_wlw', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;wlwmanifest&quot; type=&quot;application/wlwmanifest+xml&quot; href=&quot;https://example.com//wp-includes/wlwmanifest.xml&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove RSD link', 'hello-elementor' ) }
help={ __( 'RSD links provide access to external systems to publish content to your website.', 'hello-elementor' ) }
help={ __( 'A link tag that contains the RSD endpoint which provides access to external systems to publish content on the website.', 'hello-elementor' ) }
checked={ settingsData._rsd || false }
onChange={ ( value ) => updateSettings( '_rsd', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;EditURI&quot; type=&quot;application/rsd+xml&quot; title=&quot;RSD&quot; href=&quot;https://example.com/xmlrpc.php?rsd&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove oEmbed link', 'hello-elementor' ) }
help={ __( 'oEmbed discovery links provide the endpoint URL for embedding your content on other websites.', 'hello-elementor' ) }
help={ __( 'A link tag that contains the oEmbed endpoint which provides the discovery link for embedding your content on other websites.', 'hello-elementor' ) }
checked={ settingsData._oembed || false }
onChange={ ( value ) => updateSettings( '_oembed', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;alternate&quot; type=&quot;application/json+oembed&quot; href=&quot;https://example.com/wp-json/oembed/1.0/embed?url=...&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove WordPress sitemap link', 'hello-elementor' ) }
help={
sprintf(
/* translators: %s: wp-sitemap.xml. */
__( 'Sitemap index containing the path to the %s file.', 'hello-elementor' ),
'wp-sitemap.xml',
)
}
help={ __( 'A link tag that contains the sitemap endpoint.', 'hello-elementor' ) }
checked={ settingsData._wp_sitemap || false }
onChange={ ( value ) => updateSettings( '_wp_sitemap', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;sitemap&quot; href=&quot;https://example.com/wp-sitemap.xml&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove post relational links', 'hello-elementor' ) }
help={ __( 'Relational links for the posts adjacent to the current post for single post pages.', 'hello-elementor' ) }
help={ __( 'Link tags in single posts that contain URLs for the next & previous posts.', 'hello-elementor' ) }
checked={ settingsData._post_prev_next || false }
onChange={ ( value ) => updateSettings( '_post_prev_next', value ) }
/>
Expand All @@ -255,23 +249,23 @@ export const MainPage = () => {

<ToggleControl
label={ __( 'Remove site RSS feed', 'hello-elementor' ) }
help={ __( 'RSS feed link for website\'s content.', 'hello-elementor' ) }
help={ __( 'A link tag that contains the RSS feed endpoint for website\'s content.', 'hello-elementor' ) }
checked={ settingsData._site_rss || false }
onChange={ ( value ) => updateSettings( '_site_rss', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Feed&quot; href=&quot;https://example.com/feed/&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove remove comments RSS feed', 'hello-elementor' ) }
help={ __( 'RSS feed link for website\'s comments.', 'hello-elementor' ) }
label={ __( 'Remove site comments RSS feed', 'hello-elementor' ) }
help={ __( 'A link tag that contains the RSS feed endpoint for website\'s comments.', 'hello-elementor' ) }
checked={ settingsData._comments_rss || false }
onChange={ ( value ) => updateSettings( '_comments_rss', value ) }
/>
<code className="code-example"> &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;Comments Feed&quot; href=&quot;https://example.com/comments/feed/&quot; /&gt; </code>

<ToggleControl
label={ __( 'Remove post comments RSS feed', 'hello-elementor' ) }
help={ __( 'RSS feed link for post\'s comments.', 'hello-elementor' ) }
help={ __( 'A link tag that contains the RSS feed endpoint for post\'s comments.', 'hello-elementor' ) }
checked={ settingsData._post_comments_rss || false }
onChange={ ( value ) => updateSettings( '_post_comments_rss', value ) }
/>
Expand Down
19 changes: 3 additions & 16 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,13 @@ function hello_elementor_add_description_meta_tag() {
}
add_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );

if ( ! function_exists( 'hello_elementor_settings_panel' ) ) {
/**
* Add theme settings panel.
*
* @return void
*/
function hello_elementor_settings_panel() {
include_once get_template_directory() . '/includes/settings/settings-panel.php';
new HelloElementor\Includes\Settings\Settings_Panel();
}
}
add_action( 'init', 'hello_elementor_settings_panel', 0 );

// Admin notice
if ( is_admin() ) {
require get_template_directory() . '/includes/admin-functions.php';
}

/**
* If Elementor is installed and active, we can load the Elementor-specific Settings & Features
*/
// Settings page
require get_template_directory() . '/includes/settings-functions.php';

// Allow active/inactive via the Experiments
require get_template_directory() . '/includes/elementor-functions.php';
Expand Down
Loading

0 comments on commit 5d9f15d

Please sign in to comment.