Skip to content

Commit

Permalink
Version 1.7.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
schemapress committed Mar 14, 2021
1 parent e0bc36e commit 21717fd
Show file tree
Hide file tree
Showing 12 changed files with 134 additions and 350 deletions.
10 changes: 6 additions & 4 deletions includes/admin/meta/js/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,24 @@ jQuery(function($) {


// repeated post meta group / show hide main meta box

$('#schema_post_meta_box').hide();

var post_meta_enabled = $("#_schema_post_meta_box_enabled").attr('checked');
var post_meta_enabled = $("#_schema_post_meta_box_enabled").prop('checked');

if (post_meta_enabled)
$('#schema_post_meta_box').show();

$('#_schema_post_meta_box_enabled').change(function(){
var checked = $(this).attr('checked');
var checked = $(this).prop('checked');
if (checked) {
$('#schema_post_meta_box').show();
} else {
$('#schema_post_meta_box').hide();
}
});
});

/*
// repeated post meta group fields
// first, hide all divs inside the repeatable row, which has the advanmced options
$('.meta_box_repeatable_row div').hide();
Expand All @@ -51,6 +53,6 @@ jQuery(function($) {
$(this).html('Advanced <span class="dashicons dashicons-arrow-down-alt2"></span>'); // Advanced options
//$(this).html(this.id);
});

*/

});
263 changes: 2 additions & 261 deletions includes/admin/settings/register-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,58 +484,7 @@ function schema_wp_get_registered_settings() {
)
),

/** Content Settings */

/*
'schemas' => apply_filters( 'schema_wp_settings_schemas',
array(
'about_page' => array(
'id' => 'about_page',
'name' => __( 'About Page', 'schema-wp' ),
'desc' => __( '', 'schema-wp' ),
'type' => 'post_select',
'post_type' => 'page'
),
'contact_page' => array(
'id' => 'contact_page',
'name' => __( 'Contact Page', 'schema-wp' ),
'desc' => __( '', 'schema-wp' ),
'type' => 'post_select',
'post_type' => 'page'
),
'web_page_element' => array(
'id' => 'web_page_element_enable',
'name' => __( 'WPHeader and WPFooter', 'schema-wp' ),
'desc' => __( 'enable?', 'schema-wp' ),
'type' => 'checkbox'
),
'breadcrumbs' => array(
'id' => 'breadcrumbs_enable',
'name' => __( 'Breadcrumbs', 'schema-wp' ),
'desc' => __( 'enable?', 'schema-wp' ),
'type' => 'checkbox'
),
'comments' => array(
'id' => 'comments_enable',
'name' => __( 'Comments', 'schema-wp' ),
'desc' => __( 'enable?', 'schema-wp' ),
'type' => 'checkbox'
),
'video' => array(
'id' => 'video_object_enable',
'name' => __( 'VideoObject', 'schema-wp' ),
'desc' => __( 'enable?', 'schema-wp' ),
'type' => 'checkbox'
),
'audio' => array(
'id' => 'audio_object_enable',
'name' => __( 'AudioObject', 'schema-wp' ),
'desc' => __( 'enable?', 'schema-wp' ),
'type' => 'checkbox'
)
)
),
*/

/** Schemas Settings */
'schemas' => apply_filters( 'schema_wp_settings_schemas',
array(
Expand All @@ -551,46 +500,6 @@ function schema_wp_get_registered_settings() {
'name' => __( 'Comments', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox'
),
'default_image' => array(
'id' => 'default_image',
'class' => 'tr_field_logo',
'name' => __( 'Default image', 'schema-premium' ),
'desc' => __('Specify a default image to be a fallback for missing Featured Images. (should be at least 1200 pixels wide)', 'schema-premium'),
'type' => 'image_upload',
'std' => '',
'readonly' => true,
'premium_feature' => true
)
),
'author' => array(
'author_archive' => array(
'id' => 'author_archive_enable',
'name' => __( 'Author Archives', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'readonly' => true,
'premium_feature' => true
),
'author_url' => array(
'id' => 'author_url_enable',
'name' => __( 'Author URL', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'tooltip_title' => __('Keep disabled', 'schema-premium'),
'tooltip_desc' => __('if you don\'t want to expose author profile url.', 'schema-premium' ),
'readonly' => true,
'premium_feature' => true
),
'gravatar_image' => array(
'id' => 'gravatar_image_enable',
'name' => __( 'Gravatar ImageObject', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'tooltip_title' => __('When enabled', 'schema-premium' ),
'tooltip_desc' => __('User gravatar.com image will be used in author markup.', 'schema-premium' ),
'readonly' => true,
'premium_feature' => true
)
),
'breadcrumbs' => array(
Expand All @@ -599,76 +508,7 @@ function schema_wp_get_registered_settings() {
'name' => __( 'Breadcrumbs', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox'
),
'breadcrumbs_home_enable' => array(
'id' => 'breadcrumbs_home_enable',
'name' => __( 'Show Homepage', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'readonly' => true,
'premium_feature' => true
),
'breadcrumbs_home_text' => array(
'id' => 'breadcrumbs_home_text',
'name' => __( 'Homepage Text', 'schema-premium' ),
'desc' => '',
'type' => 'text',
'std' => __( 'Home', 'schema-premium' ),
'tooltip_title' => __('Change', 'schema-premium'),
'tooltip_desc' => __('Text for the Homepage. Default is Home', 'schema-premium' ),
'readonly' => true,
'premium_feature' => true
),
),
'blog' => array(
'blog_markup' => array(
'id' => 'blog_markup',
'name' => __( 'Blog Markup', 'schema-premium' ),
'desc' => __( '', 'schema-premium' ),
'type' => 'select',
'options' => array(
'' => __('Select Markup Type', 'schema-premium'),
'Blog' => __( 'Blog', 'schema-premium'),
'ItemList' => __( 'ItemList', 'schema-premium')
),
'std' => '',
'readonly' => true,
'premium_feature' => true
),
'category' => array(
'id' => 'category_enable',
'name' => __( 'Categories', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'readonly' => true,
'premium_feature' => true
),
'tag' => array(
'id' => 'tag_enable',
'name' => __( 'Tags', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'readonly' => true,
'premium_feature' => true
),
),
'post_types' => array(
'post_type_archive' => array(
'id' => 'post_type_archive_enable',
'name' => __( 'Post Type Archives', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'readonly' => true,
'premium_feature' => true
),
'taxonomy' => array(
'id' => 'taxonomy_enable',
'name' => __( 'Taxonomies', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'readonly' => true,
'premium_feature' => true
),
)
),
'special_pages' => array(
'about_page' => array(
Expand All @@ -695,34 +535,13 @@ function schema_wp_get_registered_settings() {
'tooltip_title' => __('When enabled', 'schema-premium'),
'tooltip_desc' => __('Schema plugin will fetch video data automatically from embedded video. (configure it under Schema > Types)', 'schema-premium'),
),
'video_meta' => array(
'id' => 'video_object_meta_enable',
'name' => __( 'VideoObject meta', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'tooltip_title' => __('When enabled', 'schema-premium'),
'tooltip_desc' => __('Schema plugin will show new post meta feilds to allow you insert video details in page editor.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
),
'audio' => array(
'id' => 'audio_object_enable',
'name' => __( 'AudioObject', 'schema-premium' ),
'desc' => __( 'enable?', 'schema-premium' ),
'type' => 'checkbox',
'tooltip_title' => __('When enabled', 'schema-premium'),
'tooltip_desc' => __('Schema plugin will fetch audio data automatically from embedded audio. (configure it under Schema > Types)', 'schema-premium'),
),
'youtube_api_key' => array(
'id' => 'youtube_api_key',
'name' => __( 'YouTube API Key', 'schema-premium' ),
'desc' => '<br><br>' . __('Obtain a YouTube API Key from your Google Developer console.', 'schema-premium'),
'type' => 'text',
'std' => '',
'tooltip_title' => __('When used', 'schema-premium'),
'tooltip_desc' => __('Schema plugin will use YoouTube API to fetch video data automatically.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
)
)
)
Expand All @@ -745,81 +564,6 @@ function schema_wp_get_registered_settings() {
'name' => __( 'Delete Data on Uninstall?', 'schema-premium' ),
'desc' => __( 'Check this box if you would like Schema to completely remove all of its data when uninstalling via Plugins > Delete.', 'schema-premium' ),
'type' => 'checkbox'
),
'schema_output_location' => array(
'id' => 'schema_output_location',
'name' => __( 'Schema Markup Output', 'schema-premium' ),
'desc' => '',
'type' => 'select',
'options' => array(
'head' => __( 'Head', 'schema-premium'),
'footer' => __( 'Footer', 'schema-premium')
),
'std' => 'head',
'tooltip_title' => __('Schema markup script output', 'schema-premium'),
'tooltip_desc' => __('Choose where to output the schema.org json-ld markup.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
),
'json_ld_output_format' => array(
'id' => 'json_ld_output_format',
'name' => __( 'JSON-LD Output Format', 'schema-premium' ),
'desc' => '',
'type' => 'select',
'options' => array(
'minified' => __( 'Minified', 'schema-premium'),
'pretty_print' => __( 'Pretty Print', 'schema-premium')
),
'std' => 'minified',
'tooltip_title' => __('Schema markup script output', 'schema-premium'),
'tooltip_desc' => __('Choose the output format of the schema.org json-ld markup.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
),
'schema_test_link' => array(
'id' => 'schema_test_link',
'name' => __( 'Enable Test Schema Link in Admin Top Toolbar?', 'schema-premium' ),
'desc' => '',
'type' => 'select',
'options' => array(
'yes' => __( 'Yes', 'schema-premium'),
'no' => __( 'No', 'schema-premium')
),
'std' => 'yes',
'tooltip_title' => __('When enabled', 'schema-premium'),
'tooltip_desc' => __('Schema plugin will show a Test link in admin toolbar. Clicking on that link will take you directly to Google Rich Snippets Testing Tool.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
),
'properties_instructions' => array(
'id' => 'properties_instructions_enable',
'name' => __( 'Enable Properties Instructions?', 'schema-premium' ),
'desc' => '',
'type' => 'select',
'options' => array(
'yes' => __( 'Yes', 'schema-premium'),
'no' => __( 'No', 'schema-premium')
),
'std' => 'no',
'tooltip_title' => __('When enabled', 'schema-premium'),
'tooltip_desc' => __('Instructions will show under each property post meta field.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
),
'acf_admin_menu_show' => array(
'id' => 'acf_admin_menu_show',
'name' => __( 'Enable ACF PRO admin menu?', 'schema-premium' ),
'desc' => '',
'type' => 'select',
'options' => array(
'yes' => __( 'Yes', 'schema-premium'),
'no' => __( 'No', 'schema-premium')
),
'std' => 'no',
'tooltip_title' => __('When enabled', 'schema-premium'),
'tooltip_desc' => __('Schema Premium plugin will show Advanced Custom Fields (ACF) admin menu item.', 'schema-premium'),
'readonly' => true,
'premium_feature' => true
)
)
)
Expand Down Expand Up @@ -1078,10 +822,7 @@ function schema_wp_get_registered_settings_sections() {
) ),
'schemas' => apply_filters( 'schema_wp_settings_sections_schemas', array(
'general' => __( 'General', 'schema-premium' ),
'author' => __( 'Author', 'schema-premium' ),
'breadcrumbs' => __( 'Breadcrumbs', 'schema-premium' ),
'blog' => __( 'Blog', 'schema-premium' ),
'post_types' => __( 'Post Types', 'schema-premium' ),
'special_pages' => __( 'Special Pages', 'schema-premium' ),
'embeds' => __( 'Embeds', 'schema-premium' ),
) ),
Expand Down
17 changes: 17 additions & 0 deletions includes/deprecated-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,20 @@ function schema_wp_first_post_date( $format = 'Y-m-d' ) {

return $output;
}


/**
* Truncate a string of content to 110 characters, respecting full words.
*
* @since 1.7.1
* @return string
*/
function schema_wp_get_truncate_to_word_deprecated( $string, $limit = 110, $end = '...' ) {

$limit = apply_filters( 'schema_wp_truncate_to_word_limit', $limit );
$limit = $limit - strlen($end); // Take into account $end string into the limit
$string = substr($string, 0, $limit);
$string = substr($string, 0, strrpos($string, ' ')) . $end;

return $string;
}
2 changes: 1 addition & 1 deletion includes/extensions/author.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function schema_wp_get_author_array( $post_id = null ) {
function schema_wp_validate_gravatar( $email ) {

$hashkey = md5(strtolower(trim($email)));
$uri = 'http://www.gravatar.com/avatar/' . $hashkey;
$uri = 'https://www.gravatar.com/avatar/' . $hashkey;
$data = get_transient($hashkey);

if (false === $data) {
Expand Down
2 changes: 1 addition & 1 deletion includes/integrations/thesis.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Thesis Theme 2.x integration
*
*
* plugin url: http://diythemes.com/
* plugin url: https://diythemes.com/
* @since 1.4
*/

Expand Down
Loading

0 comments on commit 21717fd

Please sign in to comment.