Changeset 1719627
- Timestamp:
- 08/25/2017 10:30:01 PM (9 years ago)
- Location:
- helpful-features/trunk
- Files:
-
- 2 edited
-
css/form-style.css (modified) (1 diff)
-
helpful-features.php (modified) (38 diffs)
Legend:
- Unmodified
- Added
- Removed
-
helpful-features/trunk/css/form-style.css
r1719453 r1719627 9 9 input[type=date], 10 10 input[type=tel], 11 input[type=url], 11 12 input[type=email], 12 13 input[type=number], -
helpful-features/trunk/helpful-features.php
r1719453 r1719627 9 9 Author: OXSN 10 10 Author URI: https://profiles.wordpress.org/oxsn 11 Version: 0.2. 911 Version: 0.2.10 12 12 */ 13 13 … … 861 861 'section' => 'hefe_getting_started_customizer_section', 862 862 'label' => 'Shortcode Name', 863 'description' => __('Enter the name you want all shortcodes to begin with.'),863 'description' => 'Enter the name you want all shortcodes to begin with.', 864 864 'input_attrs' => array( 865 865 'placeholder' => 'client_name', 866 866 ), 867 867 ))); 868 $wp_customize->add_setting('hefe_ getting_started_customizer_control_disable_admin_bar_by_user_roles', array(869 'type' => 'option', 870 )); 871 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_disable_admin_bar_by_user_roles', array(868 $wp_customize->add_setting('hefe_customizer_control_disable_admin_bar_by_user_roles', array( 869 'type' => 'option', 870 )); 871 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_disable_admin_bar_by_user_roles', array( 872 872 'type' => '', 873 873 'priority' => '', 874 874 'section' => 'hefe_getting_started_customizer_section', 875 875 'label' => 'Disable Admin Bar', 876 'description' => __('Disable the admin bar for only a list of comma seperated user roles.'),876 'description' => 'Disable the admin bar for only a list of comma seperated user roles.', 877 877 'input_attrs' => array( 878 878 'placeholder' => 'editor,subscriber', 879 879 ), 880 880 ))); 881 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enable_admin_bar_by_user_roles', array(882 'type' => 'option', 883 )); 884 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enable_admin_bar_by_user_roles', array(881 $wp_customize->add_setting('hefe_customizer_control_enable_admin_bar_by_user_roles', array( 882 'type' => 'option', 883 )); 884 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enable_admin_bar_by_user_roles', array( 885 885 'type' => '', 886 886 'priority' => '', 887 887 'section' => 'hefe_getting_started_customizer_section', 888 888 'label' => 'Enable Admin Bar', 889 'description' => __('Enable the admin bar for only a list of comma seperated user roles.'),889 'description' => 'Enable the admin bar for only a list of comma seperated user roles.', 890 890 'input_attrs' => array( 891 891 'placeholder' => 'editor,subscriber', 892 892 ), 893 893 ))); 894 $wp_customize->add_setting('hefe_ getting_started_customizer_control_exclude_from_search_page_ids', array(895 'type' => 'option', 896 )); 897 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_exclude_from_search_page_ids', array(894 $wp_customize->add_setting('hefe_customizer_control_exclude_from_search_page_ids', array( 895 'type' => 'option', 896 )); 897 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_exclude_from_search_page_ids', array( 898 898 'type' => '', 899 899 'priority' => '', … … 905 905 ), 906 906 ))); 907 $wp_customize->add_setting('hefe_ getting_started_customizer_control_exclude_from_search_post_types', array(908 'type' => 'option', 909 )); 910 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_exclude_from_search_post_types', array(907 $wp_customize->add_setting('hefe_customizer_control_exclude_from_search_post_types', array( 908 'type' => 'option', 909 )); 910 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_exclude_from_search_post_types', array( 911 911 'type' => '', 912 912 'priority' => '', 913 913 'section' => 'hefe_getting_started_customizer_section', 914 914 'label' => 'Exclude Post Types From Search', 915 'description' => __('Exclude pages from the search by a list of comma seperated post types.'),915 'description' => 'Exclude pages from the search by a list of comma seperated post types.', 916 916 'input_attrs' => array( 917 917 'placeholder' => 'page,post', 918 918 ), 919 919 ))); 920 $wp_customize->add_setting('hefe_ getting_started_customizer_control_google_analytics_ua_code', array(921 'type' => 'option', 922 )); 923 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_google_analytics_ua_code', array(920 $wp_customize->add_setting('hefe_customizer_control_google_analytics_ua_code', array( 921 'type' => 'option', 922 )); 923 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_google_analytics_ua_code', array( 924 924 'type' => '', 925 925 'priority' => '', … … 931 931 ), 932 932 ))); 933 $wp_customize->add_setting('hefe_ getting_started_customizer_control_google_fonts_url', array(934 'type' => 'option', 935 )); 936 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_google_fonts_url', array(933 $wp_customize->add_setting('hefe_customizer_control_google_fonts_url', array( 934 'type' => 'option', 935 )); 936 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_google_fonts_url', array( 937 937 'type' => '', 938 938 'priority' => '', … … 944 944 ), 945 945 ))); 946 $wp_customize->add_setting('hefe_ getting_started_customizer_control_home_post_type_post_types', array(946 $wp_customize->add_setting('hefe_customizer_control_home_post_type_post_types', array( 947 947 'type' => 'option', 948 948 'default' => '', 949 949 )); 950 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_home_post_type_post_types', array(950 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_home_post_type_post_types', array( 951 951 'type' => '', 952 952 'priority' => '', … … 958 958 ), 959 959 ))); 960 $wp_customize->add_setting('hefe_ getting_started_customizer_control_home_post_type_status', array(960 $wp_customize->add_setting('hefe_customizer_control_home_post_type_status', array( 961 961 'type' => 'option', 962 962 'default' => 'any', 963 963 )); 964 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_home_post_type_status', array(964 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_home_post_type_status', array( 965 965 'type' => '', 966 966 'priority' => '', … … 972 972 ), 973 973 ))); 974 $wp_customize->add_setting('hefe_ getting_started_customizer_control_custom_author_base', array(974 $wp_customize->add_setting('hefe_customizer_control_custom_author_base', array( 975 975 'type' => 'option', 976 976 'default' => 'author', 977 977 )); 978 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_custom_author_base', array(978 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_custom_author_base', array( 979 979 'type' => '', 980 980 'priority' => '', … … 986 986 ), 987 987 ))); 988 $wp_customize->add_setting('hefe_ getting_started_customizer_control_home_page_random_order', array(988 $wp_customize->add_setting('hefe_customizer_control_home_page_random_order', array( 989 989 'type' => 'option', 990 990 'sanitize_callback' => 'sanitize_text_field', 991 991 'default' => '', 992 992 )); 993 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_home_page_random_order', array(993 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_home_page_random_order', array( 994 994 'type' => 'checkbox', 995 995 'priority' => '', … … 998 998 'description' => 'Would you like the home page to randomize the post order?', 999 999 ))); 1000 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_colors', array(1000 $wp_customize->add_setting('hefe_customizer_control_enqueue_colors', array( 1001 1001 'type' => 'option', 1002 1002 'sanitize_callback' => 'sanitize_text_field', 1003 1003 'default' => '', 1004 1004 )); 1005 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_colors', array(1005 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_colors', array( 1006 1006 'type' => 'checkbox', 1007 1007 'priority' => '', … … 1010 1010 'description' => 'Would you like Colors code loaded on every page of your site?', 1011 1011 ))); 1012 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_form', array(1012 $wp_customize->add_setting('hefe_customizer_control_enqueue_form', array( 1013 1013 'type' => 'option', 1014 1014 'sanitize_callback' => 'sanitize_text_field', 1015 1015 'default' => '', 1016 1016 )); 1017 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_form', array(1017 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_form', array( 1018 1018 'type' => 'checkbox', 1019 1019 'priority' => '', … … 1022 1022 'description' => 'Would you like Form code loaded on every page of your site?', 1023 1023 ))); 1024 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_theme', array(1024 $wp_customize->add_setting('hefe_customizer_control_enqueue_theme', array( 1025 1025 'type' => 'option', 1026 1026 'sanitize_callback' => 'sanitize_text_field', 1027 1027 'default' => '', 1028 1028 )); 1029 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_theme', array(1029 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_theme', array( 1030 1030 'type' => 'checkbox', 1031 1031 'priority' => '', … … 1034 1034 'description' => 'Would you like Theme code loaded on every page of your site?', 1035 1035 ))); 1036 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_wordpress', array(1036 $wp_customize->add_setting('hefe_customizer_control_enqueue_wordpress', array( 1037 1037 'type' => 'option', 1038 1038 'sanitize_callback' => 'sanitize_text_field', 1039 1039 'default' => '', 1040 1040 )); 1041 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_wordpress', array(1041 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_wordpress', array( 1042 1042 'type' => 'checkbox', 1043 1043 'priority' => '', … … 1046 1046 'description' => 'Would you like WordPress code loaded on every page of your site?', 1047 1047 ))); 1048 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_border', array(1048 $wp_customize->add_setting('hefe_customizer_control_enqueue_border', array( 1049 1049 'type' => 'option', 1050 1050 'sanitize_callback' => 'sanitize_text_field', 1051 1051 'default' => '', 1052 1052 )); 1053 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_border', array(1053 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_border', array( 1054 1054 'type' => 'checkbox', 1055 1055 'priority' => '', … … 1058 1058 'description' => 'Would you like Border code loaded on every page of your site?', 1059 1059 ))); 1060 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_display', array(1060 $wp_customize->add_setting('hefe_customizer_control_enqueue_display', array( 1061 1061 'type' => 'option', 1062 1062 'sanitize_callback' => 'sanitize_text_field', 1063 1063 'default' => '', 1064 1064 )); 1065 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_display', array(1065 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_display', array( 1066 1066 'type' => 'checkbox', 1067 1067 'priority' => '', … … 1070 1070 'description' => 'Would you like Display code loaded on every page of your site?', 1071 1071 ))); 1072 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_float', array(1072 $wp_customize->add_setting('hefe_customizer_control_enqueue_float', array( 1073 1073 'type' => 'option', 1074 1074 'sanitize_callback' => 'sanitize_text_field', 1075 1075 'default' => '', 1076 1076 )); 1077 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_float', array(1077 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_float', array( 1078 1078 'type' => 'checkbox', 1079 1079 'priority' => '', … … 1082 1082 'description' => 'Would you like Float code loaded on every page of your site?', 1083 1083 ))); 1084 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_margin', array(1084 $wp_customize->add_setting('hefe_customizer_control_enqueue_margin', array( 1085 1085 'type' => 'option', 1086 1086 'sanitize_callback' => 'sanitize_text_field', 1087 1087 'default' => '', 1088 1088 )); 1089 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_margin', array(1089 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_margin', array( 1090 1090 'type' => 'checkbox', 1091 1091 'priority' => '', … … 1094 1094 'description' => 'Would you like Margin code loaded on every page of your site?', 1095 1095 ))); 1096 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_padding', array(1096 $wp_customize->add_setting('hefe_customizer_control_enqueue_padding', array( 1097 1097 'type' => 'option', 1098 1098 'sanitize_callback' => 'sanitize_text_field', 1099 1099 'default' => '', 1100 1100 )); 1101 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_padding', array(1101 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_padding', array( 1102 1102 'type' => 'checkbox', 1103 1103 'priority' => '', … … 1106 1106 'description' => 'Would you like Padding code loaded on every page of your site?', 1107 1107 ))); 1108 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_text', array(1108 $wp_customize->add_setting('hefe_customizer_control_enqueue_text', array( 1109 1109 'type' => 'option', 1110 1110 'sanitize_callback' => 'sanitize_text_field', 1111 1111 'default' => '', 1112 1112 )); 1113 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_text', array(1113 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_text', array( 1114 1114 'type' => 'checkbox', 1115 1115 'priority' => '', … … 1118 1118 'description' => 'Would you like Text code loaded on every page of your site?', 1119 1119 ))); 1120 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_width', array(1120 $wp_customize->add_setting('hefe_customizer_control_enqueue_width', array( 1121 1121 'type' => 'option', 1122 1122 'sanitize_callback' => 'sanitize_text_field', 1123 1123 'default' => '', 1124 1124 )); 1125 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_width', array(1125 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_width', array( 1126 1126 'type' => 'checkbox', 1127 1127 'priority' => '', … … 1130 1130 'description' => 'Would you like Width code loaded on every page of your site?', 1131 1131 ))); 1132 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_html5shiv_js', array(1132 $wp_customize->add_setting('hefe_customizer_control_enqueue_html5shiv_js', array( 1133 1133 'type' => 'option', 1134 1134 'sanitize_callback' => 'sanitize_text_field', 1135 1135 'default' => '', 1136 1136 )); 1137 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_html5shiv_js', array(1137 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_html5shiv_js', array( 1138 1138 'type' => 'checkbox', 1139 1139 'priority' => '', … … 1142 1142 'description' => 'Would you like HTML5SHIV.JS code loaded on every page of your site?', 1143 1143 ))); 1144 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_normalize_css', array(1144 $wp_customize->add_setting('hefe_customizer_control_enqueue_normalize_css', array( 1145 1145 'type' => 'option', 1146 1146 'sanitize_callback' => 'sanitize_text_field', 1147 1147 'default' => '', 1148 1148 )); 1149 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_normalize_css', array(1149 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_normalize_css', array( 1150 1150 'type' => 'checkbox', 1151 1151 'priority' => '', … … 1154 1154 'description' => 'Would you like Normalize.CSS code loaded on every page of your site?', 1155 1155 ))); 1156 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_placeholders_js', array(1156 $wp_customize->add_setting('hefe_customizer_control_enqueue_placeholders_js', array( 1157 1157 'type' => 'option', 1158 1158 'sanitize_callback' => 'sanitize_text_field', 1159 1159 'default' => '', 1160 1160 )); 1161 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_placeholders_js', array(1161 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_placeholders_js', array( 1162 1162 'type' => 'checkbox', 1163 1163 'priority' => '', … … 1166 1166 'description' => 'Would you like Placeholders.JS code loaded on every page of your site?', 1167 1167 ))); 1168 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_respond_js', array(1168 $wp_customize->add_setting('hefe_customizer_control_enqueue_respond_js', array( 1169 1169 'type' => 'option', 1170 1170 'sanitize_callback' => 'sanitize_text_field', 1171 1171 'default' => '', 1172 1172 )); 1173 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_respond_js', array(1173 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_respond_js', array( 1174 1174 'type' => 'checkbox', 1175 1175 'priority' => '', … … 1178 1178 'description' => 'Would you like Respond.JS code loaded on every page of your site?', 1179 1179 ))); 1180 $wp_customize->add_setting('hefe_ getting_started_customizer_control_enqueue_selectivizr_js', array(1180 $wp_customize->add_setting('hefe_customizer_control_enqueue_selectivizr_js', array( 1181 1181 'type' => 'option', 1182 1182 'sanitize_callback' => 'sanitize_text_field', 1183 1183 'default' => '', 1184 1184 )); 1185 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_ getting_started_customizer_control_enqueue_selectivizr_js', array(1185 $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'hefe_customizer_control_enqueue_selectivizr_js', array( 1186 1186 'type' => 'checkbox', 1187 1187 'priority' => '', … … 2989 2989 2990 2990 // Google Analytics UA Code 2991 if(get_option('hefe_ getting_started_customizer_control_google_analytics_ua_code')){2991 if(get_option('hefe_customizer_control_google_analytics_ua_code')){ 2992 2992 if(!function_exists('hefe_function_header_inc_google_analytics_script')){ 2993 2993 add_action('wp_head', 'hefe_function_header_inc_google_analytics_script'); … … 2999 2999 })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); 3000 3000 3001 ga('create', '".get_option('hefe_ getting_started_customizer_control_google_analytics_ua_code')."', 'auto');3001 ga('create', '".get_option('hefe_customizer_control_google_analytics_ua_code')."', 'auto'); 3002 3002 ga('send', 'pageview'); 3003 3003 … … 3442 3442 3443 3443 // Custom Author Base 3444 if(get_option('hefe_ getting_started_customizer_control_custom_author_base')){3444 if(get_option('hefe_customizer_control_custom_author_base')){ 3445 3445 if(!function_exists('hefe_function_init_custom_author_base')){ 3446 3446 add_action('init', 'hefe_function_init_custom_author_base'); 3447 3447 function hefe_function_init_custom_author_base() { 3448 3448 global $wp_rewrite; 3449 $author_slug = sanitize_text_field(get_option('hefe_ getting_started_customizer_control_custom_author_base'));3449 $author_slug = sanitize_text_field(get_option('hefe_customizer_control_custom_author_base')); 3450 3450 $wp_rewrite->author_base = $author_slug; 3451 3451 } … … 3454 3454 3455 3455 // Exclude Post Types From Search 3456 if(get_option('hefe_ getting_started_customizer_control_exclude_from_search_post_types')){3456 if(get_option('hefe_customizer_control_exclude_from_search_post_types')){ 3457 3457 if(!function_exists('hefe_function_init_exclude_from_search_post_types')){ 3458 3458 add_action('init', 'hefe_function_init_exclude_from_search_post_types'); 3459 3459 function hefe_function_init_exclude_from_search_post_types(){ 3460 3460 global $wp_post_types; 3461 $hefe_exclude_from_search_post_types_variables = explode(',', str_replace(' ', '', get_option('hefe_ getting_started_customizer_control_exclude_from_search_post_types')));3461 $hefe_exclude_from_search_post_types_variables = explode(',', str_replace(' ', '', get_option('hefe_customizer_control_exclude_from_search_post_types'))); 3462 3462 foreach($hefe_exclude_from_search_post_types_variables as $hefe_exclude_from_search_post_types_variable): 3463 3463 $wp_post_types[$hefe_exclude_from_search_post_types_variable]->exclude_from_search = true; … … 3468 3468 3469 3469 // Exclude Page IDs From Search 3470 if(get_option('hefe_ getting_started_customizer_control_exclude_from_search_page_ids')){3470 if(get_option('hefe_customizer_control_exclude_from_search_page_ids')){ 3471 3471 if(!function_exists('hefe_function_init_exclude_from_search_page_ids')){ 3472 3472 add_action('pre_get_posts', 'hefe_function_init_exclude_from_search_page_ids'); 3473 3473 function hefe_function_init_exclude_from_search_page_ids($query){ 3474 $hefe_exclude_from_search_page_ids_variables = explode(',', str_replace(' ', '', get_option('hefe_ getting_started_customizer_control_exclude_from_search_page_ids')));3474 $hefe_exclude_from_search_page_ids_variables = explode(',', str_replace(' ', '', get_option('hefe_customizer_control_exclude_from_search_page_ids'))); 3475 3475 $hefe_exclude_from_search_page_ids_array = array(); 3476 3476 foreach($hefe_exclude_from_search_page_ids_variables as $hefe_exclude_from_search_page_ids_variable): … … 3865 3865 } 3866 3866 // Getting Started 3867 if(get_option('hefe_ getting_started_customizer_control_google_fonts_url')){3868 wp_enqueue_style('hefe-starter-google-fonts-style', get_option('hefe_ getting_started_customizer_control_google_fonts_url'), array(), '1.0.0', 'all');3869 } 3870 if(get_option('hefe_ getting_started_customizer_control_enqueue_colors')){3867 if(get_option('hefe_customizer_control_google_fonts_url')){ 3868 wp_enqueue_style('hefe-starter-google-fonts-style', get_option('hefe_customizer_control_google_fonts_url'), array(), '1.0.0', 'all'); 3869 } 3870 if(get_option('hefe_customizer_control_enqueue_colors')){ 3871 3871 wp_enqueue_style('hefe-starter-colors-style', hefe_dir_url.'css/colors-style.css', array(), '1.0.0', 'all'); 3872 3872 } 3873 if(get_option('hefe_ getting_started_customizer_control_enqueue_form')){3873 if(get_option('hefe_customizer_control_enqueue_form')){ 3874 3874 wp_enqueue_style('hefe-starter-form-style', hefe_dir_url.'css/form-style.css', array(), '1.0.0', 'all'); 3875 3875 } 3876 if(get_option('hefe_ getting_started_customizer_control_enqueue_theme')){3876 if(get_option('hefe_customizer_control_enqueue_theme')){ 3877 3877 wp_enqueue_style('hefe-starter-theme-style', hefe_dir_url.'css/theme-style.css', array(), '1.0.0', 'all'); 3878 3878 } 3879 if(get_option('hefe_ getting_started_customizer_control_enqueue_wordpress')){3879 if(get_option('hefe_customizer_control_enqueue_wordpress')){ 3880 3880 wp_enqueue_style('hefe-starter-wordpress-style', hefe_dir_url.'css/wordpress-style.css', array(), '1.0.0', 'all'); 3881 3881 } 3882 if(get_option('hefe_ getting_started_customizer_control_enqueue_border')){3882 if(get_option('hefe_customizer_control_enqueue_border')){ 3883 3883 wp_enqueue_style('hefe-starter-border-style', hefe_dir_url.'css/border-style.css', array(), '1.0.0', 'all'); 3884 3884 } 3885 if(get_option('hefe_ getting_started_customizer_control_enqueue_display')){3885 if(get_option('hefe_customizer_control_enqueue_display')){ 3886 3886 wp_enqueue_style('hefe-starter-display-style', hefe_dir_url.'css/display-style.css', array(), '1.0.0', 'all'); 3887 3887 } 3888 if(get_option('hefe_ getting_started_customizer_control_enqueue_float')){3888 if(get_option('hefe_customizer_control_enqueue_float')){ 3889 3889 wp_enqueue_style('hefe-starter-float-style', hefe_dir_url.'css/float-style.css', array(), '1.0.0', 'all'); 3890 3890 } 3891 if(get_option('hefe_ getting_started_customizer_control_enqueue_margin')){3891 if(get_option('hefe_customizer_control_enqueue_margin')){ 3892 3892 wp_enqueue_style('hefe-starter-margin-style', hefe_dir_url.'css/margin-style.css', array(), '1.0.0', 'all'); 3893 3893 } 3894 if(get_option('hefe_ getting_started_customizer_control_enqueue_padding')){3894 if(get_option('hefe_customizer_control_enqueue_padding')){ 3895 3895 wp_enqueue_style('hefe-starter-padding-style', hefe_dir_url.'css/padding-style.css', array(), '1.0.0', 'all'); 3896 3896 } 3897 if(get_option('hefe_ getting_started_customizer_control_enqueue_text')){3897 if(get_option('hefe_customizer_control_enqueue_text')){ 3898 3898 wp_enqueue_style('hefe-starter-text-style', hefe_dir_url.'css/text-style.css', array(), '1.0.0', 'all'); 3899 3899 } 3900 if(get_option('hefe_ getting_started_customizer_control_enqueue_width')){3900 if(get_option('hefe_customizer_control_enqueue_width')){ 3901 3901 wp_enqueue_style('hefe-starter-width-style', hefe_dir_url.'css/width-style.css', array(), '1.0.0', 'all'); 3902 3902 } 3903 if(get_option('hefe_ getting_started_customizer_control_enqueue_normalize_css')){3903 if(get_option('hefe_customizer_control_enqueue_normalize_css')){ 3904 3904 wp_enqueue_style('hefe-starter-normalize-css-style', hefe_dir_url.'css/normalize.min.css', array(), '4.1.1', 'all'); 3905 3905 } 3906 if(get_option('hefe_ getting_started_customizer_control_enqueue_normalize_css')){3906 if(get_option('hefe_customizer_control_enqueue_normalize_css')){ 3907 3907 wp_enqueue_style('hefe-starter-normalize-css-style', hefe_dir_url.'css/normalize.min.css', array(), '4.1.1', 'all'); 3908 3908 } … … 4021 4021 } 4022 4022 // Getting Started 4023 if(get_option('hefe_ getting_started_customizer_control_enqueue_html5shiv_js')){4023 if(get_option('hefe_customizer_control_enqueue_html5shiv_js')){ 4024 4024 wp_enqueue_script('hefe-starter-html5shiv-js-script', hefe_dir_url.'js/html5shiv.min.js', array('jquery'), '3.7.3', true); 4025 4025 } 4026 if(get_option('hefe_ getting_started_customizer_control_enqueue_placeholders_js')){4026 if(get_option('hefe_customizer_control_enqueue_placeholders_js')){ 4027 4027 wp_enqueue_script('hefe-starter-placeholders-js-script', hefe_dir_url.'js/placeholders.min.js', array('jquery'), '4.0.1', true); 4028 4028 } 4029 if(get_option('hefe_ getting_started_customizer_control_enqueue_respond_js')){4029 if(get_option('hefe_customizer_control_enqueue_respond_js')){ 4030 4030 wp_enqueue_script('hefe-starter-respond-js-script', hefe_dir_url.'js/respond.min.js', array('jquery'), '1.0.2', true); 4031 4031 } 4032 if(get_option('hefe_ getting_started_customizer_control_enqueue_selectivizr_js')){4032 if(get_option('hefe_customizer_control_enqueue_selectivizr_js')){ 4033 4033 wp_enqueue_script('hefe-starter-selectivizr-js-script', hefe_dir_url.'js/selectivizr.min.js', array('jquery'), '1.0.2', true); 4034 4034 } … … 6787 6787 ), $atts); 6788 6788 $hefe_injection_id = esc_attr($a['injection_id']); 6789 $hefe_injection_filter = strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', esc_attr($a['injection_filter'])))); ;6789 $hefe_injection_filter = strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', esc_attr($a['injection_filter'])))); 6790 6790 $hefe_injection_exclude = explode(',', esc_attr($a['exclude'])); 6791 6791 if($hefe_injection_filter != ''){ … … 9553 9553 9554 9554 // Disable Admin Bar 9555 if(get_option('hefe_ getting_started_customizer_control_disable_admin_bar_by_user_roles')){9555 if(get_option('hefe_customizer_control_disable_admin_bar_by_user_roles')){ 9556 9556 if(!function_exists('hefe_function_after_theme_setup_disable_admin_bar')){ 9557 9557 add_action('after_setup_theme', 'hefe_function_after_theme_setup_disable_admin_bar'); … … 9560 9560 $hefe_disable_admin_bar_get_roles = implode(get_userdata(get_current_user_id())->roles); 9561 9561 // Get user roles to disable admin bar 9562 $hefe_disable_admin_bar_user_role_variables = explode(',', str_replace(' ', '', strtolower(get_option('hefe_ getting_started_customizer_control_disable_admin_bar_by_user_roles'))));9562 $hefe_disable_admin_bar_user_role_variables = explode(',', str_replace(' ', '', strtolower(get_option('hefe_customizer_control_disable_admin_bar_by_user_roles')))); 9563 9563 // Disable admin bar 9564 9564 foreach($hefe_disable_admin_bar_user_role_variables as $hefe_disable_admin_bar_user_role_variable){ … … 9572 9572 9573 9573 // Enable Admin Bar 9574 if(get_option('hefe_ getting_started_customizer_control_enable_admin_bar_by_user_roles')){9574 if(get_option('hefe_customizer_control_enable_admin_bar_by_user_roles')){ 9575 9575 if(!function_exists('hefe_function_after_theme_setup_enable_admin_bar')){ 9576 9576 add_action('after_setup_theme', 'hefe_function_after_theme_setup_enable_admin_bar'); … … 9579 9579 $hefe_enable_admin_bar_get_roles = implode(get_userdata(get_current_user_id())->roles); 9580 9580 // Get user roles to disable admin bar 9581 $hefe_enable_admin_bar_user_role_variables = explode(',', str_replace(' ', '', strtolower(get_option('hefe_ getting_started_customizer_control_enable_admin_bar_by_user_roles'))));9581 $hefe_enable_admin_bar_user_role_variables = explode(',', str_replace(' ', '', strtolower(get_option('hefe_customizer_control_enable_admin_bar_by_user_roles')))); 9582 9582 // Disable admin bar 9583 9583 foreach($hefe_enable_admin_bar_user_role_variables as $hefe_enable_admin_bar_user_role_variable){ … … 9593 9593 9594 9594 // Home Page Random Order 9595 if(get_option('hefe_ getting_started_customizer_control_home_page_random_order')){9595 if(get_option('hefe_customizer_control_home_page_random_order')){ 9596 9596 session_start(); 9597 9597 add_filter( 'posts_orderby', 'randomise_with_pagination' ); … … 9625 9625 9626 9626 // Home Post Type / Post Types 9627 if(get_option('hefe_ getting_started_customizer_control_home_post_type_post_types')){9627 if(get_option('hefe_customizer_control_home_post_type_post_types')){ 9628 9628 if(!function_exists('hefe_function_pre_get_posts_home_post_type_filter')){ 9629 9629 add_action('pre_get_posts', 'hefe_function_pre_get_posts_home_post_type_filter'); 9630 9630 function hefe_function_pre_get_posts_home_post_type_filter($wp_query){ 9631 $hefe_home_post_types = explode(',', str_replace(' ', '', get_option('hefe_ getting_started_customizer_control_home_post_type_post_types')));9632 $hefe_home_post_status = explode(',', str_replace(' ', '', get_option('hefe_ getting_started_customizer_control_home_post_type_status')));9631 $hefe_home_post_types = explode(',', str_replace(' ', '', get_option('hefe_customizer_control_home_post_type_post_types'))); 9632 $hefe_home_post_status = explode(',', str_replace(' ', '', get_option('hefe_customizer_control_home_post_type_status'))); 9633 9633 if ( !is_admin() && $wp_query->is_main_query() && is_home() ) { 9634 9634 $wp_query->set('post_type', $hefe_home_post_types );
Note: See TracChangeset
for help on using the changeset viewer.