| 1 |
<?php |
| 2 |
/* |
| 3 |
repeater => |
| 4 |
social profiles => |
| 5 |
js button => |
| 6 |
multi media => |
| 7 |
css layout => |
| 8 |
color schemes => adjust-alt |
| 9 |
custom fonts => fontsize |
| 10 |
code mirror => view-mode |
| 11 |
live search => search |
| 12 |
support faq's => question |
| 13 |
date time picker => |
| 14 |
premium support => |
| 15 |
metaboxes => |
| 16 |
widget areas => |
| 17 |
shortcodes => |
| 18 |
icon select => gallery |
| 19 |
tracking => |
| 20 |
* */ |
| 21 |
$iconMap = array( |
| 22 |
'repeater' => 'tags', |
| 23 |
'social-profiles' => 'group', |
| 24 |
'js-button' => 'hand-down', |
| 25 |
'multi-media' => 'picture', |
| 26 |
'css-layout' => 'fullscreen', |
| 27 |
'color-schemes' => 'adjust-alt', |
| 28 |
'custom-fonts' => 'fontsize', |
| 29 |
//'codemirror' => 'view-mode', |
| 30 |
'live-search' => 'search', |
| 31 |
'support-faqs' => 'question', |
| 32 |
'date-time' => 'calendar', |
| 33 |
'premium-support' => 'fire', |
| 34 |
'metaboxes' => 'magic', |
| 35 |
'widget-areas' => 'inbox-box', |
| 36 |
'shortcodes' => 'shortcode', |
| 37 |
'icon-select' => 'gallery', |
| 38 |
'accordion' => 'lines' |
| 39 |
); |
| 40 |
$colors = array( |
| 41 |
'8CC63F', |
| 42 |
'8CC63F', |
| 43 |
'0A803B', |
| 44 |
'25AAE1', |
| 45 |
'0F75BC', |
| 46 |
'F7941E', |
| 47 |
'F1592A', |
| 48 |
'ED217C', |
| 49 |
'BF1E2D', |
| 50 |
'8569CF', |
| 51 |
'0D9FD8', |
| 52 |
'8AD749', |
| 53 |
'EECE00', |
| 54 |
'F8981F', |
| 55 |
'F80E27', |
| 56 |
'F640AE' |
| 57 |
); |
| 58 |
shuffle( $colors ); |
| 59 |
echo '<style type="text/css">'; |
| 60 |
?> |
| 61 |
|
| 62 |
<?php |
| 63 |
foreach ( $colors as $key => $color ) { |
| 64 |
echo '.theme-browser .theme.color' . esc_html($key) . ' .theme-screenshot{background-color:' . esc_html(Redux_Helpers::hex2rgba( $color, .45 )) . ';}'; |
| 65 |
echo '.theme-browser .theme.color' . esc_html($key) . ':hover .theme-screenshot{background-color:' . esc_html(Redux_Helpers::hex2rgba( $color, .75 )) . ';}'; |
| 66 |
|
| 67 |
} |
| 68 |
echo '</style>'; |
| 69 |
$color = 1; |
| 70 |
|
| 71 |
?> |
| 72 |
<div class="wrap about-wrap"> |
| 73 |
<h1><?php esc_html_e( 'Redux Framework - Extensions', 'redux-framework' ); ?></h1> |
| 74 |
|
| 75 |
<div class="about-text"> |
| 76 |
<?php printf( __( 'Supercharge your Redux experience. Our extensions provide you with features that will take your products to the next level.', 'redux-framework' ), esc_html($this->display_version) ); ?> |
| 77 |
</div> |
| 78 |
<div class="redux-badge"> |
| 79 |
<i class="el el-redux"></i> |
| 80 |
<span> |
| 81 |
<?php printf( __( 'Version %s', 'redux-framework' ), esc_html(ReduxFramework::$_version )); ?> |
| 82 |
</span> |
| 83 |
</div> |
| 84 |
|
| 85 |
<?php $this->actions(); ?> |
| 86 |
<?php $this->tabs(); ?> |
| 87 |
|
| 88 |
<p class="about-description"> |
| 89 |
<?php esc_html_e( "While some are built specificially for developers, extensions such as Custom Fonts are sure to make any user happy.", 'redux-framework' ); ?> |
| 90 |
</p> |
| 91 |
|
| 92 |
<div class="extensions"> |
| 93 |
<div class="feature-section theme-browser rendered" style="clear:both;"> |
| 94 |
<?php |
| 95 |
$data = get_transient( 'redux-extensions-fetch' ); |
| 96 |
|
| 97 |
if ( empty( $data ) ) { |
| 98 |
$data = @wp_remote_retrieve_body( @wp_remote_get( 'http://reduxframework.com/wp-admin/admin-ajax.php?action=get_redux_extensions' ) ); |
| 99 |
|
| 100 |
if ( ! empty( $data ) ) { |
| 101 |
$data = json_decode( $data, true ); |
| 102 |
set_transient( 'redux-extensions-fetch', $data, 24 * HOUR_IN_SECONDS ); |
| 103 |
} |
| 104 |
} |
| 105 |
function rdx_shuffle_assoc( $list ) { |
| 106 |
if ( ! is_array( $list ) ) { |
| 107 |
return $list; |
| 108 |
} |
| 109 |
|
| 110 |
$keys = array_keys( $list ); |
| 111 |
shuffle( $keys ); |
| 112 |
$random = array(); |
| 113 |
foreach ( $keys as $key ) { |
| 114 |
$random[ $key ] = $list[ $key ]; |
| 115 |
} |
| 116 |
|
| 117 |
return $random; |
| 118 |
} |
| 119 |
|
| 120 |
$data = rdx_shuffle_assoc( $data ); |
| 121 |
|
| 122 |
if (!empty($data)) { |
| 123 |
foreach ( $data as $key => $extension ) { |
| 124 |
?> |
| 125 |
<div class="theme color<?php echo esc_html($color);?>"> |
| 126 |
<?php $color ++;?> |
| 127 |
<div class="theme-screenshot"> |
| 128 |
<figure> |
| 129 |
<i class="el <?php echo isset( $iconMap[ $key ] ) && ! empty( $iconMap[ $key ] ) ? 'el-' . esc_attr($iconMap[ $key ]) : 'el-redux'; ?>"></i> |
| 130 |
<figcaption> |
| 131 |
<p><?php echo esc_html($extension['excerpt']);?></p> |
| 132 |
<a href="<?php echo esc_url($extension['url']); ?>" target="_blank">Learn more</a> |
| 133 |
</figcaption> |
| 134 |
</figure> |
| 135 |
</div> |
| 136 |
<h3 class="theme-name" id="classic"><?php echo esc_html($extension['title']); ?></h3> |
| 137 |
|
| 138 |
<div class="theme-actions"> |
| 139 |
<a class="button button-primary button-install-demo" |
| 140 |
data-demo-id="<?php echo esc_attr($key); ?>" |
| 141 |
href="<?php echo esc_url($extension['url']); ?>" |
| 142 |
target="_blank">Learn More |
| 143 |
</a> |
| 144 |
</div> |
| 145 |
</div> |
| 146 |
<?php |
| 147 |
} |
| 148 |
} |
| 149 |
?> |
| 150 |
</div> |
| 151 |
</div> |
| 152 |
</div> |