|
|
楼主 |
发表于 2013-1-17 17:37:25
|
显示全部楼层
////////////////////////////////////////////////////////////////////////////////6 ?" b6 \% b5 k5 l! |
// Theme Option
R1 j6 G- L8 R- o% h////////////////////////////////////////////////////////////////////////////////
3 [( o& s0 `" k) @2 s% f! h+ _8 y4 m& q n" Z- i
$themename = "Zenx";/ N: f7 S: w5 L' U
$shortname = str_replace(' ', '_', strtolower($themename));/ z# U1 V& E! D; r4 r4 M
n4 q6 ` w! t4 o) T. u+ ]function get_theme_option($option)# I" f6 N9 k% I& b# Y# D% a! [$ o
{
; s. b, [* ~6 C3 d global $shortname;/ o1 `* m% [0 K/ M* h* o
return stripslashes(get_option($shortname . '_' . $option));( B4 k f ~, k- R, n
}$ u' n) o: n- n- I6 c
5 n* ~: P M2 d8 K: ]
function get_theme_settings($option)
9 Q' W% t- S# g8 v3 p+ s{
7 W0 e) k! A- g0 R! M# j return stripslashes(get_option($option));* i4 X# w W( @/ [& K' J
}, D/ U4 K. N7 D7 `7 v
$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");4 L( k" `6 R% ^
$wp_getcat = array();
0 }: A- k3 Y G( bforeach ($wp_dropdown_rd_admin as $category_list) {
% O; q* r+ p/ F, w7 d- k3 ]. V$wp_getcat[$category_list->term_id] = $category_list->name;
. S0 z n _% N0 M$ S}
) n; e4 G2 |4 g) Q% E$ y3 V' A4 \! Z$category_bulk_list = array_unshift($wp_getcat, "Choose a category:");
* @$ n8 R! R) M& b/ t6 t) J& d+ e6 f$number_entries = array("Number of post:","1","2","3","4","5","6","7","8","9","10");+ R5 J3 j( |- D+ A
$crop_position = array("Choose Crop Position","middle","middleleft","middleright","topcenter","topleft","topright","bottomcenter","bottomleft","bottomright");
+ ~- n3 v% Q" {
; k2 h+ @' T/ R+ ^3 @6 ?3 }7 d$options = array (4 B: ?! }" s7 k: V
3 e% b& P2 t4 T6 B+ I3 X9 N
8 |) ]/ P8 M3 P. [* l* C array( "name" => "Blog Header Settings",' U) P1 d, _3 D: t* I- |' t `+ b
"type" => "heading",
& M M& y& j* M9 Q# V0 \ ),. J: Q, W% a9 y
2 j) V* p6 Y6 C, B4 q a$ C
array( "name" => "Use Custom Logo On The Blog Header?<br /><em>*Disable by default, Choose Yes to enable it.</em>",/ c/ @8 B/ I' |. N
"id" => $shortname."_header_logo_activate",
/ p' S- J( O" g8 e0 Z/ E "type" => "select",
9 W( c4 t2 H o0 D) J "std" => "No",/ |4 k: @7 ]+ h, ]6 w+ D# }
"options" => array("No", "Yes")),
& B9 I. s8 I7 F6 h' V/ w& n! h, U5 c0 E! A/ r
array( "name" => "Insert The Full URL Location Of Your Logo Here <br /><em>*leave blank if not use</em>",' c" o2 H" C4 F8 h8 f; T6 e& H; p& b
"id" => $shortname."_logo_url",
% N, t9 }, F, { "type" => "text"," M. k, O" E- ?' G/ ^
"box" => "social",5 ? X/ j: Q# S! a: r2 K4 R) m
"std" => "",' a+ |! y1 z8 i `" L
),
P# C" ~ h9 I4 j# h v
8 T& b" ~% H. A" u3 F array( "name" => "Insert Header Banner HTML Code (Header). I5 o: s3 x8 H
<br /><em>*Recommended Size 468 x 60</em>
) k# p# ^9 x! w0 ?* [ <br /><em>*leave blank if not use</em>",; C1 U9 ~ m* |) S
"id" => $shortname."_header_banner",
4 o' y S- k) O( m& `# `1 i "type" => "textarea",
: G" J9 T- A1 w! o "std" => "",
0 |6 S/ O# ]" @8 m- U- h* t; n ),# z4 J. k4 H0 p
1 A& Y$ x9 k3 K' n" o0 h array( "name" => "</div></div>",; F! j U# ~) S; I' l- t
"type" => "close",) T# H6 k9 m" h; H* x p9 c( n8 |
),
9 A0 K+ \; `+ }6 ^& a' K7 w. Q. |: p& B& u. G7 S
f2 C; U* G- D; P" I
array( "name" => "Header Navigation Settings",
f% M6 U& q* h# O/ ?6 h4 Y "type" => "heading",8 e; S: _* B. ~# i5 z: r4 `
)," _+ A( v3 E, i/ j* Y- ]: F! ]6 @
7 I5 W l/ ]& k. r array( "name" => "Insert Page ID To Exclude On Header Navigation<br />: Q; p% g# B/ I/ g& B
<em>i.e ../wp-admin/page.php?action=edit&post=<span class=\"redbold\">123</span></em><br />6 [1 @7 ~3 `6 z! [( C- u- c
<em>*Enter the page post ID number only</em><br />
& J$ R" x8 n: p6 b. A <em>*separate by comma</em><br />
, b% b* A& z e1 L) W. F) z <em>*Exclude pages which you don't want to show on the header navigation</em>",
* ]" q& w* t' V* c( J$ n' _( H2 A "id" => $shortname."_header_page_navigation",
! h: Q- c% L% B0 C$ S( \ "type" => "text",7 k- | N8 x: Q# R) ^: g% t
"std" => "",
7 C1 @. P1 w, r0 W W1 n6 x1 Q2 C ),
( q: b: ?$ h2 r, |3 M/ }( |3 q- V3 |& `' u- ]- w- S, m! h
array( "name" => "</div></div>",) ?* J( M% X: G5 ~/ t
"type" => "close",3 ~$ F. {. O* e" C% ~ | Q4 H
),
! M( c3 g2 l- d
* [7 p! t# `" ~
, Y! Y# n+ x$ s6 @3 F$ W2 b array( "name" => "Post Auto Thumbnails Settings",
9 m' J8 ?4 V/ ?0 c/ p1 ]4 ]) B "type" => "heading",
, W" @( `" G" b8 Z/ F. M% V ),
V% i# \1 D+ `& v% D- D ( i- _& `$ H$ H
array( "name" => "Use <strong>Timthumb Script</strong> For Auto Thumbnails?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
2 ]+ x) G( p% q* }# e "id" => $shortname."_timthumb_activate",
( A9 d: [# D6 d* | L "type" => "select",
% E. l: R( M2 `1 d8 A/ ^ "std" => "No",
7 Z4 J N* M4 X: K3 l* p5 F "options" => array("No", "Yes")),# i# }- g! A4 B; {4 \
0 e- F( ]1 {# P) h) H
array( "name" => "If Timthumb is enabled, Please choose its cropping method",
( ~: j# Q v( z+ s+ D "id" => $shortname."_timthumb_cropping",
! K( e; l# o+ g; p: ^! x# |. J ] "type" => "select",7 J) H- r0 M- e# \- }) T
"std" => "",) [4 o, B% P! Z+ O* K. m1 h
"options" => $crop_position),- ~( @; e! q) Q' Y8 L; E
7 C6 J5 r* A! a3 d: Z3 }, S
array( "name" => "Insert Width Of Thumbnail Image<br />
$ Z4 ~% I; F3 w <em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />4 v) W5 l% N8 w% m: ^ f# S
<em>*Leave Blank To Use Default: 250</em><br />"," h/ V* Y! Q! M5 N( s7 H
"id" => $shortname."_thumb_width",
! U! Q f1 }9 ? "type" => "text",
* l1 Z9 x+ l K! M7 v# v "std" => "",) ]2 i: H: h8 o: L. d4 _
),
( U- C1 Q, U ]. d2 `
+ n5 N a( b4 E! v& W# b* G- _ array( "name" => "Insert Height Of Thumbnail Image<br />. y: C4 p/ E& Z: `! {% X+ f" b
<em>i.e. <span class=\"redbold\">88, 100, 150, etc</span></em><br />! U: l9 o' Y9 W- }- W6 K4 E
<em>*Leave Blank To Use Default: 200</em><br />",, f7 q% |+ Q* X# S3 T$ N
"id" => $shortname."_thumb_height",: C! x% }( ?0 T' i
"type" => "text",3 ?1 `/ Y0 E& q6 J3 c
"std" => "",/ H9 a# D; L+ m; k$ m/ p
),
+ R$ U3 B& p; x) Z% |- P" M0 f$ O+ |0 J2 C: P2 r! b
array( "name" => "</div></div>",
( ~7 Z" V# ^ r- I, O2 T "type" => "close",7 P9 C3 _7 f8 r# }! E' p3 e
),
- Z; e- d; z% z' ^* v! w7 e+ N6 y) K) L
4 v" \" ~' ~' g7 @/ K5 W array( "name" => "Featured Content Slider Settings",7 U) P# y9 M3 T6 d
"type" => "heading",
* G7 l$ C5 f) g ),
; R6 S9 x: M( O: b5 k- H. G3 N7 P( M; S' p( h: T" U, b1 o
array( "name" => "Enable <strong>Featured Content Slider</strong> On Homepage?<br /><em>*Disable by default, Choose Yes to enable it.</em>",$ e2 o+ ?8 O% q6 i2 {
"id" => $shortname."_featured_activate",
! B; ^0 v: \: G! H "type" => "select",& J! n4 u" f" q# R. `4 y
"std" => "No",
/ a L, Q4 N' U9 R+ o "options" => array("No", "Yes")),4 K& V' d; ~1 L' e/ }; i3 x" w$ r% K
3 `% K& @8 Y: U B+ \1 P# d2 u- Z" Y. C! V I8 E+ Z V P/ q* R
array( "name" => "Choose Which <strong>Category</strong> To Put On The Featured Slider?",
, R4 w6 k7 l4 x: i$ j "id" => $shortname."_featured_category",
c! s' }6 @( J2 h "type" => "select",
: B% a: ?. ?! ~& U4 X "std" => "Choose a category:",
/ k3 ?& c9 ]/ t5 E4 u6 ? "options" => $wp_getcat),
/ Y. [6 w9 r; F* a; c2 }
7 a# S+ B8 P; D# v& q; y5 q- w array( "name" => "Choose How Many <strong>Post</strong> To Show On The Featured Slider?",) ~5 L; g/ i ~2 x0 c
"id" => $shortname."_featured_number",( G t* X( h' u0 g9 S7 Q
"type" => "select",2 E1 f% i. \# F" B# m
"std" => "Number of post:",+ e& w y/ B4 x D' J- }& T
"options" => $number_entries),
; b6 |% V- x& Y( ~8 B1 i* T5 \: }/ {
array( "name" => "</div></div>",
1 \+ H4 C1 K8 Y0 H% z "type" => "close",( b. ?3 Z: E3 e2 J% ^
),. z7 G x, G0 I# h, e- V" i5 {' z
& B% n2 @8 W P% F: V0 `6 a* m array( "name" => "Featured Category Settings",
% m* X. I( w) [. A% {) {, {/ Y. E "type" => "heading",3 D% }' n m5 p# V
),8 A) B9 \" B9 ?, e( R3 U0 x2 W
$ X8 U; u* ~: {: j' ^# A array( "name" => "Enable <strong>Featured Category Showcase On Sidebar</strong>?<br /><em>*Disable by default, Choose Yes to enable it.</em>",
8 C7 \/ s6 K; R! X+ P5 I "id" => $shortname."_featured_category_activate",' L# E% B5 K* J% Z _ C" B% ^
"type" => "select",: M# B6 k7 g# J& Z5 K
"std" => "No",) [' P" k9 b* [0 F* w- ?: L0 g
"options" => array("No", "Yes")),3 d* w( F/ D% e1 [$ Z% l4 W5 o5 s
7 ^8 I+ j/ ]/ \$ D; c' ?, ~8 B& |
array( "name" => "Choose Category To Feature On 1st Block?<br /><em>*Leave it as default if not use.</em>",# F: g" @1 ]1 j. y+ O6 u1 S; C
"id" => $shortname."_featured_category_id1",
7 U" Z( j4 D: c j: i "type" => "select",2 g$ F5 [; V3 z6 t0 O) @
"std" => "Choose a category:",8 X# B" o$ H% t( r/ {( U$ s+ m
"options" => $wp_getcat),; C' e9 B$ V# S g
- B {% r% m, X! Q) I' |
array( "name" => "Choose How Many <strong>Post</strong> To Display On 1st Block?<br /><em>*Leave it as default if not use.</em>",
3 ^+ s) }3 `, z "id" => $shortname."_featured_number1",1 g+ }) D, F6 u: x: @% r$ D
"type" => "select",5 L7 h* |; d" F+ |0 }5 q
"std" => "Number of post:",
3 Y D ?, d9 d+ s, y "options" => $number_entries),8 Z+ X' T+ `7 o) y0 e2 M
6 F7 k6 B* Z" O# m t
array( "name" => "Choose Category To Feature On 2nd Block?<br /><em>*Leave it as default if not use.</em>",. L, g& k" o9 b8 Q
"id" => $shortname."_featured_category_id2",
8 I' e; H: l; H. E9 ] "type" => "select",& f; n# \) O" I% n: o
"std" => "Choose a category:",& B( q# z$ Y* r6 M9 [% R; K
"options" => $wp_getcat),
2 A" X% Q _# ^/ O5 x2 F J* m
# o( W+ N9 b! r9 V array( "name" => "Choose How Many <strong>Post</strong> To Display On 2nd Block?<br /><em>*Leave it as default if not use.</em>",
c$ v& }. U% Z$ ]" |$ x "id" => $shortname."_featured_number2",6 k( w3 y' P2 E# d3 d# g7 w) ~" Z+ A
"type" => "select",
" \6 e5 ?* ]1 G+ e5 ?! O "std" => "Number of post:",
1 }" A% i0 |& w- F6 O: \6 N "options" => $number_entries),
8 H# `# x- l/ S" }0 A. p# a
" n: ]8 L3 ]% V) k, ~) n, s
5 p R. j$ L1 a, i2 W Q4 j array( "name" => "Choose Category To Feature On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
% \8 q g, d, ^2 O% ]# b- v! J "id" => $shortname."_featured_category_id3",
: |- S# {' r% V% q6 H# w! x "type" => "select",9 U. y3 Y% w+ f# i* W7 q7 p7 V
"std" => "Choose a category:",
! {; z: i: F2 Q# u "options" => $wp_getcat),
) n" J- X3 C( T1 ^; R) M
; x6 e; z( E& t6 I; c" c array( "name" => "Choose How Many <strong>Post</strong> To Display On 3rd Block?<br /><em>*Leave it as default if not use.</em>",
0 l, `0 [1 v; v: m- L2 e; f- R "id" => $shortname."_featured_number3",/ }% v( W& e7 o6 i3 k: W
"type" => "select",
$ b2 U) r9 ~. c% \/ t [) D# V "std" => "Number of post:",
6 t ]: t1 L% w$ b% q$ j# U "options" => $number_entries),
0 P( a& d; s. C8 M, r* W
+ v6 h2 K( N& {. F' Y, K4 c9 b* x/ V& `, l% }
array( "name" => "</div></div>",
) E, o, K: l7 F: l "type" => "close",
% J6 _9 Q% r+ i+ f/ p ), [0 w% Y" t+ \& j e
) ^$ _* { \5 v. o$ J* e0 i
8 l& R" K4 D2 s7 u0 O4 \- t
array( "name" => "Google Adsense & Analytics Settings",$ W8 g S6 P% [" E
"type" => "heading",; W/ f0 q; d& m0 V5 q, ]0 z1 T
),' D0 h g/ @- B
2 W6 I% }( K( _& @
array( "name" => "Enable Google Adsense Loops Within Posts<br /><em>*default are disable, you can activate it by choosing enable</em>",
6 e6 f3 A2 @+ w" t "id" => $shortname."_adsense_loop_activate",
. ^( r0 b N$ n W8 w0 t7 ^ "type" => "select",
( ?: Q: k% @5 |( t* B "std" => "Disable",& q) q b$ f6 k2 G3 C& T
"options" => array("Disable", "Enable")),
' F) \/ N1 [0 l" w+ ^% F5 c3 \ M
4 A" ^9 s4 Z: H- h" l R) s array( "name" => "Insert Google Adsense Code For Loops Here<br />
" ]9 B5 }3 b# V <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
( a) @! p$ |* F" g+ K "id" => $shortname."_adsense_loop",
0 V! p# e7 U+ |( L) T, o3 m "type" => "textarea",0 U, S5 D' J) ]6 n' \9 y/ R
"std" => "",# f" z5 a5 O7 h9 n0 S0 l9 c
),- i2 J2 e+ T0 U7 v. j
- |* ^% C+ l w8 n array( "name" => "Enable Google Adsense On Single Page<br /><em>*default are disable, you can activate it by choosing enable</em>",
9 x' ?4 V, n5 _. K* m "id" => $shortname."_adsense_single_activate",
& ~) A- ]4 Z- F5 f& x5 \' D "type" => "select",. u9 a$ o: ~6 a
"std" => "Disable",; b) N5 M% [- T% y {
"options" => array("Disable", "Enable")),3 |5 }: J0 _ F, F3 ?
0 }3 _9 T9 {# S0 _! t* b0 s array( "name" => "Insert Google Adsense Code For Single Page Here<br />
& G, P; \+ E* p, d! [- U* T <em>*Copy & Paste Your Google Code Or Affiliate Network Banner Code Here</em>",
2 b- c3 Y J) D4 X5 W "id" => $shortname."_adsense_single",
' U$ R _1 P9 i& j4 A# @( ] "type" => "textarea",
+ X0 c" e( V5 Y6 Z `7 W* P "std" => "",
6 n9 s$ H1 R! V) ~ ),
8 ^! D& L5 b' o1 ?$ x4 `8 m* L! x8 p# R4 ^+ L' D( V4 ~
) t3 U# |/ E8 K& ]& [" F1 ] array( "name" => "Insert Google Analytics code <br /><em>*optional - leave it blank if not using</em>",8 g* z+ A( x, { N: w
"id" => $shortname."_google_analytics",* P7 r- u% C$ ]( \9 b% X' I
"type" => "textarea", i0 E3 k- M0 G8 G {
"std" => "",6 X' I5 O& [) [% y# M/ p5 N7 ~
),
: p. j: z+ j# ^* P4 I' R" V, |
! U$ M, M& X _/ r1 W$ a array( "name" => "</div></div>",
8 A2 H1 e( b) [1 ~: \ "type" => "close",
/ k5 r& R- @7 s9 C3 V; w& n ),
+ P/ L' e1 K c" L 2 v7 H0 X$ `) m/ c. f7 l6 o
4 f) R3 p/ ^& g2 l) i/ u& r3 z" |
array( "name" => "AddThis Social Bookmarking Settings",
: }- [" M: l) p% M9 r( H; y "type" => "heading",
) o7 y5 E6 c* Y4 O, c1 H ),
+ A/ E. {/ |$ Z) u6 A( h: R
9 O- M! k" @6 v! f" D array( "name" => "Insert you AddThis ID here (Only For Tracking Purpose) <br /><em>*leave blank if not necessary</em>
5 v; ]( t$ i3 l& `) l$ V& m <br /><em>*Get a Free AddThis ID <a href=\"http://www.addthis.com\" target=\"_blank\">here</a> if you don't have one</em>",! }9 a/ j) G& Z% S+ p& V
"id" => $shortname."_addthis",
6 m- i' j; ~2 }2 [. i2 t "type" => "text",/ U( q& t% }! `' H5 V% J- r4 y4 x
"box" => "social",
9 M! x! U4 C4 ^, i8 c "std" => "",
. a0 R; T8 a8 j9 Q ),0 {" o% u) h; H' o0 ?$ R
7 O% c3 P ^" k3 [# M array( "name" => "</div></div>",2 f, d( s* H9 j0 ^6 A3 @
"type" => "close", ]2 S6 }" Q0 J' ^, A5 Y
),8 B6 Z; { o1 `2 j3 e1 \
' W {0 X7 X& n/ W: R# R & d8 t3 ^6 [8 M, q& l
1 i& H" B7 d% v/ p2 T
array( "name" => "YouTube Video Settings",4 v1 n7 S4 X: {% s T2 D0 ~! f. ` o
"type" => "heading",
4 g9 d# P9 ]' @( T( b. [0 Z ),
# y5 q0 t3 x, f0 i- A* s
6 [) l; ]2 A2 v: _: D u array( "name" => "Enable <strong>YouTube Video</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",: y8 \( n8 ?% u4 ?! q1 s
"id" => $shortname."_emvideo_activate"," ]2 l6 Z' V$ ]4 V% u
"type" => "select",
) Z" t# T; z( x/ \$ K5 _ "std" => "No",
3 o3 b. b9 \; O1 O, E$ P1 X7 o+ B "options" => array("No", "Yes")),9 }- X; E1 F. z; ~ r! i
1 ~+ y% d$ Z" w 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 T% P) l# ]6 W. [ "id" => $shortname."_emvideo",
+ ]' c5 v" T2 D# P( r "std" => "",
5 j6 @+ x* k' X) \' v. ], Y' L "type" => "text"),
8 b% Z, W$ N( M: z, ]& O' A1 [! ~2 ]4 {
. b" w/ T- U$ `/ D5 |( q array( "name" => "</div></div>",5 M6 l# {1 q" _
"type" => "close",+ b0 W# ?' X' x7 f# b$ r
),1 o7 i) A) g+ ]" H; T3 G# u
, C! b1 H4 V" F% l( O2 h. r3 F# G
array( "name" => "Twitter Settings",
4 s* M( l8 B1 v "type" => "heading",
8 p) y! i# d Z5 n" p ),3 `+ Z$ m2 L( C( f8 _
: d, Y6 k" F' P2 l4 G9 l- p
array( "name" => "Enable <strong>Twitter</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",! o5 Q0 O! G/ G5 o% w. L( R
"id" => $shortname."_twitter_activate",! K( O. _; [: ]; z+ r
"type" => "select",
p3 P z: g9 D: l5 Y; P "std" => "No",0 k* f% n7 @8 W4 A8 S; V# k
"options" => array("No", "Yes")),& e3 d: b$ U, Z' Z% |+ z
1 \6 z/ x+ W" T7 r1 r+ l0 E; b' |
array( "name" => "Insert Your Twitter ID here
. z! N: N- h8 J; U3 ^: E <br /><em>*leave blank if not necessary</em>+ U) K7 J% r/ A5 Z s
<br /><em>*Register Twitter for free <a href=\"http://www.twitter.com\" target=\"_blank\">here</a> if you don't have one</em>",* i3 P7 y2 ^( \" D+ Z: Z, t
"id" => $shortname."_twitter",& i! x3 y! d& x; [+ g! e2 s0 G
"type" => "text",. E @; p$ m4 j+ J2 D- f7 _9 W
"box" => "social",
, c l! ] y5 x- x "std" => "",
( W, R4 B% S, K1 F9 L- @1 ] ),
) C `5 Y$ \3 j8 t. l( ~2 P& j8 T/ P/ ~. U* m3 b7 Y- w
array( "name" => "Enter Twitter Feed Count here
! t' l7 @: o3 I <br /><em>*leave blank if not necessary</em>' H+ w T6 E5 }* k* I" C& u
<br /><em>*Enter How Many Twitter Feed To Display</em>",6 v" N1 d4 Q; Z/ P( Q T% Y c' b
"id" => $shortname."_twitter_count",
) s$ ^# o8 I o8 m "type" => "text",. V' Q6 @) C) ]( g; Q9 J
"box" => "social",
; }9 W# W a5 g4 V l( z( Y d" l7 w# m "std" => "",
; P3 E1 L7 D% q$ k ),
7 \% K: m. a- p# Z, s& \
' w1 u3 _5 q- F# n) C$ C array( "name" => "</div></div>",
' |+ l: @, E5 ~ F! \ "type" => "close",; n3 Q, n8 O. v v5 x$ A0 @$ ~
),9 `# z: U+ X, M& z' n( X4 m- D
7 a3 u- h- h6 A9 d( k! D; z( @: ?7 R" n9 c( b
array( "name" => "125 x 125 Banners Advertisement Settings"," l# ^- U( E) j
"type" => "heading",
4 N& j. U3 V" }1 l" i+ } ),# H8 F" T+ R2 M( d; u( Q
& {8 w9 c$ m& t0 T
array( "name" => "Enable <strong>125 x 125 Banners</strong> On Sidebar?<br /><em>*Disable by default, Choose Yes to enable it.</em>",# r7 N& y; E+ g7 C6 [
"id" => $shortname."_sponsor_activate",
& ~. @& N, C" @ "type" => "select",/ J" \' j1 u1 z* N+ E
"std" => "No",
8 Z$ Q5 i/ {# }! e! m. D5 G "options" => array("No", "Yes")),; M6 u! b3 W6 b' H
) W$ ?0 G7 \/ U3 t
& Q& u9 z- ~1 Y array( "name" => "Insert Sponsor Banner One HTML Code<br /><em>*leave blank if not use</em>",7 t! n3 `5 b, g2 L, f4 n' R
"id" => $shortname."_sponsor_banner_one",
% h" I' Y% }6 @: W4 z( J" ] "type" => "textarea",: _, h; D$ i; Z3 p5 l' V' A
"std" => "",
7 R9 J. A h: m0 i, ?( T+ |9 b* C ),
0 k& f5 R: ?& r D* }' b6 v; a% _
array( "name" => "Insert Sponsor Banner Two HTML Code<br /><em>*leave blank if not use</em>",/ ]' I/ X* d; r8 F6 d
"id" => $shortname."_sponsor_banner_two",: l# J) ]' K: L8 e/ k
"type" => "textarea",
: V( w& _' b# q& W" o; B4 i, G "std" => "",
& Q3 }1 l+ G2 |- R6 {5 I1 n7 p5 k ),+ O6 d+ A. L8 `9 v, u3 B: r
6 W2 C) C+ o- C6 V/ N1 z! \
array( "name" => "Insert Sponsor Banner Three HTML Code<br /><em>*leave blank if not use</em>",
8 g) ]1 s% f2 n1 Y7 U2 M& K% [ "id" => $shortname."_sponsor_banner_three",$ A9 e0 b7 S: S }
"type" => "textarea",/ }; `% T U, [6 Q7 n4 p( G
"std" => "",& D4 S" A. u. G7 K
),; T. C9 W6 v; O2 N
& n- [ G$ R4 u7 V; [5 N0 h array( "name" => "Insert Sponsor Banner Four HTML Code<br /><em>*leave blank if not use</em>", }, E5 F9 [: m& Z
"id" => $shortname."_sponsor_banner_four",% L& O9 }( O( H& k! C
"type" => "textarea",- Z2 c: ?, _9 v/ d; H: P
"std" => "",' G7 `$ V+ G- Y, W. j
),7 w3 ~3 }+ r$ ?0 g7 W
) R5 c' z. [% L9 w
array( "name" => "Insert Sponsor Banner Five HTML Code<br /><em>*leave blank if not use</em>",
+ h; }6 n8 X' a. u2 X1 k7 e# ` "id" => $shortname."_sponsor_banner_five",9 l, a* x( F* ^& X7 m q3 b w7 H
"type" => "textarea",
! ~ |, Y' z3 y- j "std" => "",& Z# |8 X* R* j( [( A* X1 f
),
0 `& M) u+ E8 Y1 j, w* l* I! m& H, D& \* M( d$ ]: F
array( "name" => "Insert Sponsor Banner Six HTML Code<br /><em>*leave blank if not use</em>",
8 }5 J6 p" T$ f) P+ y& \( v) ~ "id" => $shortname."_sponsor_banner_six",; s' P0 s! o* ~( p4 P) Z
"type" => "textarea",
( l0 f$ |/ T5 O/ F6 ^ "std" => "",' f9 g( H6 u1 Y: Z) {
),
) x1 P+ K6 `% H" m' `: e. L5 Q- M2 l/ h- T/ M* J
array( "name" => "</div></div>",
1 S8 G2 U0 s" m. I- M "type" => "close",, ?: T6 h) g; ]& S
),
! N1 F( C& z- J) n9 w g4 c, r2 e) q0 t% v
+ {# g5 K) Q+ K
" v& L- W7 y. s
); ]! p- H/ o; E. |0 s
# B3 w6 m. ^$ e4 _. d" ofunction mytheme_admin_panel(){ if ((function_exists("check_theme_footer") || function_exists("check_theme_header"))) {
) @5 P( I6 `$ c" q" }( j0 B6 }% X, T2 X& f* Q; Y8 B/ T
echo "<div id=\"admin-options\"> ";
0 e0 m2 v. i! q( f2 w1 q
2 t( w: b k0 B z5 J' oglobal $themename, $shortname, $options;
2 P* U3 ^) m# e# oif ( $_REQUEST['saved'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings saved.</strong></div>';0 D5 ^6 T# ~+ L1 V# }7 q
if ( $_REQUEST['reset'] ) echo '<div id="update-option" class="updated fade"><strong>'.$themename.' settings reset.</strong></div>';" s# q" Y3 X5 Q7 i
?>' G9 u3 v* g) A. G6 G- L
- {% n) ?+ g6 {6 C# N
<h4><?php echo "$themename"; ?> Theme Options</h4>& }' L2 M- X( i& r$ [1 ^3 t
. |; _7 I' w# j; t0 c
<div class="annouce">
& G0 `7 P* E n& K2 ?0 D<h1>Thank You Using Our <?php echo "$themename"; ?> WordPress Theme</h1>
! M; l4 `; U2 ?# z<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>
8 {+ O, Y2 d, J8 v" a</div>" o- M! Y% |6 Q7 E" q
! \; d! e$ }/ ?+ G9 |7 \* K<form action="" method="post">5 J* y9 T y1 s2 k( n( o9 |+ A
8 \1 @/ A8 X: E: h) I' ~ v/ B<?php foreach ($options as $value) { ?>
( ]6 C" \+ [4 |+ y% |7 L3 r" k8 s* n8 |: F) r( x
<?php switch ( $value['type'] ) { case 'heading': ?>6 ]9 ~) M. {# p$ F! E) p9 P; \- i9 O1 E
8 A6 Z8 \% W: H; ?5 F1 \# b
<div class="get-option">
" C3 k# X. |* o# [8 d3 y. t$ S. |0 z% ?2 k
<h2><?php echo $value['name']; ?></h2>
1 ]8 E* Q: F$ m9 H/ }: R$ c$ M; I* R
/ c6 p# c. x, l: e t. Y6 V<div class="option-save">
3 ?) w2 R- G3 }6 ~7 B& ]1 B
9 P: y* J7 @5 t: Q<?php
+ E$ N& _( E2 F4 mbreak;
) d6 {1 B( z* S0 j! Z2 q0 {case 'text':
8 n, i7 K* l5 x0 N5 T5 D+ I* O5 ??>
7 |# d/ {+ C3 C* d. g/ L3 [$ b% v5 a: d9 s4 J- x
<div class="description"><?php echo $value['name']; ?></div>
: t, }1 }+ O4 D2 q' l<p><input name="<?php echo $value['id']; ?>" class="myfield" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if (
4 o1 z2 d; O$ ?3 s" r& K7 V, V# c3 ?. ~7 n3 |8 e# {
get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" /></p>& p6 ?, g( C3 M8 o
9 b8 K" }1 W! m( O. P5 _
<?php8 q' D+ S) i' `% x
break;
$ d3 O# _. Z9 Z7 T* E# C. `case 'select':1 \, N7 Q4 O3 I0 ^4 j' E4 w
?>
3 X! ^0 a X$ T4 ^
0 A0 B1 U0 s, K# T! ~<div class="description"><?php echo $value['name']; ?></div>
3 d$ T+ O) @* @; K' f<p><select name="<?php echo $value['id']; ?>" class="myselect" id="<?php echo $value['id']; ?>">) e) r. l( t8 ?) f0 d& d0 P# T% A
<?php foreach ($value['options'] as $option) { ?>
: j# k4 b% O& Y5 q; M! r3 I<option<?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
, G" p U8 @4 E, ^! v/ m& ?7 v<?php } ?>
: O, W# l% K. ^0 A- c' V</select>7 c! W! |6 f: m( C" W) u. s" k& v
</p># m& J: H* O. A( i+ o
6 k8 t0 F8 o, A2 Z- S" i2 f2 F
<?php5 U8 N6 [: R( _0 p# i5 t
break;
& f3 s/ [- ]) Lcase 'textarea':
% T3 g. k1 B3 q* L/ E$ C9 K( l$valuex = $value['id'];
& d# S0 D1 s! i5 A; T$valuey = stripslashes($valuex);' j' C w) J5 Y; i' v+ O/ B. n3 Y
$video_code = get_settings($valuey); _( @5 k9 u- u5 L- y; t! s
?>
; F. o# n, R7 f* _) R$ h$ T- v
<div class="description"><?php echo $value['name']; ?></div>
: v8 N, ]/ h0 r) P1 s<p><textarea name="<?php echo $valuey; ?>" class="mytext" cols="40%" rows="8" /><?php if ( get_settings($valuey) != "") { echo stripslashes($video_code); }" b- o2 P; u0 c
@ W' c- B( I+ d
else { echo $value['std']; } ?></textarea></p>
* L# h" i6 `7 E4 M/ X2 z3 a) h
% C& Y/ B1 Q( T& F" _( B" y3 j<?php) m* k/ ^( q* g7 _0 J& V! M+ w
break;
8 X+ M! i9 `# W* H2 }case 'close': J3 O) C9 e7 x& k W h# ? E1 V
?>
3 f4 j* r. ^( o9 u* a( y
* S0 y. z3 T) p( A<div class="clearfix"></div>
0 j% F, S7 v8 Y" f2 v</div><!-- OPTION SAVE END -->1 U5 D7 h! p7 v _& z$ u
* H$ M$ f7 X/ {$ |- [' ~<div class="clearfix"></div>
2 S% h1 h* Q$ P0 o2 a5 @</div><!-- GET OPTION END -->& ~1 z0 x$ [0 h+ y+ \ V
$ T2 M$ K8 q2 I<?php" m) N9 r# {% y0 \
break;2 P7 o3 X" ]( y+ d% o
default;) x- y8 Y K% i; u
?>. O" Y: a9 _: @9 X
; Q; G5 ]5 m( t! I2 W8 A
/ K6 I0 z* _! t<?php
6 ?" q, i- _5 Q# N0 Vbreak; } ?>
+ X7 e$ [/ {% @! s, N( |+ _+ M) P1 v
3 i2 ?. j1 ?5 H: M3 |: c<?php } ?>
2 V/ |9 l! n1 K1 v: I& K; m# ~# B, L
<p class="save-p">
K) T- u1 c) p9 h2 q3 F( V<input name="save" type="submit" class="sbutton" value="Save Options" />
u Y& |" v. B# p<input type="hidden" name="action" value="save" /> s8 R ~! D# s. S0 o) W/ @( P
</p>
$ i; G5 x3 j+ Y# }7 L</form>
( [* E0 r4 j; B3 O/ n; p2 v/ G9 M' F) U4 ~5 p% W5 Z: v
<form method="post">7 E( O& U" q h# M
<p class="save-p">
; w+ l1 f( J( f) M8 t4 k- ?<input name="reset" type="submit" class="sbutton" value="Reset Options" />! N4 E$ q2 I: F* n4 r1 N( _/ h
<input type="hidden" name="action" value="reset" />
! t9 z+ V4 E5 C2 K6 l0 x" K</p>
" O0 {7 m; h8 _7 v</form>
& v% P& `0 E/ b
; l$ D) N8 P' n" ?</div><!-- ADMIN OPTIONS END -->
* J' y# w- v1 U1 G: H2 X }% Q
! x& O* d. ^0 y: w& C. j3 j<?php } else { echo ("Well, You Done It..You Just Modified Some Codes!"); } }2 L7 z: q" \3 {6 ]; ~
) P, F7 A' f0 Z. X+ B4 a
function mytheme_admin_register() {
" f7 I0 T, |2 x2 L, mglobal $themename, $shortname, $options;
1 K; t& B% r" o0 U" dif ( $_GET['page'] == basename(__FILE__) ) {) s7 A& ^3 b" l% v
if ( 'save' == $_REQUEST['action'] ) {/ L; }5 L/ U: w9 S, F
foreach ($options as $value) {
) z \: E! @* m7 t9 F s) ~update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
) s/ _* e+ b. L2 l% j! Yforeach ($options as $value) {; f2 q& a' {' I
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }2 z0 F t7 y+ ]8 J2 Y7 f7 E8 |$ x
header("Location: themes.php?page=functions.php&saved=true");* w# T. U! t0 a2 y- m: {& Q
die;3 |: a: L: d" g, Z, q P# z
} else if( 'reset' == $_REQUEST['action'] ) {
T1 n$ I* ~! _# k' I* m# t4 Z6 F7 O2 wforeach ($options as $value) {; d2 b3 ] I9 }; S6 \" t
delete_option( $value['id'] ); }
/ U `6 K5 J9 Theader("Location: themes.php?page=functions.php&reset=true");3 J" h6 Z+ b) {
die;' Q/ P+ l* S6 Q8 i+ ]
}
' O" K' X0 v. S3 K" W. @}+ g! x: L. \3 F3 i% Y- s ~1 q5 L* [
add_theme_page($themename." Options", "Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');! c0 D9 g6 M l7 D" w5 H% E
}
# z2 y' v' Z# j7 K/ Y* Q
! x. m1 |7 C/ Ofunction mytheme_admin_head() { ?>
1 a" J7 e( h5 b2 _<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />3 _- g# @7 r* R( s
<?php }3 v: V+ }' d! x7 Q9 b1 L
|
|