|
|

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