Changeset 3298843
- Timestamp:
- 05/22/2025 02:03:23 PM (7 months ago)
- Location:
- cubecolour-caboodle
- Files:
-
- 4 edited
-
tags/1.4.0/includes/admin.php (modified) (1 diff)
-
tags/1.4.0/includes/customizer.php (modified) (1 diff)
-
trunk/includes/admin.php (modified) (1 diff)
-
trunk/includes/customizer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cubecolour-caboodle/tags/1.4.0/includes/admin.php
r3298789 r3298843 467 467 <?php 468 468 } ?> 469 470 <?php471 if ( is_plugin_active( 'polylang/polylang.php' ) ) { ?>472 473 <li class="<?php cc_caboodle_module_classes( 'polylang' ) ?>">474 <a class="module-content" href="<?php cc_caboodle_module_url( 'polylang' ) ?>">475 <h2><?php esc_html_e( 'Polylang SVG flags', 'cubecolour-caboodle' ); ?></h2>476 <p><?php esc_html_e( 'Replace the default bitmap flags in polylang', 'cubecolour-caboodle' ); ?></p>477 </a>478 </li>479 <?php480 } ?>481 482 <?php483 if ( is_plugin_active( 'gravityforms/gravityforms.php' ) ) { ?>484 485 <li class="<?php cc_caboodle_module_classes( 'gform' ) ?>">486 <a class="module-content" href="<?php cc_caboodle_module_url( 'gform' ) ?>">487 <h2><?php esc_html_e( 'Gravity forms style', 'cubecolour-caboodle' ); ?></h2>488 <p><?php esc_html_e( 'Add some simple styles to forms created with the gravity forms plugin', 'cubecolour-caboodle' ); ?></p>489 </a>490 </li>491 <?php492 } ?>493 469 494 470 </ul> -
cubecolour-caboodle/tags/1.4.0/includes/customizer.php
r3298789 r3298843 3025 3025 } 3026 3026 3027 3028 /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **3029 * Caboodle Polylang section3030 *3031 */3032 3033 if ( is_plugin_active( 'polylang/polylang.php' ) ) {3034 3035 $wp_customize->add_section( 'cc_caboodle_polylang_section',3036 array(3037 'title' => esc_html__( 'Polylang SVG flags', 'cubecolour-caboodle' ),3038 'description' => esc_html__( 'Replace the default bitmap flags in polylang', 'cubecolour-caboodle' ),3039 'panel' => 'cc_caboodle_panel'3040 )3041 );3042 3043 $wp_customize->add_setting('cc_caboodle[polylang]', array(3044 'default' => false,3045 'sanitize_callback' => 'cc_toggle_control_sanitize',3046 'type' => 'option',3047 'transport' => 'postMessage',3048 ));3049 $wp_customize->add_control( new Cubecolour_Toggle_Control(3050 $wp_customize,3051 'cc_caboodle_polylang',3052 array(3053 'label' => esc_html__( 'Polylang', 'cubecolour-caboodle' ),3054 'type' => 'checkbox',3055 'section' => 'cc_caboodle_polylang_section',3056 'settings' => 'cc_caboodle[polylang]',3057 )3058 )3059 );3060 3061 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_width]',3062 array(3063 'default' => 36,3064 'sanitize_callback' => 'absint',3065 'type' => 'option',3066 'transport' => 'postMessage',3067 )3068 );3069 $wp_customize->add_control(3070 new Cubecolour_Range_Value_Control(3071 $wp_customize, 'cc_caboodle_polylang_flag_width', array(3072 'label' => esc_html__( 'Flag width px', 'cubecolour-caboodle' ),3073 'section' => 'cc_caboodle_polylang_section',3074 'settings' => 'cc_caboodle[polylang_flag_width]',3075 'type' => 'range',3076 'input_attrs' => array(3077 'min' => 4,3078 'max' => 80,3079 'step' => 4,3080 )3081 )3082 )3083 );3084 3085 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_grayscale]',3086 array(3087 'default' => 80,3088 'sanitize_callback' => 'absint',3089 'type' => 'option',3090 'transport' => 'postMessage',3091 )3092 );3093 $wp_customize->add_control(3094 new Cubecolour_Range_Value_Control(3095 $wp_customize, 'cc_caboodle_polylang_flag_grayscale', array(3096 'label' => esc_html__( 'Grayscale %', 'cubecolour-caboodle' ),3097 'section' => 'cc_caboodle_polylang_section',3098 'settings' => 'cc_caboodle[polylang_flag_grayscale]',3099 'type' => 'range',3100 'input_attrs' => array(3101 'min' => 0,3102 'max' => 100,3103 'step' => 1,3104 )3105 )3106 )3107 );3108 3109 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_opacity]',3110 array(3111 'default' => 60,3112 'sanitize_callback' => 'absint',3113 'type' => 'option',3114 'transport' => 'postMessage',3115 )3116 );3117 $wp_customize->add_control(3118 new Cubecolour_Range_Value_Control(3119 $wp_customize, 'cc_caboodle_polylang_flag_opacity', array(3120 'label' => esc_html__( 'Opacity %', 'cubecolour-caboodle' ),3121 'section' => 'cc_caboodle_polylang_section',3122 'settings' => 'cc_caboodle[polylang_flag_opacity]',3123 'type' => 'range',3124 'input_attrs' => array(3125 'min' => 0,3126 'max' => 100,3127 'step' => 1,3128 )3129 )3130 )3131 );3132 3133 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_spacing]',3134 array(3135 'default' => 60,3136 'sanitize_callback' => 'absint',3137 'type' => 'option',3138 'transport' => 'postMessage',3139 )3140 );3141 $wp_customize->add_control(3142 new Cubecolour_Range_Value_Control(3143 $wp_customize, 'cc_caboodle_polylang_flag_spacing', array(3144 'label' => esc_html__( 'Spacing between flags px', 'cubecolour-caboodle' ),3145 'section' => 'cc_caboodle_polylang_section',3146 'settings' => 'cc_caboodle[polylang_flag_spacing]',3147 'type' => 'range',3148 'input_attrs' => array(3149 'min' => 0,3150 'max' => 20,3151 'step' => 1,3152 )3153 )3154 )3155 );3156 }3157 3158 3159 /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **3160 * Caboodle gravity forms section3161 *3162 */3163 if ( is_plugin_active( 'gravityforms/gravityforms.php' ) ) {3164 3165 $wp_customize->add_section( 'cc_caboodle_gform_section',3166 array(3167 'title' => esc_html__( 'Gravity forms style', 'cubecolour-caboodle' ),3168 'description' => esc_html__( 'Add some simple styles to forms created with the gravity forms plugin', 'cubecolour-caboodle' ),3169 'panel' => 'cc_caboodle_panel'3170 )3171 );3172 3173 $wp_customize->add_setting('cc_caboodle[gform]', array(3174 'default' => false,3175 'sanitize_callback' => 'cc_toggle_control_sanitize',3176 'type' => 'option',3177 'transport' => 'refresh',3178 ));3179 $wp_customize->add_control( new Cubecolour_Toggle_Control(3180 $wp_customize,3181 'cc_caboodle_gform',3182 array(3183 'label' => esc_html__( 'Gravity forms', 'cubecolour-caboodle' ),3184 'type' => 'checkbox',3185 'section' => 'cc_caboodle_gform_section',3186 'settings' => 'cc_caboodle[gform]',3187 )3188 )3189 );3190 3191 $wp_customize->add_setting( 'cc_caboodle[gform_border_color]',3192 array(3193 'default' => '#cecece',3194 'sanitize_callback' => 'sanitize_hex_color',3195 'type' => 'option',3196 'transport' => 'postMessage',3197 )3198 );3199 $wp_customize->add_control(3200 new WP_Customize_Color_Control(3201 $wp_customize, 'cc_caboodle_gform_border_color',3202 array(3203 'label' => esc_html__( 'Border color', 'cubecolour-caboodle' ),3204 'section' => 'cc_caboodle_gform_section',3205 'settings' => 'cc_caboodle[gform_border_color]',3206 )3207 )3208 );3209 3210 $wp_customize->add_setting( 'cc_caboodle[gform_border_color_hover]',3211 array(3212 'default' => '#8e8e8e',3213 'sanitize_callback' => 'sanitize_hex_color',3214 'type' => 'option',3215 'transport' => 'postMessage',3216 )3217 );3218 $wp_customize->add_control(3219 new WP_Customize_Color_Control(3220 $wp_customize, 'cc_caboodle_gform_border_color_hover',3221 array(3222 'label' => esc_html__( 'Border color: hover', 'cubecolour-caboodle' ),3223 'section' => 'cc_caboodle_gform_section',3224 'settings' => 'cc_caboodle[gform_border_color_hover]',3225 )3226 )3227 );3228 3229 $wp_customize->add_setting( 'cc_caboodle[gform_border_color_focus]',3230 array(3231 'default' => '#3e3e3e',3232 'sanitize_callback' => 'sanitize_hex_color',3233 'type' => 'option',3234 'transport' => 'postMessage',3235 )3236 );3237 $wp_customize->add_control(3238 new WP_Customize_Color_Control(3239 $wp_customize, 'cc_caboodle_gform_border_color_focus',3240 array(3241 'label' => esc_html__( 'Border color: focus', 'cubecolour-caboodle' ),3242 'section' => 'cc_caboodle_gform_section',3243 'settings' => 'cc_caboodle[gform_border_color_focus]',3244 )3245 )3246 );3247 }3248 3249 3027 } 3250 3028 add_action( 'customize_register', 'cc_caboodle_customize_register' ); -
cubecolour-caboodle/trunk/includes/admin.php
r3286967 r3298843 467 467 <?php 468 468 } ?> 469 470 <?php471 if ( is_plugin_active( 'polylang/polylang.php' ) ) { ?>472 473 <li class="<?php cc_caboodle_module_classes( 'polylang' ) ?>">474 <a class="module-content" href="<?php cc_caboodle_module_url( 'polylang' ) ?>">475 <h2><?php esc_html_e( 'Polylang SVG flags', 'cubecolour-caboodle' ); ?></h2>476 <p><?php esc_html_e( 'Replace the default bitmap flags in polylang', 'cubecolour-caboodle' ); ?></p>477 </a>478 </li>479 <?php480 } ?>481 482 <?php483 if ( is_plugin_active( 'gravityforms/gravityforms.php' ) ) { ?>484 485 <li class="<?php cc_caboodle_module_classes( 'gform' ) ?>">486 <a class="module-content" href="<?php cc_caboodle_module_url( 'gform' ) ?>">487 <h2><?php esc_html_e( 'Gravity forms style', 'cubecolour-caboodle' ); ?></h2>488 <p><?php esc_html_e( 'Add some simple styles to forms created with the gravity forms plugin', 'cubecolour-caboodle' ); ?></p>489 </a>490 </li>491 <?php492 } ?>493 469 494 470 </ul> -
cubecolour-caboodle/trunk/includes/customizer.php
r3286967 r3298843 3025 3025 } 3026 3026 3027 3028 /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **3029 * Caboodle Polylang section3030 *3031 */3032 3033 if ( is_plugin_active( 'polylang/polylang.php' ) ) {3034 3035 $wp_customize->add_section( 'cc_caboodle_polylang_section',3036 array(3037 'title' => esc_html__( 'Polylang SVG flags', 'cubecolour-caboodle' ),3038 'description' => esc_html__( 'Replace the default bitmap flags in polylang', 'cubecolour-caboodle' ),3039 'panel' => 'cc_caboodle_panel'3040 )3041 );3042 3043 $wp_customize->add_setting('cc_caboodle[polylang]', array(3044 'default' => false,3045 'sanitize_callback' => 'cc_toggle_control_sanitize',3046 'type' => 'option',3047 'transport' => 'postMessage',3048 ));3049 $wp_customize->add_control( new Cubecolour_Toggle_Control(3050 $wp_customize,3051 'cc_caboodle_polylang',3052 array(3053 'label' => esc_html__( 'Polylang', 'cubecolour-caboodle' ),3054 'type' => 'checkbox',3055 'section' => 'cc_caboodle_polylang_section',3056 'settings' => 'cc_caboodle[polylang]',3057 )3058 )3059 );3060 3061 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_width]',3062 array(3063 'default' => 36,3064 'sanitize_callback' => 'absint',3065 'type' => 'option',3066 'transport' => 'postMessage',3067 )3068 );3069 $wp_customize->add_control(3070 new Cubecolour_Range_Value_Control(3071 $wp_customize, 'cc_caboodle_polylang_flag_width', array(3072 'label' => esc_html__( 'Flag width px', 'cubecolour-caboodle' ),3073 'section' => 'cc_caboodle_polylang_section',3074 'settings' => 'cc_caboodle[polylang_flag_width]',3075 'type' => 'range',3076 'input_attrs' => array(3077 'min' => 4,3078 'max' => 80,3079 'step' => 4,3080 )3081 )3082 )3083 );3084 3085 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_grayscale]',3086 array(3087 'default' => 80,3088 'sanitize_callback' => 'absint',3089 'type' => 'option',3090 'transport' => 'postMessage',3091 )3092 );3093 $wp_customize->add_control(3094 new Cubecolour_Range_Value_Control(3095 $wp_customize, 'cc_caboodle_polylang_flag_grayscale', array(3096 'label' => esc_html__( 'Grayscale %', 'cubecolour-caboodle' ),3097 'section' => 'cc_caboodle_polylang_section',3098 'settings' => 'cc_caboodle[polylang_flag_grayscale]',3099 'type' => 'range',3100 'input_attrs' => array(3101 'min' => 0,3102 'max' => 100,3103 'step' => 1,3104 )3105 )3106 )3107 );3108 3109 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_opacity]',3110 array(3111 'default' => 60,3112 'sanitize_callback' => 'absint',3113 'type' => 'option',3114 'transport' => 'postMessage',3115 )3116 );3117 $wp_customize->add_control(3118 new Cubecolour_Range_Value_Control(3119 $wp_customize, 'cc_caboodle_polylang_flag_opacity', array(3120 'label' => esc_html__( 'Opacity %', 'cubecolour-caboodle' ),3121 'section' => 'cc_caboodle_polylang_section',3122 'settings' => 'cc_caboodle[polylang_flag_opacity]',3123 'type' => 'range',3124 'input_attrs' => array(3125 'min' => 0,3126 'max' => 100,3127 'step' => 1,3128 )3129 )3130 )3131 );3132 3133 $wp_customize->add_setting( 'cc_caboodle[polylang_flag_spacing]',3134 array(3135 'default' => 60,3136 'sanitize_callback' => 'absint',3137 'type' => 'option',3138 'transport' => 'postMessage',3139 )3140 );3141 $wp_customize->add_control(3142 new Cubecolour_Range_Value_Control(3143 $wp_customize, 'cc_caboodle_polylang_flag_spacing', array(3144 'label' => esc_html__( 'Spacing between flags px', 'cubecolour-caboodle' ),3145 'section' => 'cc_caboodle_polylang_section',3146 'settings' => 'cc_caboodle[polylang_flag_spacing]',3147 'type' => 'range',3148 'input_attrs' => array(3149 'min' => 0,3150 'max' => 20,3151 'step' => 1,3152 )3153 )3154 )3155 );3156 }3157 3158 3159 /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **3160 * Caboodle gravity forms section3161 *3162 */3163 if ( is_plugin_active( 'gravityforms/gravityforms.php' ) ) {3164 3165 $wp_customize->add_section( 'cc_caboodle_gform_section',3166 array(3167 'title' => esc_html__( 'Gravity forms style', 'cubecolour-caboodle' ),3168 'description' => esc_html__( 'Add some simple styles to forms created with the gravity forms plugin', 'cubecolour-caboodle' ),3169 'panel' => 'cc_caboodle_panel'3170 )3171 );3172 3173 $wp_customize->add_setting('cc_caboodle[gform]', array(3174 'default' => false,3175 'sanitize_callback' => 'cc_toggle_control_sanitize',3176 'type' => 'option',3177 'transport' => 'refresh',3178 ));3179 $wp_customize->add_control( new Cubecolour_Toggle_Control(3180 $wp_customize,3181 'cc_caboodle_gform',3182 array(3183 'label' => esc_html__( 'Gravity forms', 'cubecolour-caboodle' ),3184 'type' => 'checkbox',3185 'section' => 'cc_caboodle_gform_section',3186 'settings' => 'cc_caboodle[gform]',3187 )3188 )3189 );3190 3191 $wp_customize->add_setting( 'cc_caboodle[gform_border_color]',3192 array(3193 'default' => '#cecece',3194 'sanitize_callback' => 'sanitize_hex_color',3195 'type' => 'option',3196 'transport' => 'postMessage',3197 )3198 );3199 $wp_customize->add_control(3200 new WP_Customize_Color_Control(3201 $wp_customize, 'cc_caboodle_gform_border_color',3202 array(3203 'label' => esc_html__( 'Border color', 'cubecolour-caboodle' ),3204 'section' => 'cc_caboodle_gform_section',3205 'settings' => 'cc_caboodle[gform_border_color]',3206 )3207 )3208 );3209 3210 $wp_customize->add_setting( 'cc_caboodle[gform_border_color_hover]',3211 array(3212 'default' => '#8e8e8e',3213 'sanitize_callback' => 'sanitize_hex_color',3214 'type' => 'option',3215 'transport' => 'postMessage',3216 )3217 );3218 $wp_customize->add_control(3219 new WP_Customize_Color_Control(3220 $wp_customize, 'cc_caboodle_gform_border_color_hover',3221 array(3222 'label' => esc_html__( 'Border color: hover', 'cubecolour-caboodle' ),3223 'section' => 'cc_caboodle_gform_section',3224 'settings' => 'cc_caboodle[gform_border_color_hover]',3225 )3226 )3227 );3228 3229 $wp_customize->add_setting( 'cc_caboodle[gform_border_color_focus]',3230 array(3231 'default' => '#3e3e3e',3232 'sanitize_callback' => 'sanitize_hex_color',3233 'type' => 'option',3234 'transport' => 'postMessage',3235 )3236 );3237 $wp_customize->add_control(3238 new WP_Customize_Color_Control(3239 $wp_customize, 'cc_caboodle_gform_border_color_focus',3240 array(3241 'label' => esc_html__( 'Border color: focus', 'cubecolour-caboodle' ),3242 'section' => 'cc_caboodle_gform_section',3243 'settings' => 'cc_caboodle[gform_border_color_focus]',3244 )3245 )3246 );3247 }3248 3249 3027 } 3250 3028 add_action( 'customize_register', 'cc_caboodle_customize_register' );
Note: See TracChangeset
for help on using the changeset viewer.