|
|

楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////: A. n9 }& j6 o# z
// Theme Option3 J t, W$ @! H0 }4 L3 n
////////////////////////////////////////////////////////////////////////////////
) a% e5 Z0 @+ C/ {& K, N
/ o- H' t; Q: r/ c8 M. |3 C6 w$themename = "Zenx";* \; L) f1 o, v$ \/ ^2 T$ c
$shortname = str_replace(' ', '_', strtolower($themename));" l2 v1 v' o! h z, y& @
/ Q Z4 k; q8 ?
function get_theme_option($option)1 X$ @2 V y+ {- K- H
{$ l6 _9 }6 F; o5 J! H
global $shortname;6 v. c% i+ t: e. w! b
return stripslashes(get_option($shortname . '_' . $option));
' E6 ? F; i: m2 Q F! E}7 r4 v9 d8 Q) g& A4 F2 b
. z+ h% u9 c: {3 ^! efunction get_theme_settings($option). e# E% f+ E$ t8 f2 o W, U
{
& M+ r0 ^. M% Q return stripslashes(get_option($option));
; a/ L' a& {9 {. y}
6 Z, U6 J, W. H" E) M$wp_dropdown_rd_admin = $wpdb->get_results("SELECT $wpdb->term_taxonomy.term_id,name,description,count FROM $wpdb->term_taxonomy LEFT JOIN $wpdb->terms ON $wpdb->term_taxonomy.term_id = $wpdb->terms.term_id WHERE parent > -1 AND taxonomy = 'category' AND count != '0' GROUP BY $wpdb->terms.name ORDER by $wpdb->terms.name ASC");( s7 U& _( I3 m" n2 _
$wp_getcat = array();+ R/ V/ ?: i. i; _' [% O
foreach ($wp_dropdown_rd_admin as $category_list) {2 t+ ^7 ^6 f& P' @6 R5 a# |% }
$wp_getcat[$category_list->term_id] = $category_list->name;0 u+ P, w- E2 W* L# J3 D6 U
}$ Y, D( v3 }3 L) L# h2 m: F
$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
3 C+ D: b0 Z$ C5 D0 N$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");% [$ T6 \1 `; d
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");, R1 R+ F* Y, ~- B3 h
7 W- `5 p/ D/ V: Z A$ \3 E$ ^2 o$options = array (
E9 T( g8 h0 K* _: q) S/ z, |, M
9 Q5 b) V8 V/ I- w$ S& n6 r$ z
: E5 M2 V1 ]# Q% O array( "name" => "Blog Header Settings",& o; U9 J& n8 {# ~' b7 |! Y
"type" => "heading",& I2 V' S6 {1 D$ c
),
8 P3 W f; l% M
& p/ b/ a j3 L! S$ L array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",! D% m' r; s- ?; @8 @# a& D9 T
"id" => $shortname."_header_logo_activate",
. [; h9 ?. r* ~+ T u "type" => "select",$ i- I: u! ]. V( r& `+ H8 Q
"std" => "No",6 B' `2 @1 L: }1 R! ?0 `5 V9 A
"options" => array("No", "Yes")),* ^# h- y5 p) J- f/ ^* \) D, z
0 l. _! `6 `9 x
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",
9 o8 h# b. }: T2 L "id" => $shortname."_logo_url",4 N9 f& h8 v8 [
"type" => "text",9 L/ S( l( x! D2 C' y0 f
"box" => "social",, P6 q. N7 K8 f: B4 ^% {
"std" => "",
0 X1 m8 q6 P% H) L F, ~ | ),- C' ?8 C+ E: @5 t
3 s; k( x( n e; x9 Y$ F
array( "name" => "Insert Header Banner HTML Code (Header): w2 q: Z5 i& Y/ v' M# \9 v
<br /><em>*Recommended Size 468 x 60</em>6 F/ [; h) j; f
<br /><em>*leave blank if not use</em>"," S$ A6 u* v+ V6 L* z) s
"id" => $shortname."_header_banner",: z" D; ^; e: O: d3 x
"type" => "textarea",
' O. {+ Y* w3 e! [2 a0 k* \ "std" => "",
6 ^$ d g7 H1 P) {- j ),% |1 ^9 b8 D' |8 \. `* ]# T+ i6 F; a
$ J; x l; _: P% m- l3 |
array( "name" => "</div></div>",3 n- E$ f, `& t3 X
"type" => "close",
/ v8 L0 h/ S) F5 m- x- g ),
# c8 I+ |: K) t8 s& ^# C4 I9 ~' L8 n' A& {( l' l2 O: D0 y: _
% \+ E7 y8 Q) z- F array( "name" => "Header Navigation Settings",8 m3 p d# `+ A7 D; \
"type" => "heading",
: |5 B) E( _9 J ),- w5 b5 T8 ]4 g( V" x3 M* o# b
: d6 V9 Q' N" J2 }' ~
array( "name" => "Insert Page ID To Exclude On Header Navigation<br />
3 M' h X# q N, q* Z0 v! N <em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />
$ M# S+ X8 ^1 I <em>*Enter the page post ID number only</em><br />" p# U( O( p7 t+ j3 L) S% t+ m
<em>*separate by comma</em><br />
& o* V- w( u R, ~! B! M% A <em>*Exclude pages which you don't want to show on the header navigation</em>",/ y9 l# k# g, h4 q. z- n
"id" => $shortname."_header_page_navigation",
9 b8 t9 G; p7 S "type" => "text",
# p+ U2 L# D: S' @6 b "std" => "",1 A% t8 i0 s- U# S
),, r- G* K8 j1 c4 E6 F" T! W9 c
( }" g E+ l- `( W$ D array( "name" => "</div></div>",
1 m! d$ m7 W! A3 K2 k6 @ "type" => "close",
1 w w3 O! [6 k8 m8 I2 g( ` ),
, d3 ~# o7 ^1 p' X$ k9 H1 U
+ Q ^+ r3 l, h) c$ d
( a4 f0 X" k/ F" n% S% J! o array( "name" => "Post Auto Thumbnails Settings",
1 h$ z1 B% g, K# s }4 y "type" => "heading",
) C9 @1 k1 m$ @6 J. d" g' j; }- r ),
3 T; @) [/ ?) L/ W" j
5 \7 ~$ P2 X1 e' d9 e array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
4 [( e: Y' ^- L "id" => $shortname."_timthumb_activate",: M: _2 S' W; R2 b& H8 r* W
"type" => "select"," V7 p/ r. F$ \4 J1 \ n
"std" => "No",3 a6 Y( V% T8 \3 U) t" `! c
"options" => array("No", "Yes")),& }" c; d/ l% @2 J5 |7 c* e
% {& ?3 K3 A5 R
array( "name" => "If Timthumb is enabled, Please choose its cropping method",7 d; n! m# t* R$ q) z/ g
"id" => $shortname."_timthumb_cropping",, m* W+ _% Z& x' Y6 q
"type" => "select",$ T0 `( D0 T8 _4 ?/ q& h3 w
"std" => "",
. ^5 v: a, m7 P7 K, D5 H "options" => $crop_position),
; K' W/ A6 k% B3 t1 ^+ D+ q& u, k6 C; [- M$ V7 F# [
array( "name" => "Insert Width Of Thumbnail Image<br />" l C) A# j" C" w, w# a( A. I
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
9 k2 Y4 M. H1 X% n6 z# Z <em>*Leave Blank To Use Default: 250</em><br />",: O. a# _ H8 |+ p! i
"id" => $shortname."_thumb_width",/ Y$ n6 a4 u6 o: ?
"type" => "text",+ i! p. i$ Y2 ?2 s' n* V1 I
"std" => "",
1 i$ H3 S& S$ m- D* c& } ),
# s4 ]! t6 u/ E; |8 ?
: y9 K& c+ |! g& I# q array( "name" => "Insert Height Of Thumbnail Image<br />. I# Z5 ]& M5 r0 p% k
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />
! c. @; p: }9 \6 l g% F <em>*Leave Blank To Use Default: 200</em><br />",
! Q4 j/ ?# ?. ?. \. [4 r "id" => $shortname."_thumb_height",! l+ ^! ]; z7 a O; \3 P2 f
"type" => "text",. w5 a b8 R. `; U! @. d: U
"std" => "",$ j/ h, R; g. S7 } T
),
- _4 W+ v' q& n0 f' m
9 }1 A' z0 E$ h9 R9 T6 E array( "name" => "</div></div>",
7 E& s$ C; ?5 B/ s! k- l# G6 N "type" => "close",7 U ?/ h; A% D
),
2 i- D" R, t1 K* p
. N v8 M/ |1 x5 o. f( t0 q array( "name" => "Featured Content Slider Settings",
% g3 o& W# P) R* k4 W" x& J. a "type" => "heading",
0 j3 I" q0 K7 t% S6 _/ i0 @ ),
1 w! f0 U9 L x5 Y, i5 u* Y4 ~+ l) m) d3 g8 }- y! e: ^
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
$ d9 n9 ~/ m v9 J "id" => $shortname."_featured_activate",: t V @6 c6 V2 [
"type" => "select",
# {- t, x9 S' f7 t- ]- D "std" => "No",
, E2 l g' }8 U3 N8 ~$ I "options" => array("No", "Yes")),
3 w" O: p: r: K
8 Y7 c* K; {" I& c. I2 \8 j2 o
+ L4 B/ i: E, h& o; g array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
$ T5 G! E7 j/ M( }) d$ x, | ` "id" => $shortname."_featured_category",* H- Y+ U0 Q: N A' k* b2 [
"type" => "select",
5 P' q' K" X0 I1 I5 m9 T6 P "std" => "Choose a category:",9 E4 ^ v: d5 H+ k' r8 p. ~2 a
"options" => $wp_getcat),
$ |) q6 o0 z( u8 Y/ Z! S [* q2 M
# q2 L+ B P) j4 |8 Q! ~ array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",) j V( Q& j& F6 K! y$ G
"id" => $shortname."_featured_number",8 Y& }( K- m/ D8 G$ l& @: \
"type" => "select",
7 I& U, z U! Y: X2 T+ V( i "std" => "Number of post:",0 _) r9 W6 I: g; F& v
"options" => $number_entries),
- p' N8 `7 _. S/ q2 r
; ~9 \4 W. M, w: S1 I array( "name" => "</div></div>",0 ^; {# }4 e% u4 q" V& b6 {
"type" => "close",9 N8 {. u. @/ j+ C+ t
),
* Y/ \- u7 B( H
9 E* K+ z, ]- E0 t% b6 p6 i5 Y. }; \ array( "name" => "Featured Category Settings",
- c2 Q+ D' x4 V N "type" => "heading",( y+ m9 S& Y! k C! W) @
),# D9 Y# u9 M$ T( x) V% i3 {
- p# J* X5 c$ f& Y# u$ z/ O
array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
3 |* G; f: I5 l1 o- z/ ~4 |, f "id" => $shortname."_featured_category_activate",
, T9 l7 E# P5 G* o1 _! W0 r "type" => "select",
W: r' C+ F' n. {& ]" t3 B "std" => "No",5 d* |' O( Q" f) C0 t! y) O; {
"options" => array("No", "Yes")),
! j: x$ X) A3 h3 ^) T$ k
9 u, @3 }+ Z3 N array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",
1 ]! U2 V r3 ?' } "id" => $shortname."_featured_category_id1",
0 ]8 K# P, r( H" q4 S+ i: G "type" => "select",# O5 ~9 y! {2 o8 Y' @/ I
"std" => "Choose a category:",) ^1 ] h# O2 {; o
"options" => $wp_getcat),! r- R7 }0 c0 i9 ?6 B+ c$ N
$ D- D# v$ S, I! |7 b5 ~4 A6 ~ array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
Z& z; {+ r" G5 v5 |( y8 Y# A "id" => $shortname."_featured_number1",9 o% E; g6 r, U6 |* B
"type" => "select",
& l6 W- A+ g( @8 j, K* `1 e "std" => "Number of post:",
1 `, l( n7 ?8 b2 D E. o6 l "options" => $number_entries),) I F9 W i% B3 `8 ?
+ g! E4 d( B& x7 n M' T# U# z
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
# m2 A s5 q4 V- U- K" P% [3 Z "id" => $shortname."_featured_category_id2",# \% H8 E: q3 S9 p6 L
"type" => "select",
: }5 \' v- _' R, [ "std" => "Choose a category:",
! ?' Q3 M* J; s0 G" ] "options" => $wp_getcat), b, j3 M6 H; G1 D' |5 a
+ l* w1 I% l ] array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",! N4 G8 h+ U/ j* q* j
"id" => $shortname."_featured_number2",
5 j! Z- V+ r* I4 C# y7 Z2 [ "type" => "select",2 a. O6 j) S* E( [
"std" => "Number of post:",
1 z6 C0 \% H: Q z( ]7 M "options" => $number_entries),5 V( [9 ^+ P# u) c$ H$ O( { D8 d: ^
; |+ f* s# h# D* e( \+ L p% t / Q- K j/ a1 r n# g
array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
0 _. g+ {" M V+ g7 P3 z- y) b "id" => $shortname."_featured_category_id3",
! ?( f2 T5 h! K! d2 L. P "type" => "select",; q+ C" I; Q+ m( a# ^1 `6 F
"std" => "Choose a category:",
6 F8 Y! y0 D1 A+ o) C" ]6 K "options" => $wp_getcat),3 _! Q( x- P9 a' `
& Y7 c2 h* }8 `3 {" f r: t/ b array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",5 @4 r- w- o& G
"id" => $shortname."_featured_number3",$ x) V+ |; j/ [! m! x
"type" => "select",% R# H8 ]8 U& f; f* E- F1 L7 q* I( l
"std" => "Number of post:",( p- V s: n, f" w% ^
"options" => $number_entries),
w5 W5 W: N4 G# I; K1 H/ q) r' W. v# Y# c9 M/ A
& Z$ Q! U& L+ A) l1 W
array( "name" => "</div></div>",
, W# j% G; m# K- V4 B7 q "type" => "close",' w$ P* t/ r$ v0 u
),
' ^- k' j0 }4 z, ~; ~* \# M4 {: L8 l# c8 f3 z0 R
, k) ?: w# B9 @5 g1 g
array( "name" => "Google Adsense & Analytics Settings",
/ y0 W4 P0 O$ K! X "type" => "heading",
* ? v$ Z1 N! Q5 @+ M ),
+ O9 C% Q- z7 \% K, I
( S( c* c. o7 R# l5 ~$ v array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",, P4 \4 ]. r _. Z9 H
"id" => $shortname."_adsense_loop_activate",8 E1 p: Y- x" l+ ~
"type" => "select",
4 r& o3 E6 I8 D! g0 h "std" => "Disable",1 h3 v" I. t8 Z) n4 e% V
"options" => array("Disable", "Enable")),
& v* t v: c6 J; T+ W: ~# R
+ a6 w9 W ~$ z V) N array( "name" => "Insert Google Adsense Code For Loops Here<br />! u$ c; b# d+ ?
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
# G, s5 F3 i! T2 \ "id" => $shortname."_adsense_loop",
5 @9 [& o0 K& m# s' b" q& s "type" => "textarea",- x4 D( g2 ]8 F6 x9 [
"std" => "",) y# f# t7 C3 |* I# ~' S/ ~$ F* B
),# ?' F D/ Y. w& a3 L8 y+ V
5 U3 o) V: y; \9 o
array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",% M) N5 v. L; r
"id" => $shortname."_adsense_single_activate",& B. I8 K7 P4 }3 g! M! \
"type" => "select",3 h0 j$ D1 j' W$ u5 p8 C# y. M2 m P% g2 @
"std" => "Disable",+ a& A: b) J; L$ j( u% {/ o
"options" => array("Disable", "Enable")),6 b C- W' w. m8 J w7 ~
0 K( E' M; q# @8 f% E& ?* U9 D9 ~7 K
array( "name" => "Insert Google Adsense Code For Single Page Here<br />- r; j! D9 e5 W0 ^- W" [
<em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
8 {; e' ~1 {1 F8 F T* V0 T' \! Y "id" => $shortname."_adsense_single",
% X. {4 B9 N$ q, O+ j8 {& m "type" => "textarea",
' V4 e3 q5 u% K o" P0 e "std" => "",# }& y& K1 y$ x2 m0 I2 U
),
V, t3 c0 e2 f. X1 D: j' G, E3 [$ @, {/ M
) B. T+ Z( h/ L9 O5 D7 L
array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",
) X$ n$ s3 W4 a4 O/ v "id" => $shortname."_google_analytics",
+ G' b$ V* U7 E3 G! {2 g, r "type" => "textarea",
" d y5 `! p$ z( f; P3 t1 v) K* t "std" => "", A( X1 i5 h% A/ S
),
; _' c7 ]; d t( p" I% @ h7 U
' {7 h4 f- m: m5 i3 C. t: t! _7 y array( "name" => "</div></div>",
( _% A8 g: R$ ~) S! c, z7 h0 d "type" => "close",
% V- W- `* {3 N, v1 Z7 [6 H ),
; P1 C8 S3 L2 c. s3 R
+ B2 l, R! q1 k1 t) b! }2 P + F! ^8 m" y3 l% M- o2 D4 B
array( "name" => "AddThis Social Bookmarking Settings", x0 l" Z3 i i# s) B" h: Z
"type" => "heading",
* ^0 J" K* T( p, k ),( m4 X( S1 ~- ]! ?2 P
( P8 b S! S( t, d
array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
/ h T7 u- u# y5 c <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",
$ g s, D6 ?1 N3 ?+ I1 z' w "id" => $shortname."_addthis",+ }' N6 [) _8 y
"type" => "text",
2 I! ]! v% f2 z, d( j9 g) Y "box" => "social",$ s1 b! k2 L" V! @6 y) M F0 F- C5 N
"std" => "",, V1 }4 C, |/ W
),/ U" ?* m4 p! O
8 T( j$ [8 ?8 z( Z: f# r5 B2 T4 O array( "name" => "</div></div>",
- V! i" v0 M9 \' _0 v "type" => "close",
5 F1 e: ^( F9 }7 i1 S6 @ ),
0 g2 F" ]; s$ \2 f* H5 p' C5 k , H- s8 c+ `$ @: D: ]$ ~& e, q) W
9 h$ a4 P, h$ h' x5 q 0 \, H! L, `9 g/ ^( @
array( "name" => "YouTube Video Settings",- ^1 @; r. B! _7 s3 a
"type" => "heading",
, M. p% o. u; W3 C5 ~9 B ),
9 G" I: O' A5 s0 I& q
( X' O7 `' {+ s$ u- @, o array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",$ T" d2 k, h5 S. E3 I
"id" => $shortname."_emvideo_activate",4 R! U6 I4 x1 v9 ~
"type" => "select",1 g5 G1 h: [) U
"std" => "No",
+ K- p3 R$ |5 u; \0 g "options" => array("No", "Yes")),
" s! t$ m& |. E& ]% _! q
( [1 f* B- d" ~0 q array( "name" => "Insert YouTube Video Unique Code<br /><em>*You can find videos to embed on <a href=\"http://www.youtube.com\" target=\"_blank\">YouTube</a> site.</em><br /><em>i.e. Youtube - http://www.youtube.com/watch?v=<span class=\"redbold\">Hr0Wv5DJhuk</span></em><br /><em>*Only Insert The Red Bolded Code Inside Below Setting Box.</em>",
1 C' k. X' u0 r9 m, l3 C! L "id" => $shortname."_emvideo",
8 ]5 b8 e9 a7 Y# X "std" => "",
1 |/ _" A) U: u' i P$ M "type" => "text"),3 R3 W/ J. q, K5 t& I
# ?8 j( A: w5 G9 t9 T) p( \* |6 B
array( "name" => "</div></div>",
$ W! \/ |+ P1 r/ a, c$ i "type" => "close",
3 F( G! V" d9 q* @" i6 Q+ | ),
; F9 C, N, o5 `, `& ?- P
2 `; G D' H2 K! D/ i9 a$ E array( "name" => "Twitter Settings",: l$ [) ^0 m0 s3 Y% R1 l
"type" => "heading",
, d: ~6 [ q8 B6 C8 [ ),
* Z O+ h& \3 e; F: I3 l! |/ y9 T: ]6 t
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",; {" Z- S. T2 e* B4 w( `; l( T
"id" => $shortname."_twitter_activate",) b4 V3 i! |% Z3 l) _
"type" => "select",
+ y a$ V: h: {) `# x6 i- j9 c "std" => "No",+ i. S( v+ _9 A, U# y7 {
"options" => array("No", "Yes")),
9 y, l3 ]9 K3 ]4 @9 d0 R+ A" r: K5 P$ e4 Q F- a- h
array( "name" => "Insert Your Twitter ID here& N- b/ M$ n' c9 {
<br /><em>*leave blank if not necessary</em>
' d+ F' r6 i9 z+ H <br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",# x$ d2 V6 g% A ?
"id" => $shortname."_twitter",1 l8 j# [& ~3 J! C
"type" => "text",; @7 P" }, R$ p* {
"box" => "social",' w! B0 T5 e! G
"std" => "",
% v1 D/ ?8 d( l ),
" g) z! F$ q' ?/ P- |3 n
% {9 s1 {% D! I array( "name" => "Enter Twitter Feed Count here# G* N" w$ ]9 K O
<br /><em>*leave blank if not necessary</em>0 r6 S: ]" V2 J2 L5 s& S
<br /><em>*Enter How Many Twitter Feed To Display</em>",
/ D$ z9 m0 ~. ?, K% ]# H) Y" h "id" => $shortname."_twitter_count",* u. T' T9 R& `8 @0 B1 {
"type" => "text",
5 Y) y& c$ m. m/ V) G6 O/ F "box" => "social",
7 y# Q1 M/ W) d- _ "std" => "",3 H: V, l9 z0 [
),% C- ~9 }* d# F5 b
- _+ \& [ K c# O
array( "name" => "</div></div>",& [; A( }, S; I
"type" => "close",* K0 t; P9 [% p
), a3 k$ M6 _* i9 p
M, j/ H5 N% {& V; n7 S! B7 v5 ?' B/ i
array( "name" => "125 x 125 Banners Advertisement Settings",1 u5 {8 A4 E2 w" a! m6 Y* l, J
"type" => "heading",
( x+ q" ?0 h# N+ }; l6 L1 `& t3 q ),
4 g( O% Q) v# c) q5 @% b9 V
& Z. \/ J# ]( ^8 F8 _6 x array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
6 Z6 E- c$ s; f, d! L" ? "id" => $shortname."_sponsor_activate",
/ X7 f5 r9 ^# D1 y @ "type" => "select",5 g* f0 X1 }' i
"std" => "No",
( _( U% c3 X& d% R3 J "options" => array("No", "Yes")),
2 G# \8 U e1 v2 _# r
9 z! e0 ]* u3 L# y) j) u; d: R' G7 G' M$ \3 e* H e
array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",& b9 v: {( [3 e
"id" => $shortname."_sponsor_banner_one",
, F; \* l' X0 l- P; \( K "type" => "textarea",- ^5 L$ d$ o L# a0 K' ~% M
"std" => "",: Q, C* X0 Z: v: Q* C; \* k
), - ?* S2 t+ x7 g8 O: ~+ g/ P
2 P2 l0 s6 Y. [. Z
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",1 Y6 D0 |" h. ]2 i/ w
"id" => $shortname."_sponsor_banner_two",; i; r. d! U: @% n" p. G
"type" => "textarea",
8 V: O. d1 ?/ n" Y. |) m "std" => "",
# K6 A5 M, d8 {/ r ),, f4 K+ _& V5 W8 X9 }; B$ J
* D$ e/ t9 r! S0 V/ [/ ` array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
. o+ v2 Z) T% q5 u "id" => $shortname."_sponsor_banner_three",
% l# x2 ], v3 R "type" => "textarea",
. N C3 G9 e" w5 \" w "std" => "",% r/ f$ ]2 E& V0 M
),$ k- h5 E" B3 E" M- @! d. Y
h/ K( J) G6 N4 G) { z$ |5 @
array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>",
! P, M+ s3 m5 L2 `) \ "id" => $shortname."_sponsor_banner_four",- T1 ~5 [4 U' r5 W% h) v" Z1 d3 k
"type" => "textarea",
e u- y7 ]2 }7 m1 _4 X8 K "std" => "",
" q4 ~/ w# o& s3 R, G5 ^ ),
, y8 z$ P9 c. }5 E! b1 d* ` I6 h8 i
* k, A; |9 X0 `2 @, y0 a8 u. p* e array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",! l: H T( Q& b0 w/ u3 R( h
"id" => $shortname."_sponsor_banner_five",
) a! r L$ J4 e# a) v% P$ O" l$ i2 J "type" => "textarea",' H. [+ j3 s4 l2 x& B" F
"std" => "",
S4 K8 z1 i( R5 D3 Q( E$ [# L ),
0 g |7 H0 Y- o5 ~& [/ a' v; X6 f6 g; `6 M+ e
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
' j" ]+ o. _5 X "id" => $shortname."_sponsor_banner_six",- f- [4 q6 u5 z
"type" => "textarea",
9 L3 m8 T' g# ^* s9 x" v% c! t "std" => "",- K( r5 H3 ~% g3 z v9 t0 K
),: w9 T7 N& A' k0 F: {
; d1 u+ @9 o) l1 G* Z
array( "name" => "</div></div>",
" @& C* {2 c* {4 [ C; ? "type" => "close",
: j S5 ?) H- J/ z* }- \2 C m, }: e ),
0 j) @( J; M: G/ k2 f- @ r' \, n0 O- ~8 t, C
/ _: J$ X3 q h, ?4 m" g
/ L! h3 e4 Z8 ~8 A/ j0 ?! }4 v);
1 D& u9 U5 N% U1 a9 F8 T+ w9 T5 H0 b, ^2 R; `
function mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {, \ b% s) x" M
$ v# u" M% g0 S3 t( g* [4 F' _& |
echo "<div id=\"admin-options\"> ";" u1 I" g) S! N. V( G3 l& f$ p
+ t/ P! ?% ^5 @5 f% Y
global $themename, $shortname, $options;
/ `! E) T/ R; Cif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';
+ B' |6 w% y0 p. w7 dif ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';
" M' q: e6 |$ c0 ^: m# ]8 k9 S?>7 T3 ? K. f: l) a
) T: h& B9 x+ G) B% N<h4><?php echo "$themename"; ?> Theme Options</h4>
) I. L8 g6 K5 t: N( P2 X. E. z4 _6 q U! }, @0 U ~' P, `5 V
<div class="annouce">
, Q& M2 x9 T# [$ c& w<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
, E& m0 k! T5 p4 I0 V<p>Don't Forget to <a href="http://feedburner.google.com/fb/a/mailverify?uri=MagPress&loc=en_US" title="MagPress Newsletter" target="_blank" rel="nofollow"><b>Subscribe Our Free NewsLetter</b></a> In Order To Receive Theme's Updates and Fixes.</p>
+ m% o6 |; F% X</div>
9 r- y6 v2 y3 T7 t) Y. n w5 [/ Z% p8 l7 h
<form action="" method="post">7 u; Z6 c* Q0 L0 Y+ e# F/ w
( `* Y' D/ J. i! K<?php foreach ($options as $value) { ?>4 g- m: ?0 j3 t/ q
# H" M: |7 T1 E1 g<?php switch ( $value['type'] ) { case 'heading': ?>; B b( Z( v: o$ ^
( ^$ s$ o/ D+ t$ Y7 b+ m- s: r
<div class="get-option">) c) f5 G) z5 H! [- f9 e
8 e B! H( f2 n3 d! G) l; j9 K9 x- X
<h2><?php echo $value['name']; ?></h2>
4 ` m( E) s! F0 g" N2 M5 z2 c/ ^8 K6 `! a3 D( B, o$ ]; X( b
<div class="option-save">
* M# A1 Y* i5 R: ? c: x' D0 k4 l, a2 \9 t" J
<?php/ c+ R( o! w4 J+ [. F( h, q
break;
: |6 g1 u e e4 |; y5 J T% f1 Ncase 'text':
" f4 r2 ^) [9 M% [$ [) E% w?>4 u1 w0 T$ i" [/ A4 t4 [
6 O2 P# s* b0 A+ B<div class="description"><?php echo $value['name']; ?></div>; E5 Z# f( T5 w/ c- b
<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
* X3 u/ e8 S! w; \: g" ?
" i2 ^7 ]0 S. x7 L8 s" t _get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>* e/ X1 U/ n2 O4 [: m7 ` k9 {
/ P' d8 K, ]% C: G- d
<?php
8 T% _) i% y2 O z0 R6 e6 Zbreak;
' o, f& P2 V9 B4 Acase 'select':' q( d7 ^8 I+ W8 d
?>1 S) u4 \# A8 {5 M) H4 |
+ L+ v' N( x4 w9 l9 e, G# w<div class="description"><?php echo $value['name']; ?></div>
) d1 {& {" k8 W ~% I# M- [<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">
! Y3 k* Q8 h7 c# A; p- V2 r3 G<?php foreach ($value['options'] as $option) { ?>. C8 I9 z6 | J( U
<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>2 G4 f! @% l( ^! e( o8 T2 r
<?php } ?>; L0 m8 b. M }1 Z3 c" P
</select>: ]$ H( w( @4 l0 R3 _
</p>
/ K0 U' c+ d# R1 h" K
/ b' o$ F& S% A( ^<?php
" k L* F' j; e) r, F- cbreak;( R2 s- ? J! n' [5 |7 N1 e2 P" G
case 'textarea':
0 E4 I2 } f7 F+ H6 u$valuex = $value['id'];6 E$ c( q4 \$ j
$valuey = stripslashes($valuex);
' e# F; {; L; m; U2 W9 l4 w: [$video_code = get_settings($valuey);; w- M. k! Z8 x& F
?>4 U6 x/ C. t1 I
$ k# w3 P# {( p5 D
<div class="description"><?php echo $value['name']; ?></div>, {* w6 D) z! w( k
<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }
& t; g/ `8 Z9 g: e! u. D1 b; S# u
else { echo $value['std']; } ?></textarea></p>. }) E7 f9 D I% f7 f2 O3 t
/ d' S6 _2 c" g9 c' C( N) `3 Y2 e
<?php
' n. `; z/ T. r; ?break;
+ s) X# q4 C' E0 B2 pcase 'close':
9 \# z# M& Q. O: L! ??>
- ^/ h* T" [# t0 ?: Q
8 ^& y6 i/ V5 \! M. |0 Q<div class="clearfix"></div>
* j* w. \' o; B* b1 W2 O9 @</div><!-- OPTION SAVE END -->
6 p/ }7 O: Y# p* v/ q2 M6 s" H. x7 C5 V0 N; M% d0 F
<div class="clearfix"></div>0 p! u; X6 [5 s
</div><!-- GET OPTION END -->. o7 x. y( {* J; @
2 T) q0 w( a6 B* M- U
<?php! K! s5 t# L7 S" A* b/ Y
break;
8 M! g9 V4 `! {/ u/ zdefault;, a: G% V, Z: c2 @
?>
C/ j J) \+ @8 B7 S( [
5 X9 z/ R4 H! @0 x; j/ D, [6 g! Y' s( v. x, ~8 f+ w
<?php% x% {% Y8 k' x8 E
break; } ?>% ?9 }' J+ s; @. p7 j/ w) u
+ e1 m: W" f# d. u0 a3 [; g; g<?php } ?>
' }6 A3 J' h; l
4 }* z2 [' J+ q, v& Z<p class="save-p">5 ]7 K' M2 Y( s4 n3 ~
<input name="save" type="submit" class="sbutton" value="Save Options" />' j) k# [4 s" y A) |7 v" t
<input type="hidden" name="action" value="save" />
# ~# ^, q, R5 Y</p>2 c& v; x0 x3 y( r; e8 k
</form># p3 K9 Z8 n1 B* [" n* A$ P" L. ^
6 n; p: S! v# N<form method="post">
& f+ m, ]0 x2 B o# E<p class="save-p">
6 f0 v0 d% Z2 A9 P, b3 H<input name="reset" type="submit" class="sbutton" value="Reset Options" />
2 X- v. Z ^( E+ I9 m/ O<input type="hidden" name="action" value="reset" />
# U# h2 x% j+ U/ S</p>" w, f5 @% R5 L8 }9 V# V
</form>! E0 j9 c- M7 p! {7 j
: \0 f$ S, @1 o1 S2 _</div><!-- ADMIN OPTIONS END -->
& [$ D: e5 X* s2 `
7 j9 Y, @* H+ u$ v+ `/ K<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }" I7 P9 Q$ ~! A5 w1 `
, d4 o+ a3 _+ _& {6 z# V! {8 ]function mytheme_admin_register() {: {% r( O0 z6 @1 r$ A
global $themename, $shortname, $options;9 w9 p6 y3 g, y: V! t6 ~9 n4 X* l
if ( $_GET['page'] == basename(__FILE__) ) {
% f3 |( x- c' mif ( 'save' == $_REQUEST['action'] ) {
- M$ K5 s: [( Z5 _' b5 ]foreach ($options as $value) {
j9 a. w( ~( f i( Dupdate_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
" [7 H6 H2 ]6 @5 J, m2 F4 kforeach ($options as $value) {2 \- m) W. l9 c0 b. e |# ~
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
6 W6 a. w* M* g6 Mheader("Location: themes.php?page=functions.php&saved=true");( k/ ~( K7 W: _' Y; K7 j
die;9 t- ? Y/ J* u! ?6 \
} else if( 'reset' == $_REQUEST['action'] ) {
1 `. g5 c3 ^8 d9 T$ H* y5 E* p$ mforeach ($options as $value) {
0 L/ W$ T+ t8 hdelete_option( $value['id'] ); }6 N9 c3 u" q# i+ R
header("Location: themes.php?page=functions.php&reset=true");
$ o/ Z- L* {1 ~die;3 S" g' G4 I$ P7 o4 ~
}
! p$ b& @' A' N" u: y! h}7 r0 P$ r; ?1 I& C1 g
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');$ s3 G/ T: _3 f/ `
}
8 A1 r% Y3 k* P. Q! a8 F& q3 N1 G9 s4 T ?( r/ y
function mytheme_admin_head() { ?>
, Z! F" [9 v5 ]/ l- S" |2 P+ {<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />, _5 v4 Q. N# |# P" V) r
<?php }9 V8 q8 {. i) a+ [: O0 p4 w. V
|
|