|
|

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