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